rabbitmq keepalive timeout error - tcp

Below is part of my rabbitmq log file.
=ERROR REPORT==== 22-Dec-2016::09:36:20 ===
closing MQTT connection "xxx.xxx.xxx.xxx:11030 -> xx.xx.xx.xx:1884" (keepalive timeout)
=ERROR REPORT==== 22-Dec-2016::09:36:20 ===
closing MQTT connection "xxx.xxx.xxx.xxx:14653 -> xx.xx.xx.xx:1884" (keepalive timeout)
=ERROR REPORT==== 22-Dec-2016::09:36:22 ===
closing MQTT connection "xxx.xxx.xxx.xxx:14494 -> xx.xx.xx.xx:1884" (keepalive timeout)
I think this is closing MQTT connection by keepalive timeout.
Is this normal?
These are repeatedly shown. so log disk is full.
Is there way of connection is keep alive?

Your clients are failing to send something within the keep alive time
they specified when they connected to the broker. See MQTT specs
section 3.1.2.10 Keep Alive.
Compliant clients would send a PINGREQ to keep the connection alive.

Related

TCP connection close automatically

My TCP Server not close client socket,but the client read EOF.,Then client closes socket,my server recv failed with 64..(winsock)
I want to konw when does this happen.

I am getting Connection TIME OUT Error When Users Access .net Application

Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.
This could be because the pre-login handshake failed or the server was unable to respond back in time.
It seems to be a firewall issue. Firewall seems to be blocking connection to sql server for port 1433. You will need to add a rule to allow connection on this port.
You can find more on this here: SQL Server Pre-Login Handshake Acknowledgement Error

golang1.4 http server keep idle connection

Is there a way to keep idle connection open after a specified timeout at the server side?
I have a http server implemented using golang1.4 and an API will respond after 10 seconds. While I set MaxIdleConnsPerHost at the client (using golang1.4), I still get the read tcp xx.xx.xx.xx:xx: use of closed network connection. I think it may be caused by server closing the idle connection.
I found GOLANG, HTTP having “use of closed network connection” error and http.Server: timeout for idle connections only?, but they didn't help.
At the server side, set ReadTimeout may help.
Ref: Creating an idle timeout in Go?

Firebase facebook login - very erratic

We are trying to use facebook login with Firebase in an Ionic app with the inappbrowser. It works fine on the browser (ionic serve) and fine in iOS (emulator and devices). However on android devices the login process is rather erratic. The callback doesn't get called on most tries (although strangely it works sometimes!). Upon enabling logging in firebase, I noticed that the browser tends to 'connect' and 'disconnect' multiple times. Here are the console logs from just clicking on the button that initiates the facebook login:
Facebook Popup initiation
p:0: Browser went online.
p:0: Making a connection attempt
c:0:4: Connection created
c:0:4:0 Websocket connecting to wss://s-dal5-nss-23.firebaseio.com/.ws?v=5&ns=crisscross
p:0: Browser went offline. Killing connection.
c:0:4: Closing realtime connection.
c:0:4: Shutting down all connections
c:0:4:0 WebSocket is being closed
WebSocket connection to 'wss://s-dal5-nss-23.firebaseio.com/.ws?v=5&ns=crisscross' failed: WebSocket is closed before the connection is established.
c:0:4:0 WebSocket error. Closing connection.
c:0:4:0 Websocket connection was disconnected.
p:0: data client disconnected
0: onDisconnectEvents
p:0: Browser went online.
p:0: Making a connection attempt
c:0:5: Connection created
c:0:5:0 Connecting via long-poll to https://s-dal5-nss-23.firebaseio.com/.lp?start=t&ser=19709246&cb=3&v=5&ns=crisscross
p:0: Browser went offline. Killing connection.
c:0:5: Closing realtime connection.
c:0:5: Shutting down all connections
c:0:5:0 Longpoll is being closed.
p:0: data client disconnected
0: onDisconnectEvents
Long-poll script failed to load: https://s-dal5-nss-23.firebaseio.com/.lp?start=t&ser=19709246&cb=3&v=5&ns=crisscross
p:0: Browser went online.
p:0: Making a connection attempt
c:0:6: Connection created
c:0:6:0 Connecting via long-poll to https://s-dal5-nss-23.firebaseio.com/.lp?start=t&ser=57829348&cb=4&v=5&ns=crisscross
c:0:6: Realtime connection established.
p:0: connection ready
p:0: {"r":37,"a":"auth","b":{"cred":"..."}}
p:0: Listen on /users/facebook:... for default
p:0: {"r":39,"a":"q","b":{"p":"/users/facebook:...","h":"pExrvNpPeLgfcNuQk/FRu4iWQrg="}}
...
...
c:0:6: Primary connection is healthy.
c:0:6:1 Websocket connecting to wss://s-dal5-nss-23.firebaseio.com/.ws?v=5&ns=crisscross&s=j9noKHDr1wjh5MiKjiKFIMxqNY2RvKoh
p:0: Browser went offline. Killing connection.
c:0:6: Closing realtime connection.
c:0:6: Shutting down all connections
c:0:6:0 Longpoll is being closed.
c:0:6:1 WebSocket is being closed
WebSocket connection to 'wss://s-dal5-nss-23.firebaseio.com/.ws?v=5&ns=crisscross&s=j9noKHDr1wjh5MiKjiKFIMxqNY2RvKoh' failed: WebSocket is closed before the connection is established.
c:0:6:1 WebSocket error. Closing connection.
c:0:6:1 Websocket connection was disconnected.
p:0: data client disconnected
0: onDisconnectEvents
Long-poll script failed to load: https://s-dal5-nss-23.firebaseio.com/.lp?id=1125523&pw=ma9Rk4SNwf&ser=53936…1qY3lPRFo5LlRaeTdjZXdMY09XRDZJWGFMOUZtNUFBcGQxTzBrVTVCNXloVHQ0cGVXTVkifX19
Long-poll script failed to load: https://s-dal5-nss-23.firebaseio.com/.lp?id=1125523&pw=ma9Rk4SNwf&ser=53936342&ns=crisscross
p:0: Authenticating using credential: eyJ0eX...fn81k
The logs don't have time stamps, but the whole thing above happened without any major delays in between, over 3-4 seconds.
I understand that it's trying to switch between long polling and some realtime connection (limited knowledge here), and that could explain why it goes offline and online. But so many times? And it ends up just not connecting.
Any idea anyone?

asterisk Unable to connect SIP socket to ip:port Connection timed out

I am working on a sip client - asterisk server. I am using tcp connections.
The client side is Zoiper as for a first test.
Registration and outbound calls do work as expected, but after 3-4 minutes from registration process or an outgoing call, when testing incoming calls I do get this message on the server:
tcptls.c:446 ast_tcptls_client_start: Unable to connect SIP socket to ip:port: Connection timed out
The invite message (incoming call) never gets on the client (Zoiper softphone).
Why is this error showing up?
The reason why this appears from my assumption is because of the fact that neither the client or the server are sending keep alive messages, so after a tcp socket timeout the client which is behind a nat will not be reachable from the server side anymore.
This error come because your NAT (or 3g if you use 3g) drop connection. As result there are no way use same connection anymore.
Correct behavour of you app - send SIP OPTIONS message, if timeout - do registration again.
And yes, you need send keepalives(recomended method - OPTIONS message) or setup keepalive on asterisk side and setup in your side correct answer.

Resources