Start license server on reboot (Ubuntu 16.04 server)

Answered

How can I start my license server when my server reboots?

I tried cron: `sudo crontab -e`

`@reboot /opt/jetbrains/license-server.sh start`

This runs according to syslog:

Feb  3 11:20:01 hightower CRON[7762]: (root) CMD (sudo /opt/jetbrains/license-server.sh start)

But the server doesn't start. Cecking status:

admin@hightower:~$ sudo /opt/jetbrains/bin/license-server.sh status
JetBrains License Service is shut down

Is there an error log somewhere I can check for this?  syslog shows nothing about it.

I also tried running it every 5 minutes (in case the @reboot failed because there was no network/internet connection established yet in the reboot sequece) but this doesn't work either.

The command successfully starts the server if I run it manually.

 

0
6 comments

Hi!

For logs try checking logs folder in license server home folder.

In general if you need some service to be run on system startup you should use init scripts, not cron.

Try following instructions from this link:

http://serverfault.com/questions/750584/how-do-i-start-jetbrains-license-server-automatically-on-my-ubuntu-system/792605

0
Avatar
Permanently deleted user

Thank you!

I've almost got it working... I'm running into this error:

systemd[1]: jetbrains-license-server.service: PID file /opt/jetbrains-license-server/logs/license-server.pid not readable (yet?) after start: No such file or directory

Where is the .pid file?

0
Avatar
Permanently deleted user

I created the file and gave ownership to `jetbrains`, but no luck:

Failed to read PID from file /opt/jetbrains-license-server/logs/license-server.pid: Invalid argument

0

Please check that ownership for folder and all subfolders are set to jetbrains user, also please check that jetbrains user has rights to write into the folders. there is no need to create a file it should be created and removed automatically. 

0
Avatar
Permanently deleted user

Permissions seem fine right?

admin@hightower:/home$ ls -al /opt/
total 12
drwxr-xr-x  3 root      root    4096 Feb  3 15:55 .
drwxr-xr-x 23 root      root    4096 Feb  3 02:12 ..
drwxr-xr-x  9 jetbrains nogroup 4096 Jan 30 13:48 jetbrains

admin@hightower:/home$ ls -al /opt/jetbrains/
total 24268
drwxr-xr-x 9 jetbrains nogroup 4096 Jan 30 13:48 .
drwxr-xr-x 3 root root 4096 Feb 3 15:55 ..
drwxr-xr-x 2 jetbrains nogroup 4096 Dec 29 20:04 bin
drwxr-xr-x 2 jetbrains nogroup 4096 Jan 30 15:17 conf
drwxr-xr-x 6 jetbrains nogroup 4096 Dec 29 20:04 launcher
drwxr-xr-x 2 jetbrains nogroup 4096 Dec 29 20:04 lib
-rw-rw-r-- 1 jetbrains nogroup 24798511 Dec 29 09:51 license-server-installer.zip
drwxr-xr-x 2 jetbrains nogroup 4096 Feb 7 13:21 logs
-rwxr-xr-x 1 jetbrains nogroup 106 Dec 29 20:04 service.build.properties
-rwxr-xr-x 1 jetbrains nogroup 4 Dec 29 20:04 service.conf.location
-rwxr-xr-x 1 jetbrains nogroup 407 Dec 29 20:04 service.properties
drwxr-xr-x 2 jetbrains nogroup 4096 Feb 7 12:12 temp
drwxr-xr-x 4 jetbrains nogroup 4096 Dec 29 20:04 web

 

0
Avatar
Permanently deleted user

Working!  There was a typo in one of the paths....

0

Please sign in to leave a comment.