0

I have a service on a Ubuntu 14.04 LTS machine that starts a Play application. When I run service serviceName start directly from the machine (sudo or not), it works.

But I'm deploying this application through Gradle. My build.gradle uses the SSH plugin. It packages the application through the Play plugin for Gradle using the dist task. Then it uploads the tar to the machine and call execute service serviceName start. My service script logs that it started but when I try to access to application, it fails or when look at what ps aux | grep serviceName gives me, there's nothing displaying.

Any idea why?

Here is the part of the build.gradle that untar and runs the service.

executeSudo "$untarCommand",ignoreError: false,pty: true
println "untar done"
execute "service serverlogapi start", ignoreError: false, pty:true
println "service started"
blondie
  • 35
  • 1
  • 6
  • Anything relevant at the syslog? What is being logged to the application's log? – marcospereira May 10 '16 at 04:25
  • Nothing in the application's log or in the syslog... – blondie May 10 '16 at 16:11
  • Any idea of what could be the reason of the failure? – blondie May 11 '16 at 16:30
  • Impossible to know only with the given information. How is your build.gradle file? How is the upstart (or similar) configuration for the service? Does the user have the necessary permissions to run the app? What happens if you run the start section of your upstart script manually using the correct user? Shouldn't you be `ps aux | grep java` instead of `serviceName`? – marcospereira May 11 '16 at 16:52

0 Answers0