fatmcgav / fatmcgav-glassfish

Rewritten Glassfish module to improve functionality and support.
http://github.com/fatmcgav/fatmcgav-glassfish
GNU General Public License v3.0
6 stars 31 forks source link

Error creating domain #25

Closed jonblack closed 10 years ago

jonblack commented 10 years ago

I get the following error during vagrant up using the version of this extension from the forge:

Error: /Stage[main]/Glassfish/Glassfish::Create_domain[hope-domain]/Glassfish::Create_service[hope-domain]/Exec[stop_hope-domain]: Could not evaluate: env: /etc/init.d/glassfish_hope-domain: No such file or directory

Warning: /Stage[main]/Glassfish/Glassfish::Create_domain[hope-domain]/Glassfish::Create_service[hope-domain]/Service[glassfish_hope-domain]: Skipping because of failed dependencies

When I ssh into the machine, the file is there and contains what looks like an init script:

$ ls -lah /etc/init.d/glassfish_*
-rwxr-xr-x 1 root root 1.9K Jun  3 01:05 /etc/init.d/glassfish_hope-domain

When I try to run the script, I don't get any output such as "Stopping service". Moreover, if I run sudo service glassfish_hope-domain stop the service continues running, so I'm convinced the script is broken in some way.

My Vagrantfile is simple:

  config.vm.provision :shell do |shell|
    shell.inline = "mkdir -p /etc/puppet/modules;"
  end

  config.vm.provision :shell do |shell|
    shell.inline = "(puppet module install maestrodev-maven
                     puppet module install fatmcgav-glassfish
                     puppet module install puppetlabs-postgresql
                     puppet module install puppetlabs-git; true;)"
  end

My site.pp uses the following:

class { 'glassfish':
  manage_java      => false,
  create_domain    => true,
  create_service   => true,
  domain_name      => 'hope-domain',
  asadmin_user     => 'admin',
  asadmin_password => 'admin',
  portbase         => '5000',
  require          => Package['unzip']
}
fatmcgav commented 10 years ago

@jonblack Are you able to do a dos2unix on the service file?

I've seen the 'env' error when the file has got Windows return chars in it...

fatmcgav commented 10 years ago

@jonblack Am just prepping a v0.2.0 release. Did dos2unix fix the issue?

jonblack commented 10 years ago

I changed my Vagrantfile to use a newer version of the same image (Ubuntu 14.04 LTS) and the error has gone. If you made a release, that might be the reason why. In any case, I don't have the problem anymore.

fatmcgav commented 10 years ago

@jonblack Cool, cheers for confirming. I suspect you pulled down v0.2.0 release on the latest vagrant up.

Will close this issue off now. :)