Page 1 of 2
TCP Port in Station Settings already in use
Posted: Tue 19 May 2020 12:38 am
by aznetcowboy
After setting up a new router, the TCP Port in the Station Setting is not working. It has been 22222 ever since I can remember. Was getting a message stating "Cannot establish connect since port is already in use". By what, who knows. How can I either find out who/what is using port 22222 or possibly use a different port in the VP TCP/IP setting?
Would this have something to do with the "Error -32701 while trying to initialize the station" error I am also getting?

Re: TCP Port in Station Settings already in use
Posted: Tue 19 May 2020 8:22 am
by jank
Hi
under linux this command should work for you: netstat -aon |grep :22222
under windows this command might help: netstat -aon | findstr :22222
It will show you all Programs using this TCP Port :22222
Jan
Re: TCP Port in Station Settings already in use
Posted: Tue 19 May 2020 1:55 pm
by aznetcowboy
aznetcowboy wrote: ↑Tue 19 May 2020 12:38 am
under windows this command might help: netstat -aon | findstr :2222
The response I get is "findstr: Cannot open 22222". That sure doesn't help at all, does it?

Re: TCP Port in Station Settings already in use
Posted: Tue 19 May 2020 2:04 pm
by freddie
Looks like a syntax error with the command you used - instead of looking for "22222" in the output from netstat it is looking for the file named "22222" which isn't what you wanted.
Re: TCP Port in Station Settings already in use
Posted: Tue 19 May 2020 5:19 pm
by aznetcowboy
jank wrote: ↑Tue 19 May 2020 8:22 am
Looks like a syntax error with the command you used - instead of looking for "22222" in the output from netstat it is looking for the file named "22222" which isn't what you wanted.
How can I determine then what the problem is with this 22222 port? Until then, my weather station is offline. It needs to communicate apparently with the 22222 port via IP address 192.168.0.102. This weather station has been operating since 2013, the last year in a new location. It has just been in the recent week this problem has cropped up. I am totally baffled as to the issue and will appreciate any help I can get.

Re: TCP Port in Station Settings already in use
Posted: Tue 19 May 2020 5:27 pm
by freddie
You need to type in the command Jank supplied correctly. You must've made a mistake with your typing otherwise it would have worked correctly.
Re: TCP Port in Station Settings already in use
Posted: Tue 19 May 2020 5:38 pm
by aznetcowboy
I thought I was typing it in correctly, but tried it once more and got the following this time:
TCP 192.168.0.3:59027 192.168.0.102 ESTABLISHED 10092
Now, just what does this tell me?bbb

Re: TCP Port in Station Settings already in use
Posted: Tue 19 May 2020 5:49 pm
by freddie
It means that something is indeed listening on port 22222 and that a connection is established between 192.168.0.3 and 192.168.0.102. So you will either need to change the port that Cumulus uses or shut down whatever is listening on 22222. I think there is a setting in the Cumulus.ini file that you can change to make it use another port (hint: search that file for 22222). There is a section in the Wiki that covers this.
Re: TCP Port in Station Settings already in use
Posted: Tue 19 May 2020 7:49 pm
by sfws
freddie wrote: ↑Tue 19 May 2020 5:49 pm
I think there is a setting in the Cumulus.ini file that you can change to make it use another port (hint: search that file for 22222). There is a section in the Wiki that covers this
Yes, Freddie, the Wiki reference is
https://cumuluswiki.org/a/Cumulus.ini#D ... _specific: Essentially there is the following line in the [Station] section of the settings file to edit.
VP2TCPPort=22222
Re: TCP Port in Station Settings already in use
Posted: Tue 19 May 2020 8:32 pm
by mcrossley
aznetcowboy wrote: ↑Tue 19 May 2020 5:38 pm
I thought I was typing it in correctly, but tried it once more and got the following this time:
TCP 192.168.0.3:59027 192.168.0.102 ESTABLISHED 10092
Now, just what does this tell me?bbb
The last field - 10092 here - is the Process ID (PID) of whatever is using the port. To lookup the process name you could use this command...
Re: TCP Port in Station Settings already in use
Posted: Tue 19 May 2020 8:37 pm
by mcrossley
Though that line you posted does not contain the port 22222 !
TCP 192.168.0.3:
59027
Shows something listening on port 59027 ?
Are you sure you're sure you are typing the command correctly?

Re: TCP Port in Station Settings already in use
Posted: Tue 19 May 2020 9:28 pm
by aznetcowboy
I find nothing under either 10092 or 59027. The result of the tasklist is it finds "No tasks are running which match the specified criteria". This gets more confusing as time goes on.

Re: TCP Port in Station Settings already in use
Posted: Wed 20 May 2020 3:45 am
by aznetcowboy
Ah- ha! I think I found it. It was that the router was working with 1 192.168.1.x and I had my settings, so I thought, set to 192.168.0.x. While I was working with 192.168.0.102 for the Davis Weatherlink, the router was using 192.168.1.2. Once I caught that through pinging my settings, the light went on. So I went into the Station setup and changed the 0.102 to 1.2 and made sure the router was indeed seeing the Davis weatherlink now and it was! Ever since I starting using my system, it was a 0.x settings. The old router needed to be replaced and the new one wanted to be 1.x. I thought I had changed it to 0.x, but it stayed at 1.x. All is find on that front now.

Re: TCP Port in Station Settings already in use
Posted: Wed 20 May 2020 3:10 pm
by aznetcowboy
I was jumping for joy too soon. The only problem I have now is that my weather PC can ping everything except 192.168.1.2 which is what is required for Cumulus to get the reading for transmission to my website. My Davis Vantage Pro2 console is showing all the data from the ISS. The main computer will ping the 192.168.1.2 with no problem. For some reason my weather PC cannot ping or find the Davis Weatherlink. I have double-checked the connections and according to the Davis manual everything is good. It has worked int he past. Before I call the Davis Tech Support, any suggestions on this error.
Re: TCP Port in Station Settings already in use
Posted: Wed 20 May 2020 7:54 pm
by water01
Does your weather have a fixed IP on your old network (i.e. 192.168.0.xx), if so that will be the problem? You need to look at the TCP/IPv4 parameters for your Ethernet / Wifi connection and either let the router allocate an IP via DHCP or alter it to a 192.168.1.xxx IP address.