Trouble to get my site to work

Discussion in 'Installation/Configuration' started by ralphot, May 22, 2022.

  1. ralphot

    ralphot Member

    Getting this in apache2 error.log:
    apache2: could not open error log file /var/log/ispconfig/httpd/tempuss.mywire.org/error.log.

    What can be wrong?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  3. ralphot

    ralphot Member

    There were many other things that didn't work so I reinstalled the server. I'll be back if something else happens.
    Thanks.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  5. ralphot

    ralphot Member

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Why you are using Ubuntu 18.04? That Ubuntu version is really outdated and should not be used for new installations anymore. use either ubuntu 20.04 with the matching install guide or Debian 11.
     
  7. ralphot

    ralphot Member

    Ok, maybe I could use do-release-upgrade, is that going to work?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    You can do a release upgrad, but take care to update to Ubuntu 20.04 and not 22.04 as 22.04 is not supported yet and will not work. After the release upgrade, you will have to go through the perfect server guide for Ubuntu 20.04 to install missing packages and then do an ISPConfig update with --force option to reconfigure the system. So if your system is still not in active use, a fresh reinstall on Ubuntu 20.04 using the auto-installer https://www.howtoforge.com/ispconfig-autoinstall-debian-ubuntu/ is probably faster than doing a dist upgrade of your current ISPConfig installation.
     
  9. ralphot

    ralphot Member

  10. till

    till Super Moderator Staff Member ISPConfig Developer

    No. I said o use that guide when you decide to do a fresh installation.

    No, this is not about upgrading ISPConfig or Ubuntu.
     
  11. ralphot

    ralphot Member

    Ok, sorry.
     
  12. TonyG

    TonyG Active Member

    In response to the OP:
    ISPConfig creates entries in /etc/fstab to "bind mount" from /var/log/ispconfig/httpd/sitename to /var/www/clients/client_x/site_y/log. There are also subdirectories for subdomains: /var/log/ispconfig/httpd/sitename/subdomain.

    When the site is active, files like error.log are seen in the normal apache log folders, as are symlinks like access.log and yesterday-access.log. When a site is no longer getting traffic, the "current" files like access.log and error.log might be rotated into log archives (typically .gz files). If there was no traffic "yesterday", there will not be a yesterday-access.log.

    When the real files are archived, the (now broken) symlinks remain. I don't think we can expect processes to run through the system to find symlinks to files that we delete. This leads to what we see as /var/log/ispconfig/http/sitename/.../foo.log file showing as "No such file or directory" and "could not open foo log file".

    To see these dead symlinks: cd /var/log, and find . -xtype l
    You may find many more of these if you cd to /var/www/clients (your local website base) and find there. From what I saw these were many dead symlinks in jail/environment folders for FTP users, where there were unupdated symlinks to SSL files that had been changed or removed.

    To remove dead symlinks: find . -xtype l -delete

    I'll leave it to someone with more insight to comment on appropriate precautions. I'm just sharing what I've learned about this specific topic.

    HTH
     
  13. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Won't that remove all symlinks, whether dead or not?
     
    ahrasis likes this.
  14. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Another caution is to beware of chroot path differences, as a symlink could be valid inside the chroot, but point to a nonexistent path outside the chroot.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    And e.g. the log file symlinks get updated automatically when you switch the site to active mode again, so I won't remove any of them manually.
     
  16. ralphot

    ralphot Member

    Thank you. The problems are long gone by now. My Ubuntu is 20.04 and everything works.
     
  17. TonyG

    TonyG Active Member

    @ralphot - I had a similar situation here, researched, found your recent note, and wanted to offer some recent info based on my understanding.

    @Taleman - "Won't that remove all symlinks, whether dead or not?" No, the xtype option has special/confusing behaviours. The "-xtype l" pattern is a commonly referenced solution, and I tried it, so it seemed worthy of noting here.

    @till - "log file symlinks get updated automatically when you switch the site to active mode again, so I won't remove any of them manually." Absolutely, but we didn't know if Ralph had deleted his site or not. In my case I had, so there was no chance of the site going active again. To your point however, just today I was looking at logs for a test site, and while the yesterday-access.log was broken, there was traffic today, which becomes tomorrow's yesterday log - so yes, it's not appropriate to just delete these symlinks when there is any chance of the site still being active.

    Thanks all!
     
  18. ralphot

    ralphot Member

    I completely removed my old Ubuntu 18.04 server and installed a fresh 20.04 with IspConfig and all. Everything works fine now.
     

Share This Page