Apache 2 will not start. Unable to open logs

Discussion in 'Installation/Configuration' started by auMark, Jul 20, 2006.

  1. auMark

    auMark New Member

    Hi all, I have spent hours searching for a fix for this problem. Have read all the posts in here with no sucsess.

    Have: Ubuntu Server 6.06 with Perfect Setup done (thanks Flako great tutorial), ISP Config, Schoolbell, Webmin, UebiMiau and Roundcube.

    All was working fine

    Apache 2 stopped working. Last software installed was Roundcube

    Error log reports:

    unable to start piped log program '/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_acces
    s_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d': No such file or directory
    Unable to open logs

    After Reading posts I checked suexec module in appache. Tried to reinstall module, reports already installed. Although webmin says it is not.

    Any help much appreciated, thanks.

    auMark.

    update: stopped IPSConfig server and Webmin server. No luck. Apache2 still fails.
     
    Last edited: Jul 20, 2006
  2. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    ls -l /root/ispconfig/cronolog
    ?
    What's the output of
    Code:
    ls -la /var/log
    ?
    What's at the end of your main Apache configuration (there must be a part added by the ISPConfig installer - this part also includes cronolog).
     
  3. dekat

    dekat New Member

    Same "Apache 2 will not start" problem on Ubuntu 6.06

    Hi there,

    I'm also stuck on Page 6 of the Ubuntu "Perfect Setup Guide" (http://www.howtoforge.com/perfect_setup_ubuntu_6.06_p6) trying to do a force restart of apache2. I'm trying to install ISPConfig on Ubuntu 6.06, and when I do:

    /etc/init.d/apache2 force-reloadrestart

    I get:

    * Forcing reload of apache 2.0 web server...
    [fail]


    Furthermore, my apache-error-log file reads:

    unable to start piped log program '/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d': No such file or directory
    Unable to open logs


    I also tried the command:

    ls -l /root/ispconfig/cronolog

    and got:

    ls: /root/ispconfig/cronolog: No such file or directory


    Similarly, the command "ls -la /var/log" does not list any file called "cronolog."

    What am I to do next? Thanks in advance for your help!
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Is ISPConfig completely installed on your server? Please post the output of:

    ls -la /root/ispconfig/
     
  5. dekat

    dekat New Member

    Here's the output for the "ls -la /root/ispconfig/" command:

    ls: /root/ispconfig/: No such file or directory

    It seems ISPConfig is not completely installed. Please note, however, that "The Perfect Setup Guide" talks about installing ISPConfig in Page 7 (the last page), while I had my problems in Page 6. So what should I do now?
     
  6. falko

    falko Super Moderator ISPConfig Developer

    This looks as if ISPConfig was already installed when you ran the Apache setup, but /root/ispconfig has been deleted (accidentally?).
    If /home/admispconfig exists, I suggest you run
    Code:
    mkdir /root/ispconfig
    and install the latest ISPConfig again which will then perform an update.
     
  7. soheil.moradi

    soheil.moradi New Member

    Hello everybody,
    I came and wanna learn you a little...

    Maybe you couldn't restart or start Apache2 in the Ubuntu or other OS...

    in the Ubuntu you should do following commands:

    Code:
    locate ports.conf
    Now give you following results:

    ***
    /etc/apache2/ports.conf
    ****


    ok, you should go to ports.conf located directory with follow command:

    Code:
    cd /etc/apache2/
    Next you should edit ports.conf with a editor, I use nano to edit this file with follow command

    Code:
    sudo nano ports.conf
    Next you should replace follow line with everything in the "ports.conf":

    PHP:
    Listen 127.0.0.1:8080
    Also You can replace xxx.xxx.xxx.xxx:8080 with 127.0.0.1:8080

    OK, now exit this file with pressing "Ctrl+X" » Y » <ENTER>

    Next you should start your apache server with follow command:

    Code:
    sudo /etc/init.d/apache2 start
    Enjoy;

    Visit my website and help me with your comments: :KS http://www.irtik.com
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    This solution is not useful at all and also not useful to solve the problem in this thread. It will only m,ess up your configuration, so dont try this!
     
  9. dekat

    dekat New Member

    Thanks Till and all for your postings. In any case, I have already sorted out my problem. I re-installed ISPConfig and, very importantly, created a new site. The creation of the new site got rid of the problem of the apache2-default page and an index of directories showiing up.

    Again, thanks for all your help! And best wishes for a HAPPY, HEALTHY, and PROSPEROUS NEW YEAR!!
     
  10. falko

    falko Super Moderator ISPConfig Developer

    We wish the same to you! :)
     
  11. jemmrich

    jemmrich New Member

    Hate to bring back an old thread, but I just got this error as well.

    You don't need to reinstall ispconfig, it seems to be strictly an apache error.

    If you are getting this error try:

    ps aux | grep apache

    you will probably see this:

    www-data 8010 62.4 0.1 4544 1176 ? R Jun20 13376:16 /usr/sbin/apache/log

    if so, kill that process like so:

    kill -9 8010

    Check to make sure it is gone:
    ps aux | grep apache

    Now, restart apache

    /etc/init.d/apache2 restart

    I got this error from upgrading installed packages. This is what initially alerted to the problem:
    Restarting web server: apache2
    (98)Address already in use: make_sock: could not bind to address [::]:80
    (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs
    failed!
     
    Last edited: Jul 5, 2010
  12. falko

    falko Super Moderator ISPConfig Developer

    Any errors in Apache's error log?
    What's the output of
    Code:
    netstat -tap
    ?
     
  13. jemmrich

    jemmrich New Member

    Hi falko, I don't have any problems, I just wanted to post a fix for this in case myself or someone ever has this problem again in the future.
     
  14. romanh2

    romanh2 New Member

    Hi I got same problem after upgrade:

    Starting web server (apache2)...(98)Address already in use: make_sock: could not bind to address [::]:80
    (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs
    failed!

    upgrade: Debian Lenny8

    cabextract a program to extract Microsoft Cabinet files New version 1.2-3+lenny1
    clamav-data clamav data files New version 20100808.045700.11514
    libapache2-mod-php5 server-side, HTML-embedded scripting language (Apache 2 module) New version 5.2.6.dfsg.1-1+lenny9
    php-pear PEAR - PHP Extension and Application Repository New version 5.2.6.dfsg.1-1+lenny9
    php5 server-side, HTML-embedded scripting language (metapackage) New version 5.2.6.dfsg.1-1+lenny9
    php5-cgi server-side, HTML-embedded scripting language (CGI binary) New version 5.2.6.dfsg.1-1+lenny9
    php5-cli command-line interpreter for the php5 scripting language New version 5.2.6.dfsg.1-1+lenny9
    php5-common Common files for packages built from the php5 source New version 5.2.6.dfsg.1-1+lenny9
    php5-dev Files for PHP5 module development New version 5.2.6.dfsg.1-1+lenny9
    php5-gd GD module for php5 New version 5.2.6.dfsg.1-1+lenny9
    php5-imap IMAP module for php5 New version 5.2.6.dfsg.1-1+lenny9
    php5-mcrypt MCrypt module for php5 New version 5.2.6.dfsg.1-1+lenny9
    php5-mysql MySQL module for php5 New version 5.2.6.dfsg.1-1+lenny9
    wget retrieves files from the web


    Knows someone please address the problem after upgrading Apache2, apparently remains blocked port 80

    I had to return to the old backup
     
    Last edited: Aug 9, 2010
  15. falko

    falko Super Moderator ISPConfig Developer

    Please check with
    Code:
    netstat -tap
    if there's a process running on port 80.
     
  16. romanh2

    romanh2 New Member

    Hi

    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 localhost.localdo:10024 *:* LISTEN 2205/amavisd (maste
    tcp 0 0 localhost.localdo:10025 *:* LISTEN 9888/master
    tcp 0 0 *:38953 *:* LISTEN 1970/rpc.statd
    tcp 0 0 *:mysql *:* LISTEN 2265/mysqld
    tcp 0 0 localhost.localdo:spamd *:* LISTEN 2338/spamd.pid
    tcp 0 0 *:sunrpc *:* LISTEN 1959/portmap
    tcp 0 0 *:webmin *:* LISTEN 4828/perl
    tcp 0 0 *:ftp *:* LISTEN 4289/pure-ftpd (SER
    tcp 0 0 server42.server-:domain *:* LISTEN 4095/mydns
    tcp 0 0 localhost.locald:domain *:* LISTEN 4095/mydns
    tcp 0 0 *:ssh *:* LISTEN 2177/sshd
    tcp 0 0 localhost.localdoma:727 *:* LISTEN 4367/famd
    tcp 0 0 *:smtp *:* LISTEN 9888/master
    tcp 1 0 localhost.localdo:33989 localhost.localdo:mysql CLOSE_WAIT 2280/amavisd (ch2-a
    tcp 1 0 localhost.localdo:48077 localhost.localdo:mysql CLOSE_WAIT 2281/amavisd (ch2-a
    tcp 0 148 server42.server-ren:ssh static-78-141-120:62811 ESTABLISHED 13182/sshd: romanh2
    tcp6 0 0 [::]:imaps [::]:* LISTEN 3573/couriertcpd
    tcp6 0 0 [::]:pop3s [::]:* LISTEN 3598/couriertcpd
    tcp6 0 0 [::]:pop3 [::]:* LISTEN 3583/couriertcpd
    tcp6 0 0 [::]:imap2 [::]:* LISTEN 3550/couriertcpd
    tcp6 0 0 [::]:http-alt [::]:* LISTEN 4652/apache2
    tcp6 0 0 [::]:www [::]:* LISTEN 4652/apache2
    tcp6 0 0 [::]:tproxy [::]:* LISTEN 4652/apache2
    tcp6 0 0 [::]:ftp [::]:* LISTEN 4289/pure-ftpd (SER
    tcp6 0 0 localhost:domain [::]:* LISTEN 4095/mydns
    tcp6 0 0 [::]:ssh [::]:* LISTEN 2177/sshd
    tcp6 0 0 [::]:https [::]:* LISTEN 4652/apache2
    tcp6 0 0 server42.server-ren:www 74.255.34.2%429494:7888 FIN_WAIT2 12305/apache2
    tcp6 0 0 server42.server-ren:www 195.141.42.97%429:58910 TIME_WAIT -
    tcp6 0 0 server42.server-ren:www jondan.jyxo.com:48739 TIME_WAIT -
    tcp6 0 0 server42.server-ren:www 74.255.34.2%42949:37491 ESTABLISHED 12333/apache2
    tcp6 0 0 server42.server-ren:www 74.255.34.2%42949:18904 FIN_WAIT2 10710/apache2
    tcp6 0 0 server42.server-ren:www 74.255.34.2%42949:31095 FIN_WAIT2 13106/apache2
    tcp6 0 0 server42.server-ren:www 74.255.34.2%429494:9777 ESTABLISHED 11863/apache2
    tcp6 0 0 server42.server-ren:www 74.255.34.2%429494:6636 FIN_WAIT2 12187/apache2

    I did not know to fix it, I returned back to backup before upgrade

    [​IMG]
     
    Last edited: Aug 9, 2010
  17. falko

    falko Super Moderator ISPConfig Developer

    Ok, the next time you have this problem run
    Code:
    netstat -tap
    to find out the PID of the process that runs on port 80, and then kill that process as follows:
    Code:
    kill -9 [I]PID[/I]
     
  18. romanh2

    romanh2 New Member

    Hi thanks I'll try

    apt-get update
    apt-get upgrade

    Starting web server: apache2(98)Address already in use: make_sock: could not bind to address [::]:80
    (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs
    failed!

    --------------------------------------------------------------------


    server42:/home/romanh2# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 localhost.localdo:10024 *:* LISTEN 2205/amavisd (maste
    tcp 0 0 localhost.localdo:10025 *:* LISTEN 9888/master
    tcp 0 0 *:38953 *:* LISTEN 1970/rpc.statd
    tcp 0 0 *:mysql *:* LISTEN 2265/mysqld
    tcp 0 0 localhost.localdo:spamd *:* LISTEN 2338/spamd.pid
    tcp 0 0 *:sunrpc *:* LISTEN 1959/portmap
    tcp 0 0 *:webmin *:* LISTEN 10983/perl
    tcp 0 0 *:ftp *:* LISTEN 4289/pure-ftpd (SER
    tcp 0 0 server42.server-:domain *:* LISTEN 4095/mydns
    tcp 0 0 localhost.locald:domain *:* LISTEN 4095/mydns
    tcp 0 0 *:ssh *:* LISTEN 2177/sshd
    tcp 0 0 localhost.localdoma:727 *:* LISTEN 4367/famd
    tcp 0 0 *:smtp *:* LISTEN 9888/master
    tcp 0 148 server42.server-ren:ssh static-78-141-120:60053 ESTABLISHED 4588/sshd: romanh2
    tcp 0 0 localhost.localdo:41482 localhost.localdo:mysql ESTABLISHED 2280/amavisd (ch7-a
    tcp 0 0 localhost.localdo:mysql localhost.localdo:41482 ESTABLISHED 2265/mysqld
    tcp6 0 0 [::]:imaps [::]:* LISTEN 3573/couriertcpd
    tcp6 0 0 [::]:pop3s [::]:* LISTEN 3598/couriertcpd
    tcp6 0 0 [::]:pop3 [::]:* LISTEN 3583/couriertcpd
    tcp6 0 0 [::]:imap2 [::]:* LISTEN 3550/couriertcpd
    tcp6 0 0 [::]:http-alt [::]:* LISTEN 5579/apache2
    tcp6 0 0 [::]:www [::]:* LISTEN 5579/apache2
    tcp6 0 0 [::]:tproxy [::]:* LISTEN 5579/apache2
    tcp6 0 0 [::]:ftp [::]:* LISTEN 4289/pure-ftpd (SER
    tcp6 0 0 localhost:domain [::]:* LISTEN 4095/mydns
    tcp6 0 0 [::]:ssh [::]:* LISTEN 2177/sshd
    tcp6 0 0 [::]:https [::]:* LISTEN 5579/apache2
    tcp6 485 0 server42.server-ren:www b3090877.crawl.ya:38015 ESTABLISHED -
    tcp6 176 0 server42.server-ren:www jondan.jyxo.com:59685 CLOSE_WAIT -
    tcp6 486 0 server42.server-ren:www b3090877.crawl.ya:50405 CLOSE_WAIT -
    tcp6 486 0 server42.server-ren:www b3090877.crawl.ya:55325 CLOSE_WAIT -
    tcp6 176 0 server42.server-ren:www jondan.jyxo.com:33642 CLOSE_WAIT -
    tcp6 486 0 server42.server-ren:www b3090877.crawl.ya:57683 CLOSE_WAIT -
    tcp6 486 0 server42.server-ren:www b3090877.crawl.ya:52859 CLOSE_WAIT -

    ------------------------------------------------------------------------------------



    server42:/home/romanh2# netstat -lnp | grep '80'
    tcp6 0 0 :::8080 :::* LISTEN 5579/apache2
    tcp6 0 0 :::80 :::* LISTEN 5579/apache2
    tcp6 0 0 :::8081 :::* LISTEN 5579/apache2
    udp6 0 0 fe80::24f:4eff:fe62:123 :::* 4397/ntpd
    unix 2 [ ACC ] STREAM LISTENING 28097 9888/master public/cleanup
    unix 2 [ ACC ] STREAM LISTENING 28180 9888/master private/scache
    server42:/home/romanh2#
    server42:/home/romanh2# kill -9 5579
    server42:/home/romanh2# /etc/init.d/apache2 start
    Starting web server: apache2.

    server42:/home/romanh2# /etc/init.d/apache2 restart
    Restarting web server: apache2(98)Address already in use: make_sock: could not bind to address [::]:80
    (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs
    failed!

    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I actually do not know how to fix it :-((

    Debien lenny ispconfog3
    http://www.howtoforge.com/perfect-server-debian-lenny-ispconfig3
     
    Last edited: Aug 16, 2010
  19. pepperr

    pepperr New Member

    Hi, I have very close problem. Today i have installed ispconfig 3, and suddenly apache got an error, probably i got wrong setting for the ispconfig. Here is the log:
    DBI connect('database=dbispconfig;host=127.0.0.1:3306','ispconfig',...) failed: Access denied for user 'ispconfig'@'localhost' (using password: YES) at /usr$
    [Wed Sep 14 16:08:46 2011] [error] [client 192.168.1.5] PHP Warning: mysql_connect(): Access denied for user 'ispconfig'@'localhost' (using password: YES) $
    [Wed Sep 14 16:08:46 2011] [error] [client 192.168.1.5] PHP Warning: mysql_connect(): Access denied for user 'ispconfig'@'localhost' (using password: YES) $
    DBI connect('database=dbispconfig;host=127.0.0.1:3306','ispconfig',...) failed: Access denied for user 'ispconfig'@'localhost' (using password: YES) at /usr$
    DBI Error: at /usr/local/ispconfig/server/scripts/vlogger line 514, <STDIN> line 1.
    [Wed Sep 14 16:18:56 2011] [error] [client 77.77.47.155] client denied by server configuration: /usr/local/ispconfig, referer: http://77.77.47.155:8080/
    [Wed Sep 14 16:22:05 2011] [error] [client 77.77.47.155] client denied by server configuration: /usr/local/ispconfig
    [Wed Sep 14 16:25:27 2011] [error] [client 192.168.1.5] client denied by server configuration: /usr/local/ispconfig, referer: http://192.168.1.102:8080/
    DBI connect('database=dbispconfig;host=127.0.0.1:3306','ispconfig',...) failed: Can't connect to MySQL server on '127.0.0.1' (111) at /usr/local/ispconfig/s$
    DBI Error: at /usr/local/ispconfig/server/scripts/vlogger line 514, <STDIN> line 4.

    I decided to remove ispconfig 3 with hope to fix the problem, but it's not now I'v got:
    * Restarting web server apache2 Action 'start' failed.
    The Apache error log may have more information.
    [fail]
    And here is now the log, after uninstalling ispconfig:

    unable to start piped log program ' /usr/local/ispconfig/server/scripts/vlogger -s access.log -t "%Y%m%d-access.log" -d "/etc/vlogger-dbi.conf" /var/log/isp$
    Unable to open logs

    With netstat -tap i got this:
    tcp 0 0 *:webmin *:* LISTEN 1881/perl
    tcp 0 0 *:ftp *:* LISTEN 1513/proftpd: (acce
    tcp 0 0 *:ssh *:* LISTEN 841/sshd
    tcp 0 0 localhost:ipp *:* LISTEN 929/cupsd
    tcp 0 0 *:smtp *:* LISTEN 2162/master
    tcp 0 0 localhost:10025 *:* LISTEN 2162/master
    tcp 0 0 *:mysql *:* LISTEN 5656/mysqld
    tcp 0 52 www.maxprodesign.com:ssh 192.168.1.5:64804 ESTABLISHED 4790/sshd: addme [p
    tcp6 0 0 [::]:imap2 [::]:* LISTEN 1992/couriertcpd
    tcp6 0 0 [::]:ssh [::]:* LISTEN 841/sshd
    tcp6 0 0 ::1%4144160181:ipp [::]:* LISTEN 929/cupsd
    tcp6 0 0 [::]:smtp [::]:* LISTEN 2162/master
    tcp6 0 0 [::]:imaps [::]:* LISTEN 2020/couriertcpd
    tcp6 0 0 [::]:pop3s [::]:* LISTEN 2066/couriertcpd
    tcp6 0 0 [::]:pop3 [::]:* LISTEN 2040/couriertcpd


    What gone wrong? My server is down, and a rookie like me, doesn't know how to bring it back online. Please Help!
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Reinstall ispconfig 3, this will fix the problem. By removing ispconfig you broke your apache setup as vlogger is not available anymore. The reinstall will also fix the original problem that you had.
     

Share This Page