ubuntu upgrade to 22.04 has lost port 80 for http access

449 views
Skip to first unread message

bgra...@umw.edu

unread,
Sep 3, 2022, 4:47:31 PM9/3/22
to weewx-user
Hello,
I have been running ubuntu 20.04 with the latest weewx for quite a while and no problems with port 80 for local access. The upgrade seemed to go well for everything but apache2 which would not restart. A port scan shows no port 80 is open. Everything else restarted fine (as far as I know). My weewx server FTPs to my web site (grattans.org/wx) and seems to be running ok on the upgraded server. I'm not a programmer and not sure how to interpret some of the error messages. Here are some observations:

- Port #22 (ssh):  listening
- Port #25 (smtp):  listening
- Port #139 (netbios-ssn):  listening
- Port #445 (microsoft-ds):  listening
- Port #3389 (rdp):  listening
- Port #9418 (git):  listening
- Port #10000 (webmin):  listening

bg@n4mrv:~$ sudo netstat -ntlp |grep LISTEN
[sudo] password for bg:
tcp        0      0 127.0.0.1:7001          0.0.0.0:*               LISTEN      2879/nxnode.bin
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      1671/smbd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1587/sshd: /usr/sbi
tcp        1      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1843/master
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      1671/smbd
tcp        0      0 127.0.0.1:12001         0.0.0.0:*               LISTEN      2879/nxnode.bin
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      481/systemd-resolve
tcp        0      0 127.0.0.1:24070         0.0.0.0:*               LISTEN      1641/nxserver.bin
tcp        0      0 0.0.0.0:1880            0.0.0.0:*               LISTEN      1757/node-red
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN      1217/perl
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1719/mysqld
tcp        0      0 0.0.0.0:9418            0.0.0.0:*               LISTEN      809/git-daemon
tcp        0      0 127.0.0.1:3551          0.0.0.0:*               LISTEN      1577/apcupsd
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1448/cupsd
tcp        0      0 127.0.0.1:33060         0.0.0.0:*               LISTEN      1719/mysqld
tcp        0      0 0.0.0.0:4000            0.0.0.0:*               LISTEN      2169/nxd
tcp        0      0 127.0.0.1:6011          0.0.0.0:*               LISTEN      25066/sshd: bg@pts/
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      2696/sshd: bg@pts/0
tcp        0      0 127.0.0.1:1883          0.0.0.0:*               LISTEN      1610/mosquitto
tcp6       0      0 ::1:1883                :::*                    LISTEN      1610/mosquitto
tcp6       0      0 ::1:6010                :::*                    LISTEN      2696/sshd: bg@pts/0
tcp6       0      0 ::1:6011                :::*                    LISTEN      25066/sshd: bg@pts/
tcp6       0      0 :::139                  :::*                    LISTEN      1671/smbd
tcp6       0      0 :::22                   :::*                    LISTEN      1587/sshd: /usr/sbi
tcp6       0      0 :::25                   :::*                    LISTEN      1843/master
tcp6       0      0 :::445                  :::*                    LISTEN      1671/smbd
tcp6       0      0 ::1:631                 :::*                    LISTEN      1448/cupsd
tcp6       0      0 :::10000                :::*                    LISTEN      1217/perl
tcp6       0      0 :::9418                 :::*                    LISTEN      809/git-daemon
tcp6       0      0 ::1:3350                :::*                    LISTEN      1635/xrdp-sesman
tcp6       0      0 ::1:7001                :::*                    LISTEN      2879/nxnode.bin
tcp6       0      0 :::4000                 :::*                    LISTEN      2169/nxd
tcp6       0      0 :::3389                 :::*                    LISTEN      1706/xrdp

systemctl status apache2.service
× apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2022-09-03 15:49:07 EDT; 38s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 3744 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
        CPU: 19ms

Sep 03 15:49:07 n4mrv systemd[1]: Starting The Apache HTTP Server...
Sep 03 15:49:07 n4mrv apachectl[3747]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/m>
Sep 03 15:49:07 n4mrv apachectl[3744]: Action 'start' failed.

Sep 03 15:49:07 n4mrv apachectl[3744]: The Apache error log may have more information.
Sep 03 15:49:07 n4mrv systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Sep 03 15:49:07 n4mrv systemd[1]: apache2.service: Failed with result 'exit-code'.
Sep 03 15:49:07 n4mrv systemd[1]: Failed to start The Apache HTTP Server.

line 140:
# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

weewx.service - weewx weather system
     Loaded: loaded (/etc/systemd/system/weewx.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-09-03 15:47:13 EDT; 46min ago
   Main PID: 956 (weewxd)
      Tasks: 12 (limit: 9318)
     Memory: 128.8M
        CPU: 55.122s
     CGroup: /system.slice/weewx.service
             └─956 /usr/bin/python3 /home/weewx/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /home/weewx/weewx.conf

Thanks in advance. Will be happy to supply any additional info or logs.
Bob

vince

unread,
Sep 3, 2022, 5:11:31 PM9/3/22
to weewx-user
   Sep 03 15:49:07 n4mrv apachectl[3747]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/m>

Obviously you have an error in one of your apache config files, but you didn't provide the full transcript to show which file line 3 it is referencing is for.  I would guess (wild guess) that you're trying to load a file that you didn't actually install in your ubuntu setup.   There are a lot of little dpkgs to use.

(which is another reason I use nginx, it's nice and simple)


Reply all
Reply to author
Forward
0 new messages