Page 1 of 1

CumulusMX refuses to open port.

Posted: Wed 02 Nov 2022 7:17 pm
by ConligWX
So the other day I update my Intel NUC running ubuntu 22.04.1LTS which is home to my CumulusMX install.

packages that updated:

Code: Select all

Start-Date: 2022-10-31  21:51:38
Commandline: apt upgrade
Install: python3-magic:amd64 (2:0.4.24-2, automatic)
Upgrade: sosreport:amd64 (4.3-1ubuntu2.1, 4.4-1ubuntu1.22.04.1), tzdata:amd64 (2022c-0ubuntu0.22.04.0, 2022e-0ubuntu0.22.04.0), libfwupd2:amd64 (1.7.5-3, 1.7.9-1~22.04.1), snapd:amd64 (2.56.2+22.04ubuntu1, 2.57.5+22.04), linux-firmware:amd64 (20220329.git681281e4-0ubuntu3.5, 20220329.git681281e4-0ubuntu3.6), sudo:amd64 (1.9.9-1ubuntu2, 1.9.9-1ubuntu2.1), libfwupdplugin5:amd64 (1.7.5-3, 1.7.9-1~22.04.1), fwupd:amd64 (1.7.5-3, 1.7.9-1~22.04.1)
End-Date: 2022-10-31  21:52:46
since then - as far as I can tell - CumulusMX has no webgui on port 8998 or any I define. tried numberous devices to access the webport but nothing was showing in any browser i used.

Cumulusmx is running as a service and working without any intervention, just I cannot access the webgui.

My intel NUC is headless (no keyboard or mouse or screen) and has always worked fine until now. I have tried starting cumulus service with different ports but is just never opens the port for listening on.

There is no firewall. but see below no 8998 port is open or listening.

Code: Select all

root@cumulusmx:/CumulusMX# sudo lsof -i -P -n
COMMAND     PID            USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
upsmon      753             nut    4u  IPv4  24529      0t0  TCP xxx.xxx.xxx.10:52390->xxx.xxx.xxx.60:3493 (ESTABLISHED)
apache2     922            root    3u  IPv4  27824      0t0  TCP *:80 (LISTEN)
apache2    8978        www-data    3u  IPv4  27824      0t0  TCP *:80 (LISTEN)
apache2    8979        www-data    3u  IPv4  27824      0t0  TCP *:80 (LISTEN)
sshd      13046            root    4u  IPv4 301579      0t0  TCP xxx.xxx.xxx.10:22->xxx.xxx.xxx.xxx:51395 (ESTABLISHED)
ntpd      24219             ntp   16u  IPv4 309425      0t0  UDP *:123
ntpd      24219             ntp   17u  IPv4 309430      0t0  UDP 127.0.0.1:123
ntpd      24219             ntp   18u  IPv4 309432      0t0  UDP xxx.xxx.xxx.10:123
ntpd      24219             ntp   19u  IPv4 309434      0t0  UDP xx.xxx.xx.xx:123
sshd      24239            root    3u  IPv4 308147      0t0  TCP *:22 (LISTEN)
systemd-n 24270 systemd-network   18u  IPv4 305142      0t0  UDP xxx.xxx.xxx.10:68
systemd-r 24277 systemd-resolve   13u  IPv4 312328      0t0  UDP 127.0.0.53:53
systemd-r 24277 systemd-resolve   14u  IPv4 312329      0t0  TCP 127.0.0.53:53 (LISTEN)
mariadbd  24312           mysql   21u  IPv4 309646      0t0  TCP 127.0.0.1:3306 (LISTEN)
mariadbd  24312           mysql   42u  IPv4 312917      0t0  TCP 127.0.0.1:3306->127.0.0.1:34758 (ESTABLISHED)
mono      24754            root   14u  IPv4 313095      0t0  TCP xxx.xxx.xxx.10:42428->xx.xxx.xx.xx:80 (ESTABLISHED)
mono      24754            root   17u  IPv4 312900      0t0  UDP *:5353
mono      24754            root   18u  IPv4 312908      0t0  UDP *:5353
mono      24754            root   19u  IPv4 310967      0t0  TCP xxx.xxx.xxx.10:58784->xxx.xxx.xxx.60:21 (ESTABLISHED)
mono      24754            root   21u  IPv4 312914      0t0  TCP xxx.xxx.xxx.10:58406->xxx.xxx.xxx.77:80 (ESTABLISHED)
mono      24754            root   22u  IPv4 312913      0t0  UDP *:22222
mono      24754            root   23u  IPv4 311056      0t0  TCP xxx.xxx.xxx.10:36012->xx.xxx.xx.xx:443 (ESTABLISHED)
mono      24754            root   24u  IPv4 310969      0t0  TCP 127.0.0.1:34758->127.0.0.1:3306 (ESTABLISHED)
mono      24754            root   25u  IPv4 311064      0t0  TCP xxx.xxx.xxx.10:57766->xxx.xx.xxx.116:14580 (SYN_SENT)
mono      24754            root   30u  IPv4 311060      0t0  TCP xxx.xxx.xxx.10:55392->xx.xxx.xxx.xxx:80 (ESTABLISHED)
mono      25027            root   10u  IPv4 314620      0t0  TCP xxx.xxx.xxx.10:52924->xxx.xx.xxx.3:443 (ESTABLISHED)
mono      25027            root   15u  IPv4 314093      0t0  TCP xxx.xxx.xxx.10:59686->xx.xx.xx.xxx:443 (ESTABLISHED)
mono      25027            root   16u  IPv4 314094      0t0  TCP xxx.xxx.xxx.10:44934->3.xx.xxx.xxx:443 (ESTABLISHED)
mono      25027            root   18u  IPv4 314100      0t0  UDP *:5353

Code: Select all

root@cumulusmx:/CumulusMX# netstat -tulnap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      684/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      892/sshd: /usr/sbin
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      920/apache2
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      891/mariadbd
tcp        0      0 xxx.xxx.xxx.10:58892      xxx.xxx.xxx.60:55863      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:35904      xxx.xxx.xxx.60:55967      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:44044      xxx.xxx.xxx.60:56214      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:57090      xx.xx.xx.xx:80        TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:43606      xxx.xxx.xxx.60:55567      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:48274      xxx.xxx.xxx.60:55971      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:36904      xx.xx.xx.xx:443        TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:47492      xxx.xxx.xxx.60:3493       ESTABLISHED 752/upsmon
tcp        0      0 xxx.xxx.xxx.10:37916      xxx.xxx.xxx.60:55555      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:41560      xxx.xxx.xxx.60:56220      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:22         xxx.xxx.xxx.51:53078      ESTABLISHED 1600/sshd: root@not
tcp        0      0 xxx.xxx.xxx.10:36162      xxx.xxx.xxx.60:55603      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:49018      xxx.xxx.xxx.60:56233      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:47364      xxx.xxx.xxx.60:56460      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:42228      xxx.xxx.xxx.60:56036      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:56426      xxx.xxx.xxx.60:55559      TIME_WAIT   -
tcp        0      0 127.0.0.1:59822         127.0.0.1:3306          ESTABLISHED 1678/mono
tcp        0      0 xxx.xxx.xxx.10:42030      xxx.xxx.xxx.60:56149      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:51394      xxx.xxx.xxx.60:56227      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:39692      xxx.xxx.xxx.60:55931      TIME_WAIT   -
tcp        0      0 127.0.0.1:3306          127.0.0.1:59822         ESTABLISHED 891/mariadbd
tcp        0      0 xxx.xxx.xxx.10:51116      xxx.xxx.xxx.13:80         TIME_WAIT   -
tcp        0    640 xxx.xxx.xxx.10:22         xxx.xxx.xxx.51:52983      ESTABLISHED 1508/sshd: root@pts
tcp        0      0 xxx.xxx.xxx.10:41572      xxx.xxx.xxx.60:56220      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:44828      xx.xx.xx.xx:80         ESTABLISHED 1678/mono
tcp        0      0 xxx.xxx.xxx.10:58062      xx.xx.xx.xx:80        ESTABLISHED 1678/mono
tcp        0      0 xxx.xxx.xxx.10:57542      xxx.xxx.xxx.60:56026      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:42072      xxx.xxx.xxx.13:80         TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:51178      xxx.xxx.xxx.60:56422      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:47090      xxx.xxx.xxx.60:21         ESTABLISHED 1678/mono
tcp        0      0 xxx.xxx.xxx.10:36710      xxx.xxx.xxx.60:56459      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:33074      xxx.xxx.xxx.60:55883      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:57242      xxx.xxx.xxx.60:55668      TIME_WAIT   -
tcp        0      0 xxx.xxx.xxx.10:54666      xxx.xxx.xxx.12:80         ESTABLISHED 1678/mono
udp        0      0 127.0.0.53:53           0.0.0.0:*                           684/systemd-resolve
udp        0      0 xxx.xxx.xxx.10:68         0.0.0.0:*                           682/systemd-network
udp        0      0 10.8.0.1:123            0.0.0.0:*                           770/ntpd
udp        0      0 xxx.xxx.xxx.10:123        0.0.0.0:*                           770/ntpd
udp        0      0 127.0.0.1:123           0.0.0.0:*                           770/ntpd
udp        0      0 0.0.0.0:123             0.0.0.0:*                           770/ntpd
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1678/mono
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1678/mono
udp        0      0 0.0.0.0:22222           0.0.0.0:*                           1678/mono

Code: Select all

● cumulusmx.service - CumulusMX service
     Loaded: loaded (/etc/systemd/system/cumulusmx.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-11-02 18:29:46 GMT; 46min ago
       Docs: https://cumuluswiki.org/a/Main_Page
    Process: 803 ExecStart=/usr/bin/mono-service -d:/CumulusMX CumulusMX.exe -service (code=exited, status=0/SUCCESS)
   Main PID: 805 (mono)
      Tasks: 19 (limit: 18569)
     Memory: 145.8M
        CPU: 7min 10.705s
     CGroup: /system.slice/cumulusmx.service
             └─805 /usr/bin/mono /usr/lib/mono/4.5/mono-service.exe -d:/CumulusMX CumulusMX.exe -service

Nov 02 18:29:46 cumulusmx systemd[1]: Starting CumulusMX service...
Nov 02 18:29:46 cumulusmx systemd[1]: Started CumulusMX service.
root@cumulusmx:/CumulusMX#
mono is 6.8.0.105.
CumulusMX (3.22.2-b3213)

not sure if anyone can suggest anything else or understand why cumulusMX would not open the 8998 port (by default) or any other that is defined.

looks like I'll be rebuilding the NUC over the weekend since I have no clue as to what is happening and its the only thing I can think of doing :roll: .


could someone post their output from a linux box running cumulusmx from this command just to confirm you see a port 8998 listening?

Code: Select all

lsof -i -P -n
or

Code: Select all

netstat -tulnap

Re: CumulusMX refuses to open port.

Posted: Wed 02 Nov 2022 7:55 pm
by freddie
Here's mine:

Code: Select all

COMMAND    PID            USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
systemd-r  192 systemd-resolve   13u  IPv4   44386      0t0  UDP 127.0.0.53:53
systemd-r  192 systemd-resolve   14u  IPv4   44387      0t0  TCP 127.0.0.53:53 (LISTEN)
mono       211            root    9u  IPv4 1504335      0t0  TCP x.x.x.x:50334->x.x.x.x:3306 (ESTABLISHED)
mono       211            root   14u  IPv6   53431      0t0  TCP *:8998 (LISTEN)
mono       211            root   16u  IPv4 1674121      0t0  TCP x.x.x.x:45838->x.x.x.x:80 (CLOSE_WAIT)
mono       211            root   19u  IPv4 1428435      0t0  TCP 1x.x.x.x:47980->x.x.x.x:3306 (ESTABLISHED)
mono       211            root   20u  IPv4 1675987      0t0  TCP 1x.x.x.x:56424->x.x.x.x2:80 (ESTABLISHED)
mono       211            root   21u  IPv4 1674776      0t0  TCP x.x.x.x:38394->x.x.x.x3:443 (ESTABLISHED)
mono       211            root   32u  IPv4 1674784      0t0  TCP 1x.x.x.x:46630->x.x.x.x:80 (ESTABLISHED)
mono       254        www-data    5u  IPv4   50457      0t0  TCP *:8084 (LISTEN)
sshd       271            root    3u  IPv4   44991      0t0  TCP *:22 (LISTEN)
sshd       271            root    4u  IPv6   44993      0t0  TCP *:22 (LISTEN)
apache2    377            root    4u  IPv6   41888      0t0  TCP *:80 (LISTEN)
apache2    377            root    6u  IPv6   41896      0t0  TCP *:443 (LISTEN)
apache2   7841        www-data    4u  IPv6   41888      0t0  TCP *:80 (LISTEN)
apache2   7841        www-data    6u  IPv6   41896      0t0  TCP *:443 (LISTEN)
apache2   7842        www-data    4u  IPv6   41888      0t0  TCP *:80 (LISTEN)
apache2   7842        www-data    6u  IPv6   41896      0t0  TCP *:443 (LISTEN)

Re: CumulusMX refuses to open port.

Posted: Wed 02 Nov 2022 7:59 pm
by ConligWX
thanks at least i can see a port 8998 in use. think its down to a rebuild then. I cannot say for certain the apt upgrade broken it, but mono was not upgraded, and cant see why port 8998 is not open.

Re: CumulusMX refuses to open port.

Posted: Wed 02 Nov 2022 8:27 pm
by freddie
Have you rebooted since the update? I see you had some firmware update updates in there...

Re: CumulusMX refuses to open port.

Posted: Wed 02 Nov 2022 9:02 pm
by ConligWX
yes done numerous things and was chatting with a few friends who both posted their outputs too.

Code: Select all

mono       1024     root    9u  IPv6    23876      0t0  TCP *:8998 (LISTEN)
yours was similar.

IPv6 was the thing that stuck out for me.

I have had ipv6 disabled from years ago. never used it, but always disabled. I just reenable it (though took some time in how I had disabled prior to this)

it now works!

why I have no idea, it seems pretty stupid that I am accessing an IPv4 address to the cumulusMX box but I have to have IPv6 enabled on the CumulusMX box for it to work!

if anyone has a similar problem then this worked for me.

Code: Select all

Edit /etc/default/grub 
Change GRUB_CMDLINE_LINUX="ipv6.disable=1" to GRUB_CMDLINE_LINUX="ipv6.disable=0" and save the file.
Update Grub by running: sudo update-grub2
Reboot the PC

you may also need to do:

Execute:sudo sh -c "echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6" 
Reboot once more and you are done.

Re: CumulusMX refuses to open port.

Posted: Wed 02 Nov 2022 9:54 pm
by freddie
IPv6 type with an IPv4 address - weird! I can't assign an IPv6 on my database server because MX running in mono refused to connect to it - well, that was the case a year or so ago, I haven't tried recently. Mono can be a bit odd!

Re: CumulusMX refuses to open port.

Posted: Thu 03 Nov 2022 12:12 pm
by philpugh
Here are the relevant items from my system. I run three instances of CMX (on ports 8998, 9889, 9898) and all are IP6 connections.
System is a PI4 BULLSEYE with MONO V 6.12.0.182

$ netstat -tulnap
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

mono 12859 root 11u IPv4 15060104 0t0 TCP 127.0.0.1:58950->127.0.0.1:3306 (ESTABLISHED)
mono 12859 root 15u IPv6 14341680 0t0 TCP *:8998 (LISTEN)
mono 12859 root 17u IPv4 14341683 0t0 TCP 192.168.1.57:37866->192.168.1.201:45000 (ESTABLISHED)
mono 12859 root 18u IPv4 15058584 0t0 TCP 127.0.0.1:58964->127.0.0.1:3306 (ESTABLISHED)
mono 12859 root 20u IPv4 15060105 0t0 TCP 192.168.1.57:40652->35.241.28.33:443 (ESTABLISHED)
mono 12859 root 22u IPv4 15060107 0t0 TCP 192.168.1.57:34204->18.165.201.82:80 (ESTABLISHED)
mono 23324 root 11u IPv4 15060109 0t0 TCP 127.0.0.1:58980->127.0.0.1:3306 (ESTABLISHED)
mono 23324 root 15u IPv6 13949239 0t0 TCP *:9889 (LISTEN)
mono 23324 root 17u IPv4 13949242 0t0 TCP 192.168.1.57:48702->192.168.1.42:45000 (ESTABLISHED)
mono 23324 root 18u IPv4 15058586 0t0 TCP 127.0.0.1:58986->127.0.0.1:3306 (ESTABLISHED)
mono 23544 root 10u IPv4 15058583 0t0 TCP 127.0.0.1:58940->127.0.0.1:3306 (ESTABLISHED)
mono 23544 root 14u IPv6 13950600 0t0 TCP *:9898 (LISTEN)
mono 23544 root 16u IPv4 13950603 0t0 TCP 192.168.1.57:34040->192.168.1.59:45000 (ESTABLISHED)
mono 23544 root 17u IPv4 15059332 0t0 TCP 127.0.0.1:58948->127.0.0.1:3306 (ESTABLISHED)


Phil

Re: CumulusMX refuses to open port.

Posted: Thu 03 Nov 2022 3:34 pm
by freddie
Yeah I use IPv6 too. My point was that MX running under mono won't connect to my DB server if that has an IPv6 address. No issues at all connecting to MX interface through an IPv6 connection.

Re: CumulusMX refuses to open port.

Posted: Thu 03 Nov 2022 8:57 pm
by ConligWX
Thanks for the posts guys I’m guessing something in the Linux kernel firmware update changed and having ipv6 disabled blocked mono from opening the 8998 port.

Still seems weird for years it worked with just ipv4 only however. Mono itself was not updated so it must have been another program that broken the sequence.

Re: CumulusMX refuses to open port.

Posted: Fri 04 Nov 2022 10:23 pm
by ConligWX
freddie wrote: Wed 02 Nov 2022 9:54 pm IPv6 type with an IPv4 address - weird! I can't assign an IPv6 on my database server because MX running in mono refused to connect to it - well, that was the case a year or so ago, I haven't tried recently. Mono can be a bit odd!
I think this is down to what is known as "Dual Mode Sockets" from what I have gathered and discussed with a friend of mine. not sure how my CumulusMX box changed the ipv4 to ipv6 scenario after an update which mono was not updated, but something changed none the less.

more info here: https://devblogs.microsoft.com/dotnet/d ... ket-again/

I maybe barking up the wrong tree, but I dont really understand most of it. its all above my pay grade :lol:

I've now moved to mono 6.12.0 Stable for now.

Re: CumulusMX refuses to open port.

Posted: Sat 05 Nov 2022 6:46 am
by freddie
ConligWX wrote: Fri 04 Nov 2022 10:23 pm
freddie wrote: Wed 02 Nov 2022 9:54 pm IPv6 type with an IPv4 address - weird! I can't assign an IPv6 on my database server because MX running in mono refused to connect to it - well, that was the case a year or so ago, I haven't tried recently. Mono can be a bit odd!
I think this is down to what is known as "Dual Mode Sockets" from what I have gathered and discussed with a friend of mine. not sure how my CumulusMX box changed the ipv4 to ipv6 scenario after an update which mono was not updated, but something changed none the less.

more info here: https://devblogs.microsoft.com/dotnet/d ... ket-again/

I maybe barking up the wrong tree, but I dont really understand most of it. its all above my pay grade :lol:

I've now moved to mono 6.12.0 Stable for now.
Thanks Simon, that is useful.

Good idea to upgrade Mono as you did, as the email function in MX requires > 6.8 now. You likely don't use it anyway, otherwise you would've noticed before now :lol:

It's very likely that the behaviour of the OS function that Mono uses to get a socket has changed with the recent Linux changes. So many use dual IP stack these days that it may have become the default behaviour to expect both IPv4 and IPv6.

Re: CumulusMX refuses to open port.

Posted: Sat 05 Nov 2022 7:26 pm
by mcrossley
I'll see if I can find the code for the HTTP server version that CMX is currently using.

The latest .Net builds just bind to the IPv6 interface if it is available - and this automagically also enables IPv4 if it is enabled on the host.

CMX is using the .Net Framework builds which I believe work a bit differently (and with more complexity) behind the scenes.