Rigctl port not listening

95 views
Skip to first unread message

MadPsy

unread,
Jul 28, 2022, 4:38:58 AM7/28/22
to SparkSDR
I'm running 2.0.18 under Windows 11 and trying to get rigctl working but it appears Spark is simply not listening on the auto assigned port (51111 in this example). The reciever is set to DIGIU and displays the aforementioned port. If I try to connect to 127.0.0.1 TCP port 51111 it instantly returns 'connection refused' which means nothing is dropping the packets - there's simply nothing listening to connect to. Trying the connection to said port to other interfaces on the same PC results in the same.

Here's the weird part. Opening a second DIGIU reciever assigns the same rigctl port, which obviously makes no sense. so from what I can tell Spark isn't binding to the port for whatever reason.

Probably worth mentioning the Spark executable is allowed for incoming connections through the firewall. That point is somewhat moot given the symptoms mentioned though.

Thanks

Karl Heinz Kremer

unread,
Jul 28, 2022, 6:48:03 AM7/28/22
to MadPsy, SparkSDR
My experience with rigctl is from the Mac - it is working, but only for connections from the same computer. For connections from I different computer, I need to run an instance of rigctld that forwards an incoming connection to port 51111 on the local machine. Are you trying to connect from the same computer or remotely? 

Karl Heinz - K5KHK 

On Jul 28, 2022, at 4:39 AM, MadPsy <nat...@link9.net> wrote:


--
You received this message because you are subscribed to the Google Groups "SparkSDR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sparksdr+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sparksdr/496327e8-ed4a-462f-9644-de6de537d4a5n%40googlegroups.com.

MadPsy

unread,
Jul 28, 2022, 7:01:13 AM7/28/22
to SparkSDR
Thanks for reply. This is trying locally and remote. The problem appears to be that Spark simply isn't binding to the port, thus the connection being refused as opposed to timing out. This worked before, but no idea what version that was (probably a good 8 months ago now).

As mentioned one of the telling behaviours is the fact Spark is not incrementing the port number when you add another listener. I could add ten listeners with rigctl enabled and they all claim to be binding to port 51111.

ahop...@googlemail.com

unread,
Jul 28, 2022, 7:32:03 AM7/28/22
to SparkSDR
Hi,
I just did a quick sanity check here to see if I had broken anything and it works for me on windows 10 and 11 so it is something subtle.  Can you turn on extended logging in settings and see if there are any clues in the error logs.
73 Alan M0NNB

MadPsy

unread,
Jul 28, 2022, 7:40:06 AM7/28/22
to SparkSDR
Hi Alan, appreciate you replying. Where does one locate the logs? Couldn't see anything SparkSDR related under C:\Users\User\AppData\Local but could be me being blind.

ahop...@googlemail.com

unread,
Jul 28, 2022, 7:42:02 AM7/28/22
to SparkSDR
Hi, the logfile location is described near the top of the help.

MadPsy

unread,
Jul 28, 2022, 7:53:20 AM7/28/22
to SparkSDR
Thanks. Not sure how to quote properly in this google groups thing but here we go.

This suggests something else is listening on the port, which given the fact that connections to the port are refused is odd. I've checked for only sparksdr process so I think a good old fassioned reboot is in order. I'll do that now.

SparkServe Start
The underlying listener has failed to start.
WebSocketSharp.NetCore
Void startReceiving()
   at WebSocketSharp.NetCore.Server.WebSocketServer.startReceiving()
   at WebSocketSharp.NetCore.Server.WebSocketServer.start(ServerSslConfiguration sslConfig)
   at WebSocketSharp.NetCore.Server.WebSocketServer.Start()
   at SparkSDR.Models.SparkServe.Start(wirelessModel model)
Only one usage of each socket address (protocol/network address/port) is normally permitted.
System.Net.Sockets
Void UpdateStatusAfterSocketErrorAndThrowException(System.Net.Sockets.SocketError, System.String)
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError , String )
   at System.Net.Sockets.Socket.DoBind(EndPoint , SocketAddress )
   at System.Net.Sockets.Socket.Bind(EndPoint )
   at System.Net.Sockets.TcpListener.Start(Int32 )
   at System.Net.Sockets.TcpListener.Start()
   at WebSocketSharp.NetCore.Server.WebSocketServer.startReceiving()

MadPsy

unread,
Jul 28, 2022, 8:09:33 AM7/28/22
to SparkSDR
Okay rebooted and now not seeing that error (or any errors, just INFO) but still the same behaviour. Namely:

1) connection refused to (stated) port 51111
2) creating a new reciever gets assigned the same port

It's possible this is just an issue for me but what could cause it is beyond me. Happy to provide any more info if you think it's worth while investigating further.

Thanks

MadPsy

unread,
Jul 28, 2022, 8:13:19 AM7/28/22
to SparkSDR
I guessed this would be the case but to double check:

PS C:\Users\MadPsy> netstat -oan | findstr /c:"LISTEN" | findstr /c:"51111"
PS C:\Users\MadPsy>

ahop...@googlemail.com

unread,
Jul 28, 2022, 8:28:55 AM7/28/22
to SparkSDR
Hi,
I'd be interested to see the log files.  The entry that you posted was actually related to the websocket interface which is odd in itself:)
73 Alan M0NNB

MadPsy

unread,
Jul 28, 2022, 8:35:13 AM7/28/22
to SparkSDR
Ah ok wasn't too sure what it related to.

I would be interested if the netstat command I tried actually returns anything on a working system (of course change port as appropriate) or if it's an invalid test.

Here's the logs - these were generated after a full reboot. They don't look very verbose to me but I've checked and extended logging is ticked. There are two Hermes-Lite - one with the 10 slice cicrx gateware (.70) and one with the main 4 slice+TX gateware (.67) - it's of course that one I'm trying to make work again with rigctl.
corelog-2022-07-28-13-03-59.txt
log-2022-07-28-13-04-01.txt

ahop...@googlemail.com

unread,
Jul 28, 2022, 8:56:45 AM7/28/22
to SparkSDR
There are a surprising number of discovery packets being sent, do you have a lot of network cards or virtual machines? I can't see why it would cause a problem but it does look a bit unusual.  I'll look through the code to see if I can add further logging.
73 Alan M0NNB

MadPsy

unread,
Jul 28, 2022, 8:58:56 AM7/28/22
to SparkSDR
Yeah there's a few, not a crazy amount - 13 total I think

MadPsy

unread,
Jul 29, 2022, 5:13:08 AM7/29/22
to SparkSDR
For reference I removed all virtual NICs but no change. When you have some time (and the motivation!) it might be interesting if you could add some verbose logging around when it tries to bind the TCP listener to see if it's even attempting to and to what interface etc. I'm sure you probably have some (better) ideas around that too though.

ahop...@googlemail.com

unread,
Jul 29, 2022, 5:55:15 AM7/29/22
to SparkSDR
Thanks for trying that,
I've been looking through the code, it is not very complex and so far I'm at a bit of a loss to see what is happening.  I've run out of things to log :). I'll have a fresh look at the weekend and might well send a test version. 
73 Alan M0NNB

MadPsy

unread,
Jul 29, 2022, 5:58:30 AM7/29/22
to SparkSDR
Thanks Alan,

I guess one curiosity is why adding recievers doesn't increment the port - they all claim 51111. I assume there's a counter which isn't incrementing so it isn't hitting whatever does the i++ logic for that - maybe that's a clue? Of course I'm just taking wild stabs in the dark here.

ahop...@googlemail.com

unread,
Jul 30, 2022, 6:16:20 AM7/30/22
to SparkSDR
Hi,
this https://www.sparksdr.com/download/SparkSDR.2.0.23.win64.zip has a little more logging and explicitly sets a socket option.
73 Alan M0NNB

MadPsy

unread,
Jul 30, 2022, 11:08:31 AM7/30/22
to SparkSDR
Thanks Alan shall give that a spin when I get home later and report back with logs etc.

MadPsy

unread,
Jul 30, 2022, 12:15:05 PM7/30/22
to SparkSDR
So that 'just worked' which is great. I presume by 'explicitly sets a socket option.' you mean there's actually a functional change in this version?

Succesful log output:

30/07/2022 17:09:01 v2.0.23.0
Listening on 0.0.0.0:51153
30/07/2022 17:09:01 v2.0.23.0
Rigctrl running
30/07/2022 17:09:19 v2.0.23.0
Listening on 0.0.0.0:51154
30/07/2022 17:09:19 v2.0.23.0
Rigctrl running
30/07/2022 17:10:00 v2.0.23.0
Rigctrl client connected
30/07/2022 17:10:00 v2.0.23.0
Received connection request from 127.0.0.1:59595
30/07/2022 17:10:00 v2.0.23.0
Rigctrl running
30/07/2022 17:10:03 v2.0.23.0
Rigctrl Client closed connection
30/07/2022 17:10:03 v2.0.23.0
Rigctrl closed

ahop...@googlemail.com

unread,
Jul 30, 2022, 12:27:15 PM7/30/22
to SparkSDR
Well I was not expecting that:) I set ExclusiveAddressUse to true for the listener port, I have no idea why your computer would need that when it appears to work without it on other computers.  Maybe a default has changed.
Good to get something working even though I don't fully understand how.
73 Alan M0NNB

MadPsy

unread,
Jul 30, 2022, 12:38:11 PM7/30/22
to SparkSDR
Interesting indeed. I'll run this version for a bit and hopefully that won't have broken it for anyone else. Thanks for your time looking and fixing this.
Reply all
Reply to author
Forward
0 new messages