Problem scenario
You try to run sonarscanner from a command prompt. But you get this message:
"java.lang.IllegalStateException: Failed to create lock in /opt/app/sonar-scanner/conf/...sonar_locak...DirectoryLock..."
What should you do?
Solution
Become a different user to run the sonarscanner command or use "sudo " before your command.