These are chat archives for fanout/pushpin

12th
Jun 2018
marrinn
@marrinn
Jun 12 2018 16:52
Hi. I'm still having issues sending messages from a client application when using websockets-over-http. I can open a connection, receive a response from the back-end without any problems, and server push messages to the socket work fine. However, when I try to send a message from the client after connecting, the server receives the message, and responds with a message in return, but all subsequent messages from the client then fail, until the socket disconnects with 1006 error status. Push messages continue to work until the socket disconnects. I tested the client code with the echo server at ws://demos.kaazing.com/echo and it worked as expected. This is the entry in the pushpin log - [INFO] 2018-06-12 16:03:55.666 [zurl] OUT ERR id=6750bd3c-a3fd-434c-919d-6ed1caafb6dc condition=undefined-condition. Any idea what might be causing this?
Jorge S. Cuesta
@jorgecuesta
Jun 12 2018 17:56
@jkarneges on routes I could use dynamic subdomains to specify the origin?
*.domain.loc,debug,ssl=yes,proto=ws localhost:8080,over_http
or like certs
_.domain.loc,debug,ssl=yes,proto=ws localhost:8080,over_http
Justin Karneges
@jkarneges
Jun 12 2018 18:08
@marrinn what's the output of curl -i -H "Content-Type: application/websocket-events" -d 'TEXT 5'$'\r'$'\n''hello'$'\r'$'\n' http://yourserver/path ?
@jorgecuesta partial wildcards not supported. must be a full domain or a single asterisk
Jorge S. Cuesta
@jorgecuesta
Jun 12 2018 18:10
yes currently I use * just wanna know if was supported
marrinn
@marrinn
Jun 12 2018 18:49

@jkarneges - this is the output - HTTP/1.1 403 Forbidden
Content-Type: text/plain
Content-Length: 54

Client not allowed to send WebSocket events directly.

Justin Karneges
@jkarneges
Jun 12 2018 18:50
@marrinn sorry I meant to say, send that to the backend server directly :)
I think for the session to break, the backend must be replying with something unexpected
Jorge S. Cuesta
@jorgecuesta
Jun 12 2018 18:57
someone has some idea how to use self-signed certs on web sockets? because now browser is rejecting the ws connection because cert is self-signed
marrinn
@marrinn
Jun 12 2018 19:02

@jkarneges :). This is the response direct from the backend - HTTP/1.1 401 Unauthorized
Date: Tue, 12 Jun 2018 18:50:25 GMT
Connection: keep-alive
Transfer-Encoding: chunked

invalid grip-sig token

I have some code that checks that the correct grip headers are being sent which would explain this.

would that prevent the subsequent messages being received once the connection is established?
Justin Karneges
@jkarneges
Jun 12 2018 19:07
well if pushpin sends messages to your backend in an http request and you respond with an error, then presumably your backend probably didn't keep/process those messages
also returning non-200 is considered an error. pushpin will retry for a little bit, and eventually give up and kill the client connection