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

provider suport for domain ( Error: Could not find a suitable provider for domain ) #34

Closed dsantanu closed 9 years ago

dsantanu commented 9 years ago

Using this module with Puppet v3.7.1 on Ubuntu 12.04. The basic operation of installing Glassfish works fine but getting constant "Error: Could not find a suitable provider for domain" when trying to create domain with it. Any idea what am I missing? Best!

fatmcgav commented 9 years ago

Hey

Which version are you using?

I worked around the 'asadmin' path issue by creating a profile script in /etc/profile.d which adds GF to the $PATH. So probably worth checking that that file has been created after installation has run through.

dsantanu commented 9 years ago

using v0.3.0 2014-09-26 Already checked the profile.d file for the Glassfish, that reads:

root@p3-c-services-104:~# cat /etc/profile.d/glassfish.sh 
# File managed by Puppet
if [ -d /usr/local/glassfish-3.1.2.2/glassfish/bin ]; then
    PATH=$PATH:/usr/local/glassfish-3.1.2.2/glassfish/bin
fi

which seems just fine to me. The PATH also reflect the same thing:

root@p3-c-services-104:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/glassfish-3.1.2.2/glassfish/bin

Even changed the "command" in "lib/puppet/provider/asadmin.rb" to read like this:

command = "/usr/local/glassfish-3.1.2.2/glassfish/bin/asadmin #{exec_args}"

no joy yet. Best!

fatmcgav commented 9 years ago

Hmm, ok...

Could you put a gist together with the logs from a puppet run, and the manifest you're using to test.

I'll see if I can replicate it over the next few days...

dsantanu commented 9 years ago

hi there,

I was doing a very simple thing. I have custom-fact: ks_nodetype => gf_master and I'm including the glassfish class in the node.pp like this:

if ($::ks_nodetype in [ 'gf_master','gf_worker' ]) {
    class { 'glassfish': 
        create_domain  => true, 
        domain_name    => 'domain1', 
        portbase       => '8000'
    }
}

And that's where I get that "provider not found" error. Nothing more in the logs as well. This module was almost perfect for me but without the domain creation bit, it becomes pretty useless. Please let me know if you want me to do any more/other testing.

Just a quick question:You don't see that al all on Ubuntu VM/machine? I'm using v12.04 if the version matters at all. Best!

fatmcgav commented 9 years ago

@dsantanu Ok, have run some tests for this on a Ubuntu 12.04 VM, and haven't been able to replicate the issue you're seeing...

Log of my run is here: https://gist.github.com/fatmcgav/98870ed2477714cb9388

Are you able to run the test again from a clean slate in debug mode, and put it in a gist/pastebin?

Cheers Gav

dsantanu commented 9 years ago

That's interesting! Where ever I try, I get exactly the same error. Below is the whole debug log (removing the hiera() lines): http://pastebin.com/2WXP2x7y

dsantanu commented 9 years ago

Just tried on a fresh installation with a very simple configuration: exactly the same unfortunately. https://gist.github.com/dsantanu/bb281165bc494cea15af

dsantanu commented 9 years ago

Any update? Or did you able to find out anything yet?

fatmcgav commented 9 years ago

I've still not been able to replicate the issue you're seeing I'm afraid...

There's no confine or defaultfor's in the domain provider that would cause it to be invalid... Worst case is the command would fail with 'unable to find asadmin' if you had a path issue...

dsantanu commented 9 years ago

There is one reported case in puppet-mailinglist: https://groups.google.com/forum/#!topic/puppet-users/d8nBEisDeAU but that was about 2 yrs. ago. But I get exactly same error over and over again, even with a completely fresh installation and with minimum configuration, as I pasted in the gist. Does version of Puppet/Ruby/Ubuntu matter?

Sorry to see such a a good/useful module is not working for me. Best!

fatmcgav commented 9 years ago

What version of the module are you using and from where?

Puppet/Ruby/Ubuntu versions should make a major difference, I've tested it on various...

The only thing you could try is running with debug and trace enabled... -vd --trace should do it... Post that up as a gist and will see if it sheds any more light...

dsantanu commented 9 years ago

Before I [re]start, these are my version information:

root@p1-sant-services-001:~# lsb_release -d
Description:    Ubuntu 12.04.4 LTS
# 
root@p1-sant-services-001:~# puppet --version
3.7.1
# 
root@p1-sant-services-001:~# ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

shouldn't be a prob, I believe. w.r.t. your module version, I used both from puppet-forge and the git-hub. Could you send me download link that you want me to try pls?

fatmcgav commented 9 years ago

Best bet is to use the develop branch from git.

Other than that, versions look fine to me, all have been tested.