biemond / biemond-orawls

Puppet 3/4 module for WebLogic provisioning module ( Linux & Solaris )
Apache License 2.0
63 stars 104 forks source link

Error: Failed to apply catalog: end of file reached on wls_domain #414

Closed rssh22 closed 7 years ago

rssh22 commented 7 years ago

Hi,

I'm getting this ERROR when trying to modify some domain parameters:

root@puppet-pil00:/puppet/wld-pro-04.settings#  /opt/puppetlabs/bin/puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for puppet-pil00.msc.es
Info: Applying configuration version '1488288561'
Notice: class userconfig
Notice: /Stage[main]/Fussion::Config::Storeuserconfig/Notify[class userconfig]/message: defined 'message' as 'class userconfig'
Info: Starting the wls daemon for domain tt
Info: Executing wls-script /tmp/wlstCommonScript.py20170228-8187-16icgm9
Info: Executing wls-script /tmp/wlstScript20170228-8187-10i966a.py with timeout = 120
Info: Connecting to wls on url t3://puppet-pil00.msc.es:10400
Error: Failed to apply catalog: end of file reached

this is the yaml file with the hiera config for the node puppet-pil00.msc.es.yaml:

---
classes: 
 - jdk::install
 - fussion
 - fussion::create::home
 - fussion::create::domain
 - fussion::config::storeuserconfig
 - fussion::config::domain

wls_apps_dir: /puppet/oracle/applications
wls_domains_dir: /puppet/oracle/domains

jdks: 
 'jdk-1.6.0_131':
   install_dir: '/var/tmp/java-1.6.0_131'
   owner: 'root'
   group: 'sys'
   mode: '0755'
   source: '/usr/jdk/jrockit-1.6.0_131.zip'
   build_version: 'R28.3.12-8-172357-1.6.0_131-20160926-2050-solaris-sparcv9'
   ensure: 'present'

middleware_homes:
 'wl_1036':
   version: 1036
   filename: wls1036_generic.jar
   jdk_home_dir: /var/tmp/java-1.6.0_131
   oracle_base_home_dir: /puppet/oracle
   middleware_home_dir: /puppet/oracle/wl1036
   weblogic_home_dir: /puppet/oracle/wl1036/wlserver
   os_user: root
   os_group: root
   download_dir: /puppet/download
   remote_file: false
   wls_apps_dir: /puppet/oracle/applications
   puppet_download_mnt_point: /puppet
orawls_domain_instances:
 'wld-pro-04':
   version: 1036
   domain_name: wld-pro-04
   weblogic_home_dir: /puppet/oracle/wl1036/wlserver
   middleware_home_dir: /puppet/oracle/wl1036/
   wls_apps_dir: /puppet/oracle/applications
   jdk_home_dir: /var/tmp/java-1.6.0_131
   wls_domains_dir: /puppet/domains
   domain_template: standard
   development_mode: false
   adminserver_name: wls-pro-04-sa-adm-n0
   adminserver_machine_name: "%{facts.networking.hostname}"
   adminserver_address: "%{facts.fqdn}"
   adminserver_port: 10400
   nodemanager_port: 5104
   nodemanager_secure_listener: false
   weblogic_user: weblogic
   weblogic_password: welcome1
   nodemanager_username: ndadmin
   nodemanager_password: ndpassword
   jsse_enabled: true
   os_user: root
   os_group: root
   download_dir: /puppet/download
   log_output: true
wls_domain_instances:
  'tt/wld-pro-04':
      ensure: present
      jpa_default_provider: org.eclipse.persistence.jpa.PersistenceProvider
      jta_max_transactions: '20001'
      jta_transaction_timeout: '36'
      log_file_min_size: '5001'
      log_filecount: '5'
      log_filename: "/var/log/weblogic/Wls1036.log"
      log_number_of_files_limited: '1'
      log_rotate_logon_startup: '1'
      log_rotationtype: bySize
      security_crossdomain: '0'
userconfig_instances:
  'wld-pro-04':
     user_config_dir: '/var/tmp'
     weblogic_home_dir: /puppet/oracle/wl1036/wlserver
     domain_name: wld-pro-04
     adminserver_address: puppet-pil00.msc.es
     adminserver_port: 10400
     weblogic_user: weblogic
     weblogic_password: welcome1
     download_dir: /puppet/download
     jdk_home_dir: /var/tmp/java-1.6.0_131
     os_user: root
     os_group: root
     log_output: true

this is the /etc/wls_setting.yaml

---
'tt':
    user: bea
    weblogic_home_dir: '/puppet/oracle/wl1036/wlserver'
    connect_url: "t3://puppet-pil00.msc.es:10400"
    weblogic_user: 'weblogic'
    weblogic_password: 'welcome1'
    require: 'Orawls::Domain[wld-pro-04]'
    debug_module: true
    archive_path: '/puppet/wld-pro-04.settings'

The puppet module seems to fail in the class:


class fussion::config::domain {
  $wls_domain_instances = hiera('wls_domain_instances')
  create_resources('wls_domain', $wls_domain_instances)
}

Could you help me? I don't understand why i'm getting this error. Maybe I just don't understand very well how I must use the module. Could you provide a whole example?

Thanks in advance,

Raúl

biemond commented 7 years ago

Hi,

Can you remove all the other actions and focus on the domain part. We can run it in the debug mode or get the archive script and try it ourselves ( line for line) plus add some debug statements.

I guess the wlst is not valid or we didn't provide the right value/type for something or after the 1st domain change we didn't do an autostart of the adminserver ( subscribe to domain changes)

Hope this helps.

rssh22 commented 7 years ago

Hi Biemond,

I've removed all other actions as you suggested and executed the agent as:

/opt/puppetlabs/bin/puppet agent -t --verbose --debug

I've attached the output in wls_domain_debug.txt file. wls_domain_debug.txt

I'm sorry I'm very lost on it.

biemond commented 7 years ago

so can you do

puppet resource wls_domain on the vm, this will reverse engineer your wls_domain. then we know if the index works

also do you have these entries , this should be the domain modify. I think the generated py script is not valid and wlst crashes. Info: Executing wls-script /tmp/wlstCommonScript.py20170228-9240-9ye34n Info: Executing wls-script /tmp/wlstScript20170228-9240-1bnwsl4.py with timeout = 120

Somehow I don't have a tool to validate wlst scripts before I execute them

rssh22 commented 7 years ago

Hi Biemond,

It is curious but I get the error:

root@puppet-pil00:~# /opt/puppetlabs/bin/puppet resource wls_domain Error: Could not run: end of file reached

Kind Regards, Raúl

biemond commented 7 years ago

this is good news, that means you found the issue , can you add --debug also can you try something else like wls_user or wls_server just to be sure. maybe wls_setting is not ok

rssh22 commented 7 years ago

Hi Biemond,

I solved the problem. Thanks for your support.

The cause was I set up the wls_settings with user: bea instead of user: root (root is currently the domain's user owner)

Thanks a lot