ISPConfig certificate trouble and more

Discussion in 'Installation/Configuration' started by FXT, Jan 13, 2008.

  1. FXT

    FXT New Member

    Hi!
    It seems as if I celebrated to soon:( .

    I've been going through the installation again (all my VMWare VMs lost their network cards), and this time I'm running into the following problem: ISPConfig install completes, but when I'm trying to log into the admin interface, I get the following error message:

    Could not establish an encrypted connection because certificate presented by myserver.dyndns.org has an invalid signature.

    I've searched around for a solution, and one of the Google results was this thread right on these forums.

    I've run netsat -tap, and although ISPconfig was running in the output, I restarted it just to make sure. That's when I saw a warning message:

    Code:
    root@myserver:/tmp# 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:mysql *:*                     LISTEN     4666/mysqld
    tcp        0      0 *:81                    *:*                     LISTEN     14949/ispconfig_htt
    tcp        0      0 *:ftp                   *:*                     LISTEN     14592/proftpd: (acc
    tcp        0      0 myserver.dyndns.:domain *:*                     LISTEN     3643/named
    tcp        0      0 localhost.locald:domain *:*                     LISTEN     3643/named
    tcp        0      0 *:smtp                  *:*                     LISTEN     14571/master
    tcp        0      0 localhost.localdoma:953 *:*                     LISTEN     3643/named
    tcp6       0      0 *:imaps                 *:*                     LISTEN     3713/couriertcpd
    tcp6       0      0 *:pop3s                 *:*                     LISTEN     3748/couriertcpd
    tcp6       0      0 *:pop3                  *:*                     LISTEN     3728/couriertcpd
    tcp6       0      0 *:imap2                 *:*                     LISTEN     3693/couriertcpd
    tcp6       0      0 *:www                   *:*                     LISTEN     4135/apache2
    tcp6       0      0 *:ssh                   *:*                     LISTEN     4022/sshd
    tcp6       0      0 *:smtp                  *:*                     LISTEN     14571/master
    tcp6       0      0 ip6-localhost:953       *:*                     LISTEN     3643/named
    tcp6       0      0 *:https                 *:*                     LISTEN     4135/apache2
    tcp6       0    148 myserver.dyndns.org:ssh ::ffff:192.168.1.1:2226 ESTABLISHED4189/sshd: myaccount
    root@myserver:/tmp# /etc/init.d/ispconfig_server restart
    Shutting down ISPConfig system...
    /root/ispconfig/httpd/bin/apachectl stop: httpd stopped
    ISPConfig system stopped!
    Starting ISPConfig system...
    /root/ispconfig/httpd/bin/apachectl startssl: httpd started
    
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /root/ispconfig/scripts/lib/config.inc.php on line 47
    No results found!ISPConfig system is now up and running!
    root@myserver:/tmp#
    
    My first question is what the error leading to that warning could be? Sadly, I cannot be certain whether it was there or not when ISPConfig first started up after installation.

    I plan on using the method of recreating the certificate in the way Falko recommends in that thread:

    Code:
    openssl genrsa -des3 -passout pass:yourpassword -out /root/ispconfig/httpd/conf/ssl.key/server.key2 1024
    openssl req -new -passin pass:yourpassword -passout pass:yourpassword -key /root/ispconfig/httpd/conf/ssl.key/server.key2 -out /root/ispconfig/httpd/conf/ssl.csr/server.csr -days 365
    openssl req -x509 -passin pass:yourpassword -passout pass:yourpassword -key /root/ispconfig/httpd/conf/ssl.key/server.key2 -in /root/ispconfig/httpd/conf/ssl.csr/server.csr -out /root/ispconfig/httpd/conf/ssl.crt/server.crt -days 365
    
    This is where my second question comes in. What is the "yourpassword" mentioned? Where does that come from? During the setup of ISPConfig I never had to enter a password for any certificates, so I'm stumped.
     
    Last edited: Jan 13, 2008
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You should recreate the SSL cert as you desribed above. The password is any password that you like.
     
  3. FXT

    FXT New Member

    OK, I recreated the certificate as advised.
    I chose a suitably complex password and there were no problems reported.

    Code:
    openssl genrsa -des3 -passout pass:mypasswrd -out /root/ispconfig/httpd/conf/ssl.key/server.key2 1024
    
    openssl req -new -passin pass:mypasswrd -passout pass:mypasswrd -key /root/ispconfig/httpd/conf/ssl.key/server.key2 -out /root/ispconfig/httpd/conf/ssl.csr/server.csr -days 365
    
    openssl req -x509 -passin pass:mypasswrd -passout pass:mypasswrd -key /root/ispconfig/httpd/conf/ssl.key/server.key2 -in /root/ispconfig/httpd/conf/ssl.csr/server.csr -out /root/ispconfig/httpd/conf/ssl.crt/server.crt -days 365
    
    openssl rsa -passin pass:mypasswrd -in /root/ispconfig/httpd/conf/ssl.key/server.key2 -out /root/ispconfig/httpd/conf/ssl.key/server.key
    
    chmod 400 /root/ispconfig/httpd/conf/ssl.key/server.key
    
    I then restarted ISPConfig:

    Code:
    /etc/init.d/ispconfig_server restart
    
    I checked, and ISPConfig then gave me the login window and I accepted the certificate.

    On the server, I now get this error output:

    Code:
    root@myserver:/tmp/install_ispconfig# /etc/init.d/ispconfig_server restart
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    Shutting down ISPConfig system...
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    /root/ispconfig/httpd/bin/apachectl stop: httpd stopped
    ISPConfig system stopped!
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    Starting ISPConfig system...
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    /root/ispconfig/httpd/bin/apachectl startssl: httpd started
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /root/ispconfig/scripts/lib/config.inc.php on line 47
    No results found!ISPConfig system is now up and running!
    root@myserver:/tmp/install_ispconfig#
    
    All this is right after installation, I have not changed the login from the admin/admin default.
    But when I try to login, it won't accept my password.
    I'm stuck.
     
  4. falko

    falko Super Moderator Howtoforge Staff

    This happens because the /tmp/install_ispconfig directory doesn't exist anymore (the installer deletes it at the end of the installation), but you're still in it. Go up one directory, and the messages will disappear.
     
  5. FXT

    FXT New Member

    Thank you for the hint, Falko. I changed directories, and restarted ISPConfig.

    The error message changed, but there is one still:

    Code:
    root@myserver:/# /etc/init.d/ispconfig_server restart                           Shutting down ISPConfig system...
    /root/ispconfig/httpd/bin/apachectl stop: httpd stopped
    ISPConfig system stopped!
    Starting ISPConfig system...
    /root/ispconfig/httpd/bin/apachectl startssl: httpd started
    
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /root/ispconfig/scripts/lib/config.inc.php on line 47
    No results found!ISPConfig system is now up and running!
    root@myserver:/#
    
    If I understand correctly, the error I'm now left with is caused by specifying a user other than root in MySQL during the ISPConfig install. Is there no way around that?
    I was under the impression that using root in MySQL, like in Linux, would be a security risk?
     
  6. falko

    falko Super Moderator Howtoforge Staff

    You must use root (or any other user that has full MySQL privileges). The fact that you've used another user means that the ISPConfig database hasn't been installed at all! :eek:
    Please uninstall ISPConfig and install it again (this time using the MySQL root user).
     

Share This Page