I have created a windows service that attempts to start metabase. But the attempt times out. Has anyone got this installed as a windows service and started it successfully?
I was able to get this working by using NSSM (https://nssm.cc/) and running the metabase jar file from there.
Setup the PATH to be that of java.exe, provide the arguments (-jar metabase.jar) and make sure your startup location is the folder you have the jar file.
To access it from other machines, make sure you have the required port (by default 3000) excluded.
It works as expected for me.
I was able to get this working using another wrapper tool similar to NSSM. I had tried NSSM, but did not have much luck.
could you write up how you did it? Also, nssm.cc has an invalid ssl cert for me.
I don’t know why the site is now throwing cert errors, try http://nssm.cc. It is a popular way to convert exe’s into windows services. You can download it from their site or search google and find an alternate location.
Here is my little write-up on how to install metabase as a service under windows.
Running metabase using java is great, but what if you want to run it all the time. On windows you have the options of adding it to start up, but even then you will have to login to the machine to start metabase. So to convert it to something like a service, the best option is to run it as a windows service.
You can use any of the tools you want, my preferred tool is NSSM (Non-Sucking Service Manager) an Open Source tool to convert an exe into a service.
Steps for setting up Metabase Service
Download it from http://nssm.cc/download
Make sure you pick the right 32 or 64 bit version based on your windows installation.
Install it to your machine
Using command prompt, navigate to the folder you have NSSM installed and run nssm install
A UI will show up
In the path, point to the path of JAVA (note, this is not your jar path)
- In start up directory, point it to the directly that you have the metabase jar file
In arguments provide the following
Give the service an appropriate name like ‘Metabase-Service’ and click Install Service.
That’s it. You have installed the service.
To make the service run automatically
Goto services (run services.msc) -> Select ‘Metabase-Service’ and make it Automatic
To allow other machines to acces metabase service
Run Windows Firewall and add port 3000 to the excluded list.
I’ve followed the steps closely but can’t get this to work. I’m getting the error…
"Windows could not start the Metbase-Service service on Local Computer.
The service did not return an error. This could be an internal Windows error or an internal service error.
If the problem persists, contact your system administrator."
Anyone else have problems running this setup? Or have any ideas on how to resolve this
make sure to put a hyphen before the argument.
I was able to get Metabase running as a service using NSSM, but it is running as if it is a fresh install. How can I run it while still retaining the existing settings/dashboards etc?
Edit: Never mind, I had neglected to assign the start up directory, so it was using the default startup directory, i.e. where java.exe is located. And there’s obviously no database file there. Changed that to where the metabase.jar is located and it works great now.