RealTime database connection errors

Hello,

App Id = 8149FCCE-07DA-F988-FFBB-6154872C9500

When I started using Realtime operations, out of curiosity I also began monitoring connections using this:

    monitorConnections = () => {
        this.backendless.RT.addConnectEventListener(() => console.log(`${new Date().toLocaleTimeString()} Backendless client connected` ))
        this.backendless.RT.addDisconnectEventListener(() => console.log(`${new Date().toLocaleTimeString()} Backendless client disconnected`))
        this.backendless.RT.addReconnectAttemptEventListener((attempts) => console.log(`${new Date().toLocaleTimeString()} Backendless client reconnect attempt #${attempts}`))
        this.backendless.RT.addConnectErrorEventListener((error) => console.log(`${new Date().toLocaleTimeString()} Backendless connection error: ${error}`))        
    }

I used to have a crap network, so I didn’t pay too much attention to errors, but now I have a really solid network and still see a continual stream of messages/errors and wonder if I should be concerned, and if so, how to troubleshoot this.

My monitoring handlers show the connection dropping every 7 seconds, then reconnecting, even when absolutely nothing is happening in the app. This cycling seems to start and stop without correlation to anything I am doing. I’m not even sure what calls I would have to make to cause this, other than unsubscribing to database events, which I am not.

As you can see, I’m also getting plenty of errors for low-level RT operations that I don’t initiate, such as certificate errors. My application actually is working just fine. If I disconnected those event handlers, I probably wouldn’t even notice there was a problem, but I’m a little concerned this could come back to bite me after going live. Any advice is appreciated!

Kelly

Here is a small sample - I have pages of these:

8:44:25 PM Backendless client disconnected
8:44:25 PM Backendless client connected
8:44:32 PM Backendless client disconnected
8:44:33 PM Backendless client connected
8:44:40 PM Backendless client disconnected
8:44:41 PM Backendless client connected
8:44:48 PM Backendless client disconnected
8:44:49 PM Backendless client connected
8:44:56 PM Backendless client disconnected
8:44:57 PM Backendless client connected
1:00:42 AM Backendless client disconnected
1:00:43 AM Backendless connection error: Network Error api.backendless.com/8149FCCE-07DA-F988-FFBB-6154872C9500/43953016-3AB4-478E-A6C9-91937A61F288/rt/lookup:1          
Failed to load resource: net::ERR_CERT_DATE_INVALID
1:00:44 AM Backendless client reconnect attempt #1
1:00:44 AM Backendless connection error: Network Error api.backendless.com/8149FCCE-07DA-F988-FFBB-6154872C9500/43953016-3AB4-478E-A6C9-91937A61F288/rt/lookup:1          
Failed to load resource: net::ERR_CERT_DATE_INVALID
1:00:45 AM Backendless client reconnect attempt #2
1:00:48 AM Backendless client connected
1:00:55 AM Backendless client disconnected
WebSocket connection to 'wss://rt-cloud-us.backendless.com:3001/8149FCCE-07DA-F988-FFBB-6154872C9500/?apiKey=43953016-3AB4-478E-A6C9-91937A61F288&clientId=09FA33BA-C2E1-EADB-20B2-F34316433508&userToken=703846F5-AE21-4616-87D1-BC6AEE22B4CA&EIO=3&transport=websocket&sid=0ZdLhzbToE-HgIEEABtB' failed: WebSocket is closed before the connection is established. WS.doClose 
rt-cloud-us.backendless.com:3001/8149FCCE-07DA-F988-FFBB-6154872C9500/?apiKey=43953016-3AB4-478E-A6C9-91937A61F288&clientId=09FA33BA-C2E1-EADB-20B2-F34316433508&userToken=703846F5-AE21-4616-87D1-BC6AEE22B4CA&EIO=3&transport=polling&t=O57H0HP.0&sid=0ZdLhzbToE-HgIEEABtB:1          Failed to load resource: the server responded with a status of 400 (Bad Request)
1:00:56 AM Backendless client connected
1:01:04 AM Backendless client disconnected
WebSocket connection to 'wss://rt-cloud-us.backendless.com:3001/8149FCCE-07DA-F988-FFBB-6154872C9500/?apiKey=43953016-3AB4-478E-A6C9-91937A61F288&clientId=09FA33BA-C2E1-EADB-20B2-F34316433508&userToken=703846F5-AE21-4616-87D1-BC6AEE22B4CA&EIO=3&transport=websocket&sid=GSy3BGw7mk7aURuOABtK' failed: WebSocket is closed before the connection is established.
WS.doClose @ backendless.js?b8b6:10731
1:01:04 AM Backendless client connected
1:01:30 AM Backendless client disconnected
1:01:30 AM Backendless connection error: Network Error
api.backendless.com/8149FCCE-07DA-F988-FFBB-6154872C9500/43953016-3AB4-478E-A6C9-91937A61F288/rt/lookup:1          
Failed to load resource: net::ERR_CERT_DATE_INVALID
1:01:31 AM Backendless client reconnect attempt #1
1:01:31 AM Backendless connection error: Network Error api.backendless.com/8149FCCE-07DA-F988-FFBB-6154872C9500/43953016-3AB4-478E-A6C9-91937A61F288/rt/lookup:1          Failed to load resource: net::ERR_CERT_DATE_INVALID
1:01:32 AM Backendless client reconnect attempt #2
1:01:35 AM Backendless client connected
1:01:42 AM Backendless client disconnected
WebSocket connection to 'wss://rt-cloud-us.backendless.com:3001/8149FCCE-07DA-F988-FFBB-6154872C9500/?apiKey=43953016-3AB4-478E-A6C9-91937A61F288&clientId=09FA33BA-C2E1-EADB-20B2-F34316433508&userToken=703846F5-AE21-4616-87D1-BC6AEE22B4CA&EIO=3&transport=websocket&sid=_zx88LbDGSizFekhABtw' failed: WebSocket is closed before the connection is established.
WS.doClose @ backendless.js?b8b6:10731
rt-cloud-us.backendless.com:3001/8149FCCE-07DA-F988-FFBB-6154872C9500/?apiKey=43953016-3AB4-478E-A6C9-91937A61F288&clientId=09FA33BA-C2E1-EADB-20B2-F34316433508&userToken=703846F5-AE21-4616-87D1-BC6AEE22B4CA&EIO=3&transport=polling&t=O57HBkz&sid=_zx88LbDGSizFekhABtw:1          
Failed to load resource: the server responded with a status of 400 (Bad Request)
1:01:43 AM Backendless client connected
rt-cloud-us.backendless.com:3001/8149FCCE-07DA-F988-FFBB-6154872C9500/?apiKey=43953016-3AB4-478E-A6C9-91937A61F288&clientId=09FA33BA-C2E1-EADB-20B2-F34316433508&userToken=703846F5-AE21-4616-87D1-BC6AEE22B4CA&EIO=3&transport=polling&t=O57HDWQ&sid=2fVydv_E82bePjXnABt6:1          
Failed to load resource: the server responded with a status of 400 (Bad Request)
WebSocket connection to 'wss://rt-cloud-us.backendless.com:3001/8149FCCE-07DA-F988-FFBB-6154872C9500/?apiKey=43953016-3AB4-478E-A6C9-91937A61F288&clientId=09FA33BA-C2E1-EADB-20B2-F34316433508&userToken=703846F5-AE21-4616-87D1-BC6AEE22B4CA&EIO=3&transport=websocket&sid=2fVydv_E82bePjXnABt6' failed: WebSocket is closed before the connection is established.
WS.doClose @ backendless.js?b8b6:10731
rt-cloud-us.backendless.com:3001/8149FCCE-07DA-F988-FFBB-6154872C9500/?apiKey=43953016-3AB4-478E-A6C9-91937A61F288&clientId=09FA33BA-C2E1-EADB-20B2-F34316433508&userToken=703846F5-AE21-4616-87D1-BC6AEE22B4CA&EIO=3&transport=polling&t=O57HFLA&sid=2fVydv_E82bePjXnABt6:1          Failed to load resource: the server responded with a status of 400 (Bad Request)
rt-cloud-us.backendless.com:3001/8149FCCE-07DA-F988-FFBB-6154872C9500/?apiKey=43953016-3AB4-478E-A6C9-91937A61F288&clientId=09FA33BA-C2E1-EADB-20B2-F34316433508&userToken=703846F5-AE21-4616-87D1-BC6AEE22B4CA&EIO=3&transport=polling&t=O57HDWP&sid=2fVydv_E82bePjXnABt6:1          Failed to load resource: net::ERR_CERT_DATE_INVALID

Hi @Kelly_Oglesby,

Do you see these going on all the time? 24x7 ?

Regards,
Mark

No, not 24x7, but most of the time - so much that it is hard to relate it to anything. For example,
in the sample set of messages above, you’ll notice it was connected from 8:44 pm until 1:00 am, when it went through a WebSocket reconnect loop, then connected and resumed disconnecting in precisely 7 seconds.

Before I dispatch it to the product team, could you please make sure you have the latest version of our SDK and its dependencies (primarily socket.io)?

Okay, I’ve upgraded from 6.3.2 to 6.3.14, and I updated socket.io as well. I’ll watch it through tomorrow and report back if it clears up or not. Thank you, Mark.

1 Like

I left the app sitting untouched starting today mid-afternoon. Within 5 minutes it had started disconnecting and reconnecting as normal, but not at 7-second intervals. It cycled at mostly 8 or 14 seconds through the afternoon, then stayed connected for several hours, then started cycling again every 7 seconds. I’m attaching a debug log that shows plenty of backendless and socket.io activity along with the connect and disconnect messages.
localhost-1654912697875.log (15.4 KB)

Hello @Kelly_Oglesby

I just tried to reproduce the issue but without luck, I’ve been monitoring the connection status for a couple of hours and haven’t seen any interruptions.

Could you please describe in more detail how your monitor works, or maybe you can provide a simple app with minimum code, just to reproduce the issue?

Regards, Vlad