starting apache "failed" whed adding SSL

Discussion in 'ISPConfig 3 Priority Support' started by livetv, Jan 13, 2015.

  1. livetv

    livetv Member

    Code:
    /etc/init.d/apache2 start
    killall apache2
    apache2: no process found

    Code:
    netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:pop3                  *:*                     LISTEN      4187/dovecot
    tcp        0      0 *:imap2                 *:*                     LISTEN      4187/dovecot
    tcp        0      0 *:ssmtp                 *:*                     LISTEN      4375/master
    tcp        0      0 *:ftp                   *:*                     LISTEN      3971/pure-ftpd (SER
    tcp        0      0 vps-1612:domain *:*                     LISTEN      1820/named
    tcp        0      0 localhost:domain        *:*                     LISTEN      1820/named
    tcp        0      0 *:ssh                   *:*                     LISTEN      2008/sshd
    tcp        0      0 *:smtp                  *:*                     LISTEN      4375/master
    tcp        0      0 localhost:953           *:*                     LISTEN      1820/named
    tcp        0      0 *:microsoft-ds          *:*                     LISTEN      1790/smbd
    tcp        0      0 *:imaps                 *:*                     LISTEN      4187/dovecot
    tcp        0      0 *:nrpe                  *:*                     LISTEN      3932/nrpe
    tcp        0      0 *:pop3s                 *:*                     LISTEN      4187/dovecot
    tcp        0      0 localhost:10024         *:*                     LISTEN      2818/amavisd-new (m
    tcp        0      0 localhost:10025         *:*                     LISTEN      4375/master
    tcp        0      0 *:mysql                 *:*                     LISTEN      2657/mysqld
    tcp        0      0 *:submission            *:*                     LISTEN      4375/master
    tcp        0      0 localhost:9003          *:*                     LISTEN      1947/php-fpm.conf)
    tcp        0      0 localhost:11211         *:*                     LISTEN      1917/memcached
    tcp        0      0 *:netbios-ssn           *:*                     LISTEN      1790/smbd
    tcp        0      0 localhost:mysql         localhost:41303         ESTABLISHED 2657/mysqld
    tcp        0      0 localhost:mysql         localhost:38543         ESTABLISHED 2657/mysqld
    tcp        0      0 localhost:38544         localhost:mysql         ESTABLISHED 29645/trivial-rewri
    tcp        0      0 localhost:mysql         localhost:41265         ESTABLISHED 2657/mysqld
    tcp        0      0 localhost:mysql         localhost:38542         ESTABLISHED 2657/mysqld
    tcp        0      0 localhost:mysql         localhost:38544         ESTABLISHED 2657/mysqld
    tcp        0     64 vps-16121.m:ssh 89-139-182-248.bb.:4550 ESTABLISHED 26691/0
    tcp        0      0 localhost:38542         localhost:mysql         ESTABLISHED 29646/proxymap
    tcp        0      0 vps-16121.m:ssh 89-139-182-248.bb.:1817 ESTABLISHED 27036/sshd: [email protected]
    tcp        0      0 localhost:mysql         localhost:38594         ESTABLISHED 2657/mysqld
    tcp        0      0 localhost:38594         localhost:mysql         ESTABLISHED 29649/error
    tcp        0      0 localhost:mysql         localhost:38593         ESTABLISHED 2657/mysqld
    tcp        0      0 vps-16121.m:ssh 62-210-180-62.rev:55065 ESTABLISHED 29742/sshd: root [p
    tcp        0      0 localhost:38593         localhost:mysql         ESTABLISHED 29650/error
    tcp        0      0 localhost:38543         localhost:mysql         ESTABLISHED 29646/proxymap
    tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      4187/dovecot
    tcp6       0      0 [::]:9998               [::]:*                  LISTEN      1723/java
    tcp6       0      0 [::]:imap2              [::]:*                  LISTEN      4187/dovecot
    tcp6       0      0 [::]:1935               [::]:*                  LISTEN      1723/java
    tcp6       0      0 [::]:9999               [::]:*                  LISTEN      1723/java
    tcp6       0      0 [::]:ssmtp              [::]:*                  LISTEN      4375/master
    tcp6       0      0 localhost:tproxy        [::]:*                  LISTEN      1723/java
    tcp6       0      0 [::]:ftp                [::]:*                  LISTEN      3971/pure-ftpd (SER
    tcp6       0      0 [::]:domain             [::]:*                  LISTEN      1820/named
    tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      2008/sshd
    tcp6       0      0 [::]:5080               [::]:*                  LISTEN      1723/java
    tcp6       0      0 [::]:smtp               [::]:*                  LISTEN      4375/master
    tcp6       0      0 localhost:953           [::]:*                  LISTEN      1820/named
    tcp6       0      0 [::]:microsoft-ds       [::]:*                  LISTEN      1790/smbd
    tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      4187/dovecot
    tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      4187/dovecot
    tcp6       0      0 [::]:submission         [::]:*                  LISTEN      4375/master
    tcp6       0      0 [::]:netbios-ssn        [::]:*                  LISTEN      1790/smbd
    tcp6       0      0 localhost:44034         localhost:ftp           TIME_WAIT   -
    tcp6       0      0 vps-16121.:1935 89-139-182-248.bb.:2178 ESTABLISHED 1723/java
    tcp6       0      0 localhost:41265         localhost:mysql         ESTABLISHED 1723/java
    tcp6       0      0 vps-16121.:1935 89-139-182-248.bb.:2198 ESTABLISHED 1723/java
    tcp6       0      0 vps-16121.:5080 89-139-182-248.bb.:2142 ESTABLISHED 1723/java
    tcp6       0      0 localhost:41303         localhost:mysql         ESTABLISHED 1723/java
    tcp6       0      0 vps-16121.:5080 89-139-182-248.bb.:4002 ESTABLISHED 1723/java
    
    Thank you
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Where did you add ssl, in the ispconfig.vhost file or in a website?

    and post the output of:

    netstat -ntap | grep 8081
     
  3. livetv

    livetv Member

    ssl to ispconfig
    netstat -ntap | grep 8081
    tcp6 0 0 127.0.0.1:8081 :::* LISTEN 1723/java
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem is that the port 8081 which is used by the ispconfig apps vhost is currently used by a java application on your server. you have to change either the port of the java app or the port in the apache apps.vhost file.
     
  5. livetv

    livetv Member

    i think i'm doing wrong but changed th 8081 to 8083 in the /etc/apache2/sites-available/apps.vhost
    and
    /etc/init.d/apache2 start
    [....] Starting web server: apache2[Tue Jan 13 09:30:22 2015] [error] VirtualHost _default_:8083 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Tue Jan 13 09:30:22 2015] [warn] NameVirtualHost *:443 has no VirtualHosts
    [Tue Jan 13 09:30:22 2015] [warn] NameVirtualHost *:443 has no VirtualHosts
    (98)Address already in use: make_sock: could not bind to address [::]:8080
    . ok
    [email protected]:~# /etc/init.d/apache2 status
    Apache2 is NOT running.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Please pst the output of:

    netstat -ntap | grep 8080
     
  7. livetv

    livetv Member

    netstat -ntap | grep 8080
    nothing
     
  8. livetv

    livetv Member

    where i need to change and to what?
    in the error.log i found:
    [Tue Jan 13 09:06:26 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Tue Jan 13 09:06:26 2015] [warn] RSA server certificate CommonName (CN) `James' does NOT match server name!?
    [Tue Jan 13 09:06:26 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
    [Tue Jan 13 09:07:38 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Tue Jan 13 09:07:38 2015] [warn] RSA server certificate CommonName (CN) `James' does NOT match server name!?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats ok. The CA error just measn that this is a self sigend certificate. And th ecrtificate seems to be issued as personal certificate as it has the name of a person as common name and not the server hostname.

    What exactly did you change before the issues started?
     
  10. livetv

    livetv Member

    i think that during the installation of ispconfig ssl, i fiiled instead of adding the server name i add incorrect value
     
  11. livetv

    livetv Member

    apache2ctl configtest
    [Wed Jan 14 06:31:57 2015] [error] VirtualHost _default_:8081 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Wed Jan 14 06:31:57 2015] [warn] NameVirtualHost *:443 has no VirtualHosts
    [Wed Jan 14 06:31:57 2015] [warn] NameVirtualHost *:443 has no VirtualHosts
    Syntax OK
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to edit the ispconfig.vhost file and comment out (add a # in fron) of all lines that start with ssl, then try to restart apache. If the issue is caused by a broken ssl cert, the it should start again. If thats the case, then we can focus on repairung the ssl cert.
     
  13. livetv

    livetv Member

    the same, apache2 doesn't start
    # SSL Configuration
    #SSLEngine On
    #SSLProtocol All -SSLv2 -SSLv3
    #SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
    #SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
    #SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    exact same error message?

    (98)Address already in use: make_sock: could not bind to address [::]:8080
     
  15. livetv

    livetv Member

    /etc/init.d/apache2 start
    [....] Starting web server: apache2[Wed Jan 14 12:53:47 2015] [error] VirtualHost _default_:8081 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Wed Jan 14 12:53:47 2015] [warn] NameVirtualHost *:443 has no VirtualHosts
    [Wed Jan 14 12:53:47 2015] [warn] NameVirtualHost *:443 has no VirtualHosts
    (98)Address already in use: make_sock: could not bind to address [::]:8081
    (98)Address already in use: make_sock: could not bind to address 0.0.0.0:8081
    no listening sockets available, shutting down
    Unable to open logs
    Action 'start' failed.
    The Apache error log may have more information.
    failed!
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so you did not change the port of the apps vhost like I suggested in #4 of this thread? Port 8081 is used by your java server, so you cant use the same port in apache. This means you have to change it to e.g. 8082 in the apps.vhost file.
     
  17. livetv

    livetv Member

    Before I changed and I returned again and now I've changed and I got -
    /etc/init.d/apache2 start
    [....] Starting web server: apache2[Wed Jan 14 15:25:51 2015] [error] VirtualHos t _default_:8082 -- mixing * ports and non-* ports with a NameVirtualHost addres s is not supported, proceeding with undefined results
    [Wed Jan 14 15:25:51 2015] [warn] NameVirtualHost *:443 has no VirtualHosts
    [Wed Jan 14 15:25:51 2015] [warn] NameVirtualHost *:443 has no VirtualHosts
    (98)Address already in use: make_sock: could not bind to address [::]:8080
    . ok
    [email protected]:~# /etc/init.d/apache2 status
    Apache2 is NOT running.
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    grep -r 8080 /etc/apache2
     
  19. livetv

    livetv Member

    grep -r 8080 /etc/apache2
    /etc/apache2/sites-available/ispconfig.vhost: Listen 8080
    /etc/apache2/sites-available/ispconfig.vhost:NameVirtualHost *:8080
    /etc/apache2/sites-available/ispconfig.vhost:<VirtualHost _default_:8080>
    /etc/apache2/ports.conf:Listen 8080
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000081a application/x-arc lzw
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000091a application/x-arc squashed
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000021a application/x-arc uncompressed
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000031a application/x-arc packed
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000041a application/x-arc squeezed
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000061a application/x-arc crunched
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000081a application/x-arc
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000091a application/x-arc
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000021a application/x-arc
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000031a application/x-arc
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000041a application/x-arc
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000061a application/x-arc
    [email protected]:~# clear
    [email protected]:~# grep -r 8080 /etc/apache2
    /etc/apache2/sites-available/ispconfig.vhost: Listen 8080
    /etc/apache2/sites-available/ispconfig.vhost:NameVirtualHost *:8080
    /etc/apache2/sites-available/ispconfig.vhost:<VirtualHost _default_:8080>
    /etc/apache2/ports.conf:Listen 8080
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000081a application/x-arc lzw
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000091a application/x-arc squashed
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000021a application/x-arc uncompressed
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000031a application/x-arc packed
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000041a application/x-arc squeezed
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000061a application/x-arc crunched
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000081a application/x-arc
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000091a application/x-arc
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000021a application/x-arc
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000031a application/x-arc
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000041a application/x-arc
    /etc/apache2/magic:0 lelong&0x8080ffff 0x0000061a application/x-arc
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Edit the file:
    /etc/apache2/ports.conf

    and remove the

    Listen 8080

    line and restart apache.
     

Share This Page