Upgrade ISPconfig from Ubuntu 20.04 to Ubuntu 22.04

Discussion in 'Installation/Configuration' started by PilouFace, May 30, 2023.

  1. PilouFace

    PilouFace New Member

    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Ubuntu 22.04.2 LTS
    
    [INFO] uptime:  09:44:19 up 1 day, 14:23,  2 users,  load average: 0.07, 1.94, 3.30
    
    [INFO] memory:
                   total        used        free      shared  buff/cache   available
    Mem:           1.9Gi       491Mi       997Mi       6.0Mi       487Mi       1.3Gi
    Swap:             0B          0B          0B
    
    [INFO] systemd failed services status:
      UNIT                      LOAD   ACTIVE SUB    DESCRIPTION
    ● apache2.service           loaded failed failed The Apache HTTP Server
    ● clamav-daemon.service     loaded failed failed Clam AntiVirus userspace daemon
    ● snap.lxd.activate.service loaded failed failed Service for snap application lxd.activate
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    3 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.9p1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 8.1.2-1ubuntu2.11
    [INFO] php-cgi (used for cgi php in default vhost!) is version 8.1.2
    
    ##### PORT CHECK #####
    
    [WARN] Port 8080 (ISPConfig) seems NOT to be listening
    [WARN] Port 8081 (ISPConfig Apps) seems NOT to be listening
    [WARN] Port 80 (Webserver) seems NOT to be listening
    [WARN] Port 443 (Webserver SSL) seems NOT to be listening
    
    Hey,
    so i followed these steps here : howtoforge/update-the-ispconfig-perfect-server-from-ubuntu-20-04-to-ubuntu-22-04/
    At steps 4 i have errors related to php being deperecated and on steps five i can't access ispconfig because apache is returning syntax error in his config for php.
    I'm unable to configure the new PHP paths as instructed in Step 5 because I can't access ISPConfig due to Apache failing to start.
    I was never able to get the antivirus for mail working.
     
    Last edited: May 30, 2023
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Can you check whether you have done all things in steps #3 by doing it again? This last part is necessary as I did it anyway and I checked all other php version packages too, just in case:
    Continue to do steps #4, #5 and #6 again thereafter without missing any thing. Do note especially:
     
  3. PilouFace

    PilouFace New Member

    With step for i have :
    Code:
    root@mail:~# 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 Tue 2023-05-30 12:09:57 UTC; 43s ago
           Docs: https://httpd.apache.org/docs/2.4/
        Process: 465104 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
            CPU: 38ms
    
    May 30 12:09:57 mail.****.online systemd[1]: Starting The Apache HTTP Server...
    May 30 12:09:57 mail.****.online apachectl[465108]: apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache>
    May 30 12:09:57 mail.****.online apachectl[465104]: Action 'start' failed.
    May 30 12:09:57 mail.****.online apachectl[465104]: The Apache error log may have more information.
    May 30 12:09:57 mail.****.online systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    May 30 12:09:57 mail.****.online systemd[1]: apache2.service: Failed with result 'exit-code'.
    May 30 12:09:57 mail.****.online systemd[1]: Failed to start The Apache HTTP Server.
    
    I installed php 7.4
     
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Check your apache2.conf file for error as mentioned in there.

    Installing php7.4 and checking for all other php version packages is just optional. The reason I asked you to redo things in step #3 is to make sure you didn't miss any. So far your earlier report clearly said you have the right php for your Ubuntu 22.04 server.

    An extra and last note: Try creating swap. With your minimal amount of RAM, I am pretty sure you need it to run your server properly.
     
  5. PilouFace

    PilouFace New Member

    The line that has a problem is :
    Code:
    IncludeOptional mods-enabled/*.load
    Can you tell me how to do the swap ?
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Try Internet Search Engines with
    Code:
    ubuntu 22.04 add swap
    or
    Code:
    how to add swap on ubuntu
     
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The problem may be on previous line or lines, it just detects the error on that line and reports line number. Show context, a few lines before and after that reported line.
     
  8. PilouFace

    PilouFace New Member

    Here is the place :
    Code:
    # ErrorLog: The location of the error log file.
    # If you do not specify an ErrorLog directive within a <VirtualHost>
    # container, error messages relating to that virtual host will be
    # logged here.  If you *do* define an error logfile for a <VirtualHost>
    # container, that host's errors will be logged there and not here.
    #
    ErrorLog ${APACHE_LOG_DIR}/error.log
    
    #
    # LogLevel: Control the severity of messages logged to the error_log.
    # Available values: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the log level for particular modules, e.g.
    # "LogLevel info ssl:warn"
    #
    LogLevel warn
    
    # Include module configuration:
    IncludeOptional mods-enabled/*.load
    IncludeOptional mods-enabled/*.conf
    
    # Include list of ports to listen on
    Include ports.conf
    
    
     
  9. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I am not sure this exists, as I have ditched apache2 for nginx more than 7 years ago, but, in my mind, it may not, so I'd suggest disabling it / commenting it out, if so.
     
  10. PilouFace

    PilouFace New Member

    After commenting the line i have this error :
    Code:
    × apache2.service - The Apache HTTP Server
         Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
         Active: failed (Result: exit-code) since Tue 2023-05-30 15:16:27 UTC; 14s ago
           Docs: https://httpd.apache.org/docs/2.4/
        Process: 478214 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
            CPU: 28ms
    
    May 30 15:16:26 mail.****.online systemd[1]: Starting The Apache HTTP Server...
    May 30 15:16:27 mail.****.online apachectl[478217]: AH00534: apache2: Configuration error: No MPM loaded.
    May 30 15:16:27 mail.****.online apachectl[478214]: Action 'start' failed.
    May 30 15:16:27 mail.****.online apachectl[478214]: The Apache error log may have more information.
    May 30 15:16:27 mail.****.online systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    May 30 15:16:27 mail.****.online systemd[1]: apache2.service: Failed with result 'exit-code'.
    May 30 15:16:27 mail.****.online systemd[1]: Failed to start The Apache HTTP Server.
    root@mail:~#
    
     
  11. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Last edited: May 30, 2023
  12. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    So, what is in Apache error log?
    The syntax error may be in one of the files in /etc/apache2/mods-enabled/ -directory, that the IncludeOptinal tries to load. Or maybe the enabled mod is not installed?
     
    ahrasis likes this.
  13. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    the issue is not having
    Code:
    # Include module configuration:
    IncludeOptional mods-enabled/*.load
    IncludeOptional mods-enabled/*.conf
    
    in your apache2.conf file, i have the same in mine, and it's been working perfectly fine for ages.
    although it's possible you have a hidden character or something in there, which might be worth checking for.

    your posted snippet also shows:
    Code:
    May 30 12:09:57 mail.****.online apachectl[465108]: apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache>
    
    a syntax error on line 3, although it's cut off, so we can't see what file.
    it may be that you have a problem, maybe an opening quote or other character that gets closed somewhere on or before line 146 and causes the later error.
     
    ahrasis likes this.
  14. PilouFace

    PilouFace New Member

    The fact that it was working before the upgrade is weird.
     
  15. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    It is not at all weird. Different version of an application may need different configuration settings.
     
    ahrasis likes this.
  16. PilouFace

    PilouFace New Member

    Code:
     apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.4.load: Cannot load /usr/lib/apache2/modules/libphp7.4.so into server: /usr/lib/apache2/modules/libphp7.4.so: cannot open shared object file: No such file or directory
    Here is what makes apache fail to start.
     
  17. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Have you disabled php7.4 module and enabled php8.1 module for apache2? Again, I don't use apache2.
     
    Last edited: Jun 1, 2023
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Run:

    a2dismod php7.4
    service apache2 restart
     
    PilouFace and ahrasis like this.
  19. PilouFace

    PilouFace New Member

    So now it is working, i updated all in ispconfig panel.
    But now my roundcube page do not exist. When i get access to it i have :
    Code:
    Not Found
    The requested URL was not found on this server.
    
    Thanks for the help so far !
     
  20. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    So, what is now in Apache log? Check other log files that have recent time stamp.
    Run the common issues script again just in case.
     

Share This Page