Report this

What is the reason for this report?

Troubleshooting "This site can't be reached"

Posted on October 31, 2019

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
0

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

            • Run the command every minute.

Hope this helps!

Regards, Alex

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.