Starting Java process using shell provisioner

14 views
Skip to first unread message

Jeroen Nieuwenhuis

unread,
Jun 15, 2016, 4:57:46 AM6/15/16
to Vagrant
I'm trying to start a Java process a using shell provisioner. My provisioner runs the following script:

export PATH=$PATH:/home/vagrant/jdk/bin
java -jar demo.jar &

demo.jar contains a webserver. The problem is that the java process gets killed when the provisioner is done. When I do vagrant ssh and run the commands myself everything is fine.

I tried it with both the ubuntu/trusty64 box and the fedora/23-cloud-base box.

Torben Knerr

unread,
Jun 16, 2016, 1:02:34 AM6/16/16
to vagra...@googlegroups.com
maybe try `nohup java -jar demo.jar &` instead

See here:

HTH,
Torben

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/5838d5c2-5c04-4b8a-8701-7e864499d612%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages