Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot send event #5

Open
worm2fed opened this issue Aug 29, 2023 · 0 comments
Open

Cannot send event #5

worm2fed opened this issue Aug 29, 2023 · 0 comments

Comments

@worm2fed
Copy link

Hi.

I'm trying to send an event from Readme example, and it's failing without any useful message.

server :: MonadIO m => m ()
server = liftIO . void . infinitely $ do -- almost same as forever
  conn <- connect defaultSettings (Static "127.0.0.1" 1113)
  let js = object ["isHaskellTheBest" .= True]
      evt = createEvent "programming" Nothing (withJson js)

  as <- sendEvent conn (StreamName "languages") anyVersion evt Nothing

  _ <- wait as
  threadDelay 30 -- this is actually 30 seconds, not microseconds

And in console there is:

❯ stack exec -- union-server -c config.yaml server run
union-server: Aborted

According to admin panel nothing is created:
image

I'm using eventstore in docker:
docker run --name esdb-node -it -p 2113:2113 -p 1113:1113 eventstore/eventstore:22.10.2-alpha-arm64v8 --insecure --run-projections=All --enable-atom-pub-over-http

Interesting, that I've tried to use curl to make test request

❯ curl http://localhost:1113/subscriptions
curl: (52) Empty reply from server

But this one is working
curl http://localhost:2113/stats -H 'Accept: application/json'

So I've tried to use 2113 port in haskell code, but same abortion.

Do you have any idea?

I'm using ghc 9.2.8 on OS X with M1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant