Can't access your dashboard? Try this

There are a lot of postings on here about this topic, but with no definite solution, other than sometimes the IP address of the WDMC changes which makes it inaccessible. I’ve had it happening frequently even though the IP address has been set to static and has stayed that way.

I’ve discovered by regular port scanning that for reasons best known to the WDMC, the apache web server, which gives access to the dashboard via port 80 stops running . Here’s a script to check whether it’s running, and if not, restart it.

The usual warning : This may void your warranty, use at your own risk, and if you’re not comfortable with SSH, don’t consider it.

I have my own path to my custom scripts, use whatever path you wish, as defined by /path/to/your/script/ below:

SSH into your WDMC then:

nano /path/to/your/script/apachecheck.sh

Copy and paste (right click) this script into your editor:

#!/bin/bash

if (( $(ps -ef | grep -v grep | grep apache2 | wc -l) > 0 ))
then
echo “Web server is running!”
else
/etc/init.d/apache2 start
fi

Ctrl-X and save

Now make the script executable

chmod +x /path/to/your/script/apachecheck.sh

Check that it works :

. /path/to/your/script/apachecheck.sh

You should either get a message “Web server is running” or see the progresss of a restart.

Now set up your crontab to check the web server every 15 mins and restart if necessary:

crontab -e

Add the following line

*/15 * * * * /path/to/your/script/apachecheck.sh 

Ctrl-X and save it.

Obviously you can tailor the cron job to your own wishes.      

Hope this can save some people from tearing their hair out!

Nick

I’ve discovered by regular port scanning that for reasons best known to the WDMC, the apache web server, which gives access to the dashboard via port 80 stops running

That will be why the ‘reset your MyCloud’ also works; reboot will restart the Apache server.