adithyakhamithkar / ansible-playbooks

Ansible playbook collection that have been written for Ubuntu. Some of the playbooks are Elasticsearch, Mesos, AWS, MySql, Sensu, Nginx etc..
http://adithyakhamithkar.github.io/ansible-playbooks
MIT License
726 stars 678 forks source link

/etc/init.d/glassfish: not found #6

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi Adithya,

During the execution of glassfish role script, I got the following error in Start Glassfish task: "stderr": "/bin/sh: 1: /etc/init.d/glassfish: not found". Even though the glassfish script file is in /etc/init.d/.

adithyakhamithkar commented 7 years ago

Let me check and get back

adithyakhamithkar commented 7 years ago

Glassfish is failing to start and i see this in the logs

GlassFish requires Java SE version 6. Your JDK is version 0

Let me try looking for a way to fix it.

adithyakhamithkar commented 7 years ago

I found this https://java.net/jira/browse/GLASSFISH-21479

Glassfish 4.1 won't start with JDK 9 build jdk9-b95 (and later) because of version string change (project verona) .Please refer http://openjdk.java.net/jeps/223.We are getting error in console as
GlassFish requires Java SE version 6. Your JDK is version 0
adithyakhamithkar commented 7 years ago

So i suggest that you use the latest glassfish version.

Get the latest changes that i have checked in. Please make this change in your group vars

glassfish_url : http://download.java.net/glassfish/4.1.1/release/glassfish-4.1.1.zip
glassfish_version : glassfish-4.1.1
adithyakhamithkar commented 7 years ago

I am still getting the same error :(

adithyakhamithkar commented 7 years ago

Try downgrading jdk to 8 it works 👍

ghost commented 7 years ago

Hi Adithya,

Thanks for checking! But my main question is: I am getting "stderr": "/bin/sh: 1: /etc/init.d/glassfish: not found" error in the Start Glassfish task. It is not Java related issue. Do you use Vagrant or any other tool beside ansible?

adithyakhamithkar commented 7 years ago

I use vagrant and my OS is Ubuntu. can you run the playbook with -vvvv lets debug i think it's a problem with your OS or your bash.

I can change it from shell to service. the playbook is not that optimized i can rewrite it.