Youtrack 6 reboot fails on Fedora and Java Service Wrapper

827 views Asked by At

I have followed http://confluence.jetbrains.com/display/YTD6/Linux.+YouTrack+JAR+as+a+Service on Fedora server. Starting Youtrack 6 as "youtrack" user by

/etc/init.d/youtrack start

command starts properly. I have added youtrack service wrapper on boot by

/sbin/chkconfig --add youtrack

command. But after server reboot Youtrack application is not running.

journalctl -xn

command gives me only this hint

systemd[4000]: Failed at step EXEC spawning /etc/rc.d/init.d/youtrack: Exec format error

I have fixed my permissions like in this thread '' Starting YouTrack as a service fails without error message''

But error still occurs. I have pasted default template from the tutorial '/etc/rc.d/init.d/youtrack' with only one change:

#export JAVA_HOME=/usr/java/jdk1.6.0_21
export JAVA_HOME=/usr/java/latest

/usr/java/latest points to Oracle JDK 8.

1

There are 1 answers

0
Radosław Osiński On
youtrack_initd.template 

from youtrack tutorial is missing

#!/bin/sh

on the top of the file. After adding this line "Exec format error" does not occur anymore.