0

I have installed sonar as service, when I checked the /etc/init.d folder and I could find the file pointing to sonar.sh file.

I am able to restart the service using /sbin/service sonar start, but when try to restart using systemctl it is complaining unit not found./sbin/service sonar --work fine.

/sbin/service sonar --work fine.

/bin/systemctl start sonar

Error: Could not start Service[sonarqube]: Execution of '/bin/systemctl start sonar' returned 6: Failed to start sonar.service: Unit sonar.service failed to load: No such file or directory.

I executed below command and could not find the service.

systemctl list-units --type=service

Any idea why this will happen.

Harry
  • 445
  • 3
  • 11
  • 28
  • Systemd picks up SysV init.d scripts via [`systemd-sysv-generator`](https://www.freedesktop.org/software/systemd/man/systemd-sysv-generator.html). Is that enabled and working? What distribution are you using? How did you install sonar? Manually? – dhke Aug 26 '16 at 09:15
  • Yes it is enabled, I installed sonar via puppet. I executed chkconfig --add sonar it is working fine. – Harry Aug 26 '16 at 09:38
  • You are in systemd world and systemd doesn't seem to have picked up your "legacy" init script. On your distribution, `chkconfig`, `service`, and friends seem to work with SysV only. Does `systemctl daemon-reload` change anything? – dhke Aug 26 '16 at 09:41

0 Answers0