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.