Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.6.10 (build 3086) - 24 June 2020 (please see important announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

See the Wiki to download the software or click on the Downloads link in the Forum Banner.

System.Net.Sockets.SocketException: Address already in use

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Post Reply
oman4eva
Posts: 23
Joined: Wed 23 Oct 2013 4:42 pm
Weather Station: davis vantage pro 2 plus
Operating System: windows 7
Location: Canada

System.Net.Sockets.SocketException: Address already in use

Post by oman4eva »

Hi,

I'm trying to get CumulusMX working with my Linux machine (Linux Mint 17 Cinnamon 64 bit). I was able to get the web page up and running but then when i went and set up the settings for my Davis VP2+ station and restarted the service i get the error (i've removed user/ip details)


I believe this is a comm port problem, it looks like it's coded in comm ports in Windows format, e.g comm 1, not linux format /dev/ttyUSB0

I assume this has already been discussed but couldn't find it. Any tips??

thanks
oman


user@user-Linux ~/Documents/CumulusMX $ sudo mono CumulusMX.
CumulusMX.exe CumulusMX.exe.config CumulusMX.pdb
user@user-Linux ~/Documents/CumulusMX $ sudo mono CumulusMX.exe
Current culture: English (Canada)
Serial: 911AAB380CE02A60C48EBEF57335DF17
Cumulus MX v.3.0.0 build 3025
This is pre-release beta software
Station type not set
Cumulus running at: http://*:8998/
(Replace * with any IP address on this machine, or localhost)
Starting web socket server on port 8002
2015-07-09 1:18:17 PM
Type Ctrl-C to terminate
^[[A^[[D
*

my.ip.address
^C
Cumulus terminating
user@user-Linux ~/Documents/CumulusMX $ sudo mono CumulusMX.exe
Current culture: English (Canada)
Serial: 911AAB380CE02A60C48EBEF57335DF17
Cumulus MX v.3.0.0 build 3025
This is pre-release beta software
Station type not set
Cumulus running at: http://*:8998/
(Replace * with any IP address on this machine, or localhost)
Starting web socket server on port 8002
2015-07-09 1:20:42 PM
Type Ctrl-C to terminate
Connected From : my.ip.address:45149
Disconnect From : my.ip.address:45149
*** Station type changed, restart required ***
Connected From : my.ip.address:45151
Connected From : my.ip.address:45154
Disconnect From : my.ip.address:45151
Connected From : my.ip.address:45156
Disconnect From : my.ip.address:45154
Connected From : my.ip.address:45163
Disconnect From : my.ip.address:45156
^C
Cumulus terminating
user@user-Linux ~/Documents/CumulusMX $ sudo mono CumulusMX.exe
Current culture: English (Canada)
Serial: 911AAB380CE02A60C48EBEF57335DF17
Cumulus MX v.3.0.0 build 3025
This is pre-release beta software
Today.ini = data/today.ini
Last update=2015-07-09 1:25:58 PM
Unable to connect to station
System.IO.IOException: Bad file descriptor
at System.IO.Ports.SerialPortStream.ThrowIOException () [0x00000] in <filename unknown>:0
at System.IO.Ports.SerialPortStream.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0
at System.IO.Ports.SerialPortStream.Finalize () [0x00000] in <filename unknown>:0
**** An error has occurred - please zip up the MXdiags folder and post it in the forum ****
Press Enter to terminate
Cumulus running at: http://*:8998/
(Replace * with any IP address on this machine, or localhost)
Starting web socket server on port 8002
2015-07-09 1:25:58 PM
Type Ctrl-C to terminate

[1]+ Stopped sudo mono CumulusMX.exe
user@user-Linux ~/Documents/CumulusMX $ sudo mono CumulusMX.exe
Current culture: English (Canada)
Serial: 911AAB380CE02A60C48EBEF57335DF17
Cumulus MX v.3.0.0 build 3025
This is pre-release beta software
Today.ini = data/today.ini
Last update=2015-07-09 1:26:15 PM
Unable to connect to station
System.IO.IOException: Bad file descriptor
at System.IO.Ports.SerialPortStream.ThrowIOException () [0x00000] in <filename unknown>:0
at System.IO.Ports.SerialPortStream.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0
at System.IO.Ports.SerialPortStream.Finalize () [0x00000] in <filename unknown>:0
**** An error has occurred - please zip up the MXdiags folder and post it in the forum ****
Press Enter to terminate
System.Net.Sockets.SocketException: Address already in use
at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x00000] in <filename unknown>:0
at System.Net.EndPointListener..ctor (System.Net.IPAddress addr, Int32 port, Boolean secure) [0x00000] in <filename unknown>:0
at System.Net.EndPointManager.GetEPListener (System.String host, Int32 port, System.Net.HttpListener listener, Boolean secure) [0x00000] in <filename unknown>:0
at System.Net.EndPointManager.AddPrefixInternal (System.String p, System.Net.HttpListener listener) [0x00000] in <filename unknown>:0
at System.Net.EndPointManager.AddListener (System.Net.HttpListener listener) [0x00000] in <filename unknown>:0
**** An error has occurred - please zip up the MXdiags folder and post it in the forum ****
Press Enter to terminate
424;1R
[2]+ Stopped sudo mono CumulusMX.exe
You do not have the required permissions to view the files attached to this post.

oman4eva
Posts: 23
Joined: Wed 23 Oct 2013 4:42 pm
Weather Station: davis vantage pro 2 plus
Operating System: windows 7
Location: Canada

Re: System.Net.Sockets.SocketException: Address already in u

Post by oman4eva »

Ok the big dummy here answered his own question. You just type /dev/ttyUSB0 into the comm port settings on the web page....not comm1 or comm0....woops

User avatar
steve
Cumulus Author
Posts: 26704
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: System.Net.Sockets.SocketException: Address already in u

Post by steve »

You need to enter the serial port name on the station settings screen - ideally you would have done this when you configured the station type, rather than leaving it at the default. If it's now crashing before you can get to the user interface, you'll need to do it by editing Cumulus.ini - look for the ComportName setting.

Edit - cross-posted!
Steve

MCQ
Posts: 22
Joined: Sat 11 Jun 2011 11:11 pm
Weather Station: Davis Vantage Pro2
Operating System: Raspbian
Location: Minden, NV USA

Re: System.Net.Sockets.SocketException: Address already in u

Post by MCQ »

I upgraded to MX build 3030 yesterday on a RPi. I copied over my Cumulus data and Cumulus.ini file before starting MX. When I started MX, I kept getting the unable to connect to station message followed shortly thereafter by a crash of MX. I missed the line in the FAQ about changing com ports in the .ini for the RPi, so I went searching in the forum and found this post.

In my Cumulus.ini, there is no ComportName parameter so that was a bit confusing. I was running v1.9.4 build 1085 and had not upgraded to avoid dealing with the HTML 5 and UTF-8 changes. In the build 1085, the serial port parameter is 'Port'. I changed this to 'ComportName', ran dmesg to determine my RPi had assigned port USB0, and then entered '/dev/ttyUSB0' in the ComportName parameter. After this, MX properly connected to my Davis VP2.

Then, I went into the configuration pages and found out the Dashboard and the Now pages would not populate with any data from the station. Anything using historical data was fine. At this point, I figured there must be some other differences in the .ini that were preventing MX from running properly, so I just deleted the old .ini and let MX create a brand new one which I configured from the configuration pages. Everything is working fine now. I thought I would post this information to save someone else some time if they bump into this post with the same problem I had.

Post Reply