example42 / puppet-jboss

Jboss Puppet Module
http://www.example42.com
Other
15 stars 25 forks source link

Problem installing JBoss on Ubuntu #12

Open KlopgeestBe opened 11 years ago

KlopgeestBe commented 11 years ago

Hi

I have the following 'site.pp' file:

class { 'jboss': }

This file is placed into the /etc/puppet/manifests/ directory

When i'll go to this directory and i'll do 'sudo puppet agent apply site.pp' i'll receive the following error: Puppet::Parser:AST::Resource failed with error ArgumentError: Could not find declared class jboss at /etc/puppet/manifests/site.pp:1 on node master.localdomain

Any idea's how i can fix this issue and make sure JBoss is installed correctly?

alvagante commented 11 years ago

It doesn't find the jboss class. Where have you copied the jboss module? The default path where modules are searched is /etc/puppet/modules (and /usr/share/puppet/modules). Do you have something like /etc/puppet/modules/jboss/manifests/init.pp ? Better to ask this question on the Google group https://groups.google.com/forum/?fromgroups#!forum/example42-puppet-modules

KlopgeestBe commented 11 years ago

Thank you, my problem was that the manifest wasn't in the proper /jboss/manifests folder but in the /etc/puppet/manifests folder.

Thanks for your quick reply, great plugin!

KlopgeestBe commented 11 years ago

Next question, i have one instance of JBoss AS 7.1.1 up and running, how can i make more instances of an JBoss AS on one client machine, with just different names, port numbers and so on?

alvagante commented 11 years ago

Use the define jboss::instance https://github.com/example42/puppet-jboss/blob/master/manifests/instance.pp

KlopgeestBe commented 11 years ago

When i have the following manifest (in the /jboss/manifests folder)

include jboss

jboss::instance { "messagereceiver": user => 'receiver', userid => '', group => 'messageconfig', groupid => '', createuser => true, template => 'default', bindaddr => '127.0.0.1', port => '8081', enable => true; run_conf => '', conf_dir => '', deploy_dir => '', deployers_dir => '', }

It gives me the following error when i 'sudo puppet apply thisscript.pp' Chown -R receiver:messageconfig /opt/jboss/server/messagereceiver && touch /opt/jboss/server/messagereceiver/.permissions_set' is not qualified and no path was specified. Please qualify the command or specify a path.

How can I fix this?

alvagante commented 11 years ago

Should be fixed by the above commit

KlopgeestBe commented 11 years ago

Next one:

'cp -a default messagereceiver' is not qualified and no path was specified. Please qualify the command or specify a path.

(Thanks for the quick reply)

alvagante commented 11 years ago

This is very strange, as the fix should have fixed also this error. Can you restart the puppetmaster, if possibile, and rerun puppet on the client?

KlopgeestBe commented 11 years ago

Restarting gave me this error (when i added 'enable => true,') - without quote marks - to the manifest above: Parameter ensure failed: Invalid value "present". Valid values are stopped, running. At /etc/puppet/modules/jboss/manifests/instance.pp:156

I assume there is something wrong with the bool2ensure($enable) variable?

alvagante commented 11 years ago

Try again please, note that I've not tested the fix directly.

KlopgeestBe commented 11 years ago

The 'invalid value "present"' error is gone.

I'm still facing this error: 'cp -a default messagereceiver' is not qualified and no path was specified. Please qualify the command or specify a path.

alvagante commented 11 years ago

This is weird. Try the very latest patch. And also paste is the output of: whereis cp Do you have a skype contact where I can reach you for quicker iteratons?

KlopgeestBe commented 11 years ago

Latest patch fixed that error.

New error: Could not find dependency Exec[Extract_Jboss] for Exec[Clone_Jboss_Instance_messagereceiver] at /etc/puppet/modules/jboss/manifests/instance.pp:141

KlopgeestBe commented 11 years ago

my manifests fails with

Could not start Service[jboss-$name]/ensure change from stopped to running returned 1: at /instance.pp:165 and this is also for the other instance.

Screenshot of error on my Virtual Machine (Ubuntu 13.04, JBoss AS 6) http://d.pr/i/bZxT