question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connection to the websocket refused

See original GitHub issue

Hi,

I have a sip.js application here which I want to let connect to a routr instance. But it fails to connect to the websocket with this message:

WebSocket connection to ‘wss://…com:5063/’ failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

I’ve setup the certificates and have manually entered the wss port in the network settings.

Telnet doesn’t work either and a listen -al | grep LISTEN shows that the port 5063 isn’t open.

Do you have any clue here?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
psanderscommented, Apr 22, 2020

I published a fix for this in the Edge channel of the Snapstore, as well as in the Docker Hub.

There is another unrelated issue with SIP.js that will affect your deployment. I’m closing this for now, but feel free to reopen if this issue reoccurs.

1reaction
philiplbcommented, Apr 1, 2020

@psanders Hi,

thanks for investigating!

This is my log after a sudo snap restart routr-server.routr-server:

[WARN ] 2020-04-01 09:35:13.324 [main] MHBase - java.io.FileNotFoundException: config/stack.properties (No such file or directory)
[INFO ] 2020-04-01 09:35:13.390 [main] MHBase - Starting Routr
[INFO ] 2020-04-01 09:35:13.465 [main] routr - using Enabled tls auth policy
[WARN ] 2020-04-01 09:35:14.274 [main] routr - using default tls security policy
[INFO ] 2020-04-01 09:35:14.286 [main] routr - javax.net.ssl.trustStorePassword is null, using the password passed through javax.net.ssl.keyStorePassword
[WARN ] 2020-04-01 09:35:14.287 [main] routr - Using default truststore type jks
[INFO ] 2020-04-01 09:35:14.628 [main] MHBase - Listening on 172.31.26.131:5060 [udp]
[INFO ] 2020-04-01 09:35:14.656 [main] MHBase - Listening on 172.31.26.131:5060 [tcp]
[INFO ] 2020-04-01 09:35:14.661 [main] MHBase - Listening on 172.31.26.131:5063 [wss]
[DEBUG] 2020-04-01 09:35:16.586 [main] InternalLoggerFactory - Using Log4J as the default logging framework
[DEBUG] 2020-04-01 09:35:16.590 [main] PlatformDependent0 - -Dio.netty.noUnsafe: false
[DEBUG] 2020-04-01 09:35:16.590 [main] PlatformDependent0 - Java version: 8
[DEBUG] 2020-04-01 09:35:16.591 [main] PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
[DEBUG] 2020-04-01 09:35:16.592 [main] PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
[DEBUG] 2020-04-01 09:35:16.593 [main] PlatformDependent0 - java.nio.Buffer.address: available
[DEBUG] 2020-04-01 09:35:16.593 [main] PlatformDependent0 - direct buffer constructor: available
[DEBUG] 2020-04-01 09:35:16.594 [main] PlatformDependent0 - java.nio.Bits.unaligned: available, true
[DEBUG] 2020-04-01 09:35:16.594 [main] PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable prior to Java9
[DEBUG] 2020-04-01 09:35:16.594 [main] PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): available
[DEBUG] 2020-04-01 09:35:16.594 [main] PlatformDependent - sun.misc.Unsafe: available
[DEBUG] 2020-04-01 09:35:16.595 [main] PlatformDependent - -Dio.netty.tmpdir: /tmp (java.io.tmpdir)
[DEBUG] 2020-04-01 09:35:16.595 [main] PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
[DEBUG] 2020-04-01 09:35:16.596 [main] PlatformDependent - -Dio.netty.maxDirectMemory: 245301248 bytes
[DEBUG] 2020-04-01 09:35:16.597 [main] PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: -1
[DEBUG] 2020-04-01 09:35:16.598 [main] CleanerJava6 - java.nio.ByteBuffer.cleaner(): available
[DEBUG] 2020-04-01 09:35:16.598 [main] PlatformDependent - -Dio.netty.noPreferDirect: false
[DEBUG] 2020-04-01 09:35:16.609 [main] MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 4
[DEBUG] 2020-04-01 09:35:16.634 [main] NioEventLoop - -Dio.netty.noKeySetOptimization: false
[DEBUG] 2020-04-01 09:35:16.635 [main] NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
[DEBUG] 2020-04-01 09:35:16.643 [main] PlatformDependent - org.jctools-core.MpscChunkedArrayQueue: available
[INFO ] 2020-04-01 09:35:16.696 [main] MHBase - Starting Restful service (port: 4567, apiPath: /api/v1beta1)

Afterwards, sudo lsof -i :5060 still has no output and an exit code of “1”.

What I could also offer here, if you are interested (I don’t want to steal your time!): If you give me a public key and your (current) IP address, I could give you direct access to the server. You can send this information to me via philip@philiplb.de.

Read more comments on GitHub >

github_iconTop Results From Across the Web

connection refused · Issue #1489 · websockets/ws - GitHub
I'm trying to create a socket connection with the example code in the following manner: const ws = new ...
Read more >
Javascript create WebSocket connection refused - content ...
Trying to open a WebSocket connection from a Browser to a server running on localhost:9000 here is my JS code:
Read more >
websocket connection refused by target machine - Forum
As a first step to confirm connectivity, which is what appears to be your issue here, try using the interactive documentation as outlined...
Read more >
WebSocket connection to 'ws://localhost:1234/tiptap' failed
I'm trying to understand how to use local websocket server. In order to use a local websocket server I modified the WebSocketProvider in ......
Read more >
Troubleshooting connection issues | Socket.IO
You are trying to reach a plain WebSocket server · The server is not reachable · The client is not compatible with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found