By caioac87
I’ve been successfully using the Metabase droplet for quite a while. Few days ago, I tried opening the link I normally use and I get an error (tried every browser). The droplet itself is active, I tried rebooting it a few time, but nothing. I was wondering if anyone could help on the necessary steps to troubleshoot the problem. Thanks a lot.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hello, @caioac87 @dwihdyn789
If you can’t see java running when you use netstat than it means that Metabase is not running on your droplet.
You can confirm this by executing the following command:
service metabase status
If the service is not started you can start/restart it:
sudo service metabase start
Note: This might take up some time to run and actually start the service, if you still can’t access the Metabase in your browser try to manually start it using the commands bellow
The script that start the service is:
/opt/metabase/metabase.sh
You can execute this and wait for couple of minutes to complete.
You also need to start Java by executing the following command:
java -jar /opt/metabase/metabase.jar
If this is a new droplet I will recommend you to quickly spin up a new Metabase droplet as this will take less than 10 minutes to have it up and running.
Hope this helps!
Regards, Alex
Hello, @caioac87
May I ask if you access the site using a domain name or via the IP address of your server/droplet? If you’re using a domain name can you please check/verify that the domain name is properly pointed to your droplet and that the DNS is working fine? You can use https://www.whatsmydns.net/ and check if the A record is pointed to the IP address of your server.
Let me know how it goes.
Hey, @dwihdyn789
You can create a simple bash script to check if the service is running and if not to start it. You can then execute the bash script with a cron job whenever you want (once per minute and etc)
#!/bin/bash
service=$@
/bin/systemctl -q is-active "$metabase.service"
status=$?
if [ "$status" == 0 ]; then
echo "OK"
else
/bin/systemctl start "$metabase.service"
fi
You can check this task for creating cron jobs:
https://www.digitalocean.com/community/tutorials/how-to-use-cron-to-automate-tasks-ubuntu-1804
The cron job should look like:
* * * * * /bin/sh /path/to/script/script.sh > /dev/null 2>&1
Hope this helps!
Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.