Unable to connect to website

March 21, 2016 918 views
Apache Configuration Management Ubuntu

I have been following this tutorial to install WP CLI and now I get a "Problem loading website" error whenever I try to access any website on my droplet, using a browser. I can still SSH or SFTP on the server without issues.

I suspect the error was caused by apt-get update from which I got the error:

E: Some index files failed to download. They have been ignored, or old ones used instead.
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

I tried to run sudo dpkg --configure -a but nothing happened (looks like it froze) and I then ^C it:

sudo dpkg --configure -a
Setting up openssh-server (1:6.6p1-2ubuntu2) ...
^Cdpkg: error processing package openssh-server (--configure):
 subprocess installed post-installation script was interrupted
Errors were encountered while processing:
 openssh-server

I did managed to finish the installation of WP CLI without any issue and it works.

Any tips on how to get access the websites again?
Thanks!

2 comments
  • Not really an answer, but the first step I would go to would be /var/log/dpkg.log which should have the details on why the configuration failed on openssh-server . The "^C" seems to suggest that you had manually canceled the operation by hitting ctrl+c? I should mention that DigitalOcean does offer console access, so if SSH is hosed for some reason, there is the console that can be used as a last ditch effort to access your server.

    I should also mention, if you are not aware of it already, that openssh-server is separate from Apache itself, which I am assuming is what you are using to host your wordpress website . Usually Apache logs information the /var/log/apache2/error.log on an Ubuntu server, which is what seems to be what you are using. If you are using nginx or something else however, the log would still probably be under /var/log, but a different name. /var/log/nginx probably or something similar.

  • Thanks for your reply.

    Here's my dpkg.log:

    2016-03-21 07:37:04 startup packages configure
    2016-03-21 07:37:04 configure openssh-server:amd64 1:6.6p1-2ubuntu2 <none>
    2016-03-21 07:37:04 status half-configured openssh-server:amd64 1:6.6p1-2ubuntu2
    2016-03-21 07:48:42 startup packages configure
    2016-03-21 07:48:42 configure openssh-server:amd64 1:6.6p1-2ubuntu2 <none>
    2016-03-21 07:48:42 status half-configured openssh-server:amd64 1:6.6p1-2ubuntu2
    2016-03-21 07:49:41 startup packages configure
    2016-03-21 07:49:41 configure openssh-server:amd64 1:6.6p1-2ubuntu2 <none>
    2016-03-21 07:49:41 status half-configured openssh-server:amd64 1:6.6p1-2ubuntu2
    

    I can still access the server via SSH, and yes, I did a manual CTRL+C to cancel the operation because it got stuck on the following message for more than 5 minutes:

    Setting up openssh-server (1:6.6p1-2ubuntu2) ...
    

    I did not find the /var/log/apache2/error.log file. If it might help, my /etc/apache2/apache2.conf contains this line:

    ErrorLog ${APACHE_LOG_DIR}/error.log
    

    My result after a ls -l in the /var/log directory returned:

    total 688
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 alternatives.log
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 alternatives.log.1
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 apache2
    -rw-r----- 1 root   adm    4415 Mar 22 00:10 apport.log
    -rw-r----- 1 root   adm   33306 Mar 21 06:03 apport.log.1
    -rw-r----- 1 root   adm    2964 Mar 19 20:40 apport.log.2.gz
    -rw-r----- 1 root   adm     722 Mar 19 04:53 apport.log.3.gz
    -rw-r----- 1 root   adm     288 Mar 18 05:47 apport.log.4.gz
    -rw-r----- 1 root   adm     469 Mar 16 19:11 apport.log.5.gz
    -rw-r----- 1 root   adm     574 Mar 16 05:18 apport.log.6.gz
    -rw-r----- 1 root   adm     366 Mar 14 19:55 apport.log.7.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 apt
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 auth.log
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 auth.log.1
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 auth.log.2.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 auth.log.3.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 auth.log.4.gz
    -rw-r--r-- 1 root   root   6583 Mar 21 08:34 boot.log
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 bootstrap.log
    -rw-rw---- 1 root   utmp      0 Mar  1 06:25 btmp
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 btmp.1
    -rw-r--r-- 1 root   root   6896 Mar 21 08:34 cloud-init-output.log
    -rw-r--r-- 1 syslog adm  332824 Mar 21 08:34 cloud-init.log
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 dbconfig-common
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 dist-upgrade
    -rw-r--r-- 1 root   adm   29400 Mar 21 08:34 dmesg
    -rw-r--r-- 1 root   adm   29439 Mar 21 07:16 dmesg.0
    -rw-r--r-- 1 root   adm    9605 Mar 21 07:12 dmesg.1.gz
    -rw-r--r-- 1 root   adm    9618 Mar 21 06:17 dmesg.2.gz
    -rw-r--r-- 1 root   root     28 Feb 28 02:26 dmesg.3.gz
    -rw-r--r-- 1 root   root     28 Feb 28 02:26 dmesg.4.gz
    -rw-r--r-- 1 root   root    609 Mar 21 07:49 dpkg.log
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 dpkg.log.1
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 dpkg.log.2.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 dpkg.log.3.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 dpkg.log.4.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 faillog
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 fsck
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 installer
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 kern.log
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 kern.log.1
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 kern.log.2.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 kern.log.3.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 kern.log.4.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 landscape
    -rw-r--r-- 1 root   root    292 Mar 21 06:20 lastlog
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 mysql
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 mysql.err
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 mysql.log
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 mysql.log.8.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 syslog
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 syslog.1
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 syslog.2.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 syslog.3.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 syslog.4.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 syslog.5.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 syslog.6.gz
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 syslog.7.gz
    -rw-r--r-- 1 root   root 140543 Mar 21 08:34 udev
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 unattended-upgrades
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 upstart
    -rw-rw-r-- 1 root   utmp  22656 Mar 22 00:10 wtmp
    -rw-r--r-- 1 root   root      0 Feb 28 02:26 wtmp.1
    

    Cheers

1 Answer

I managed to fix the issue. Aparently, apache2 was down and couldn't be started. I deleted the file called apache2 and created a directory with the same name. Restarted and the issue was fixed.

Have another answer? Share your knowledge.