Giter Club home page Giter Club logo

Comments (9)

jairojunior avatar jairojunior commented on July 28, 2024

@SanSan- Can you post output with --debug execution? I've seen augeas failing due to missing files...

from puppet-wildfly.

biemond avatar biemond commented on July 28, 2024

Are you using debian, one time I had to do some tricks to update augeas ( I think you need version > 1 )

from puppet-wildfly.

SanSan- avatar SanSan- commented on July 28, 2024

i'm using centos 6.5 on vm.

This is output with --debug:

...
==> web1: Debug: /Stage[main]/Wildfly::Install/Archive[/tmp/wildfly-8.2.0.Final.tar.gz]: The container Class[Wildfly::Install] will propagate my refresh event
==> web1: Debug: Class[Wildfly::Install]: The container Stage[main] will propagate my refresh event
==> web1: Debug: Augeasajp: Opening augeas with root /, lens path , flags 64
==> web1: Debug: Augeasajp: Augeas version 1.0.0 is installed
==> web1: Debug: Augeasajp: Will attempt to save and only run if files changed
==> web1: Debug: Augeasajp: sending command 'set' with params ["/files/opt/wildfly/domain/configuration/domain.xml/server/socket-binding-group/socket-binding[#attribute/name='ajp']/#attribute/port", "${jboss.ajp.port:8009}"]
==> web1: Debug: Augeasajp: Put failed on one or more files, output from /augeas//error:
==> web1: Debug: Augeasajp: /augeas/files/opt/wildfly/domain/configuration/domain.xml/error = put_failed
==> web1: Debug: Augeasajp: /augeas/files/opt/wildfly/domain/configuration/domain.xml/error/path = /files/opt/wildfly/domain/configuration/domain.xml
==> web1: Debug: Augeasajp: /augeas/files/opt/wildfly/domain/configuration/domain.xml/error/lens = /usr/share/augeas/lenses/dist/xml.aug:153.10-155.60:
==> web1: Debug: Augeasajp: /augeas/files/opt/wildfly/domain/configuration/domain.xml/error/message = Failed to match
==> web1: ({ /#declaration/ } | { /#comment/ = /([^\001-\004-]|-[^\001-\004-])/ } | { /!DOCTYPE/ = /[A-Za-z][.0-9A-Z_a-z-]/ } | { /#pi/ })(<<rec:{ /([:A-Z_a-z][.0-:A-Z_a-z-])/ }>> | { /[:A-Z_a-z][.0-:A-Z_a-z-]/ = /#empty/ })({ /#comment/ = /([^\001-\004-]|-[^\001-\004-])/ } | { /#pi/ })*
==> web1: with tree
==> web1: { "#declaration" } { "domain" } { "server" }
==> web1: Debug: Augeasajp: Closed the augeas connection
==> web1: Error: /Stage[main]/Wildfly::Setup/Wildfly::Config::Socket_binding[ajp]/Augeas[ajp]: Could not evaluate: Save failed with return code false, see debug
...

from puppet-wildfly.

jairojunior avatar jairojunior commented on July 28, 2024

@SanSan- Thank you.

I got the error. domain.xml root element is domain, and standalone.xml root element is server.

We'll need a case statement in:

https://github.com/biemond/biemond-wildfly/blob/master/manifests/config/interfaces.pp
https://github.com/biemond/biemond-wildfly/blob/master/manifests/config/socket_binding.pp

from puppet-wildfly.

jairojunior avatar jairojunior commented on July 28, 2024

@SanSan- Domain mode socket-binding management is way more complex than I foresee. I'll prepare a PR that limits socket binding configuration for standalone mode.

I suggest you handle socket-binding using wildfly_cli before I came up with a better solution.

For example: /socket-binding-group=standard-sockets/socket-binding=http/:write-attribute(name=port,value=8080)

from puppet-wildfly.

jairojunior avatar jairojunior commented on July 28, 2024

@SanSan- Hope PR #38 will fix your problem.

Be advised that you'll need

class { 'wildfly':
    mode               => 'domain',
    domain_config => 'domain.xml',
    host_config      => 'host-master.xml'
}

instead of just config in standalone mode

from puppet-wildfly.

SanSan- avatar SanSan- commented on July 28, 2024

@jairojunior , confirm. I did as you wrote. Now when i add domain_config => 'domain.xml' to 'wildfly' class definition, i get:

..
==> web1: Debug: importing '/tmp/vagrant-puppet-4/modules-2/wildfly/manifests/params.pp' in environment production
==> web1: Debug: Automatically imported wildfly::params from wildfly/params into production
==> web1: Error: Invalid parameter domain_config at /tmp/vagrant-puppet-4/modules-0/profile/manifests/wildfly.pp:25 on node web1
..

where wildfly.pp:25 is the end of 'wildfly' class definition. 'Cause these params (domain_config, host_config) didn't declare in init.pp for wildfly class.

PS: And if i just change mode to 'domain' w/o set any config, i pass it. But it failed on datasource definition:

..
==> web1: Error: /Stage[main]/Role::Deploy/Wildfly::Standalone::Datasources::Driver[Driver postgresql]/Wildfly::Util::Resource[/subsystem=datasources/jdbc-driver=postgresql]/Wildfly_resource[/subsystem=datasources/jdbc-driver=postgresql]/ensure: change from absent to present failed: Could not set 'present' on ensure: Failed with: JBAS014883: No resource definition is registered for address [
==> web1: ("subsystem" => "datasources"),
==> web1: ("jdbc-driver" => "postgresql")
==> web1: ] for {"driver-xa-datasource-class-name":"org.postgresql.xa.PGXADataSource","driver-name":"postgresql","address":[{"subsystem":"datasources"},{"jdbc-driver":"postgresql"}],"operation":"add","driver-module-name":"org.postgresql"} at 13:/tmp/vagrant-puppet-4/modules-2/wildfly/manifests/util/resource.pp
..

from puppet-wildfly.

jairojunior avatar jairojunior commented on July 28, 2024

@SanSan- my bad. Forgot to push init.pp

Regarding datasource, it is meant to work in standalone mode only, that's why its called wildfly::standalone::datasources::driver =)

Domain changes generally acts on a specific profile, so, instead of:

/subsystem=datasources/jdbc-driver=postgresql

we would have this path in domain mode:

/profile=full-ha//subsystem=datasources/jdbc-driver=postgresql

You could easily implement a wildfly::domain::datasources::driver based on the standalone version. You'll only need a profile_name parameter.

As a matter of fact, we could have a single configuration definition with a profile_name parameter and it will be suitable for both operation modes, domain and standalone.

But, I don't like to use domain mode with Puppet. More info here: https://github.com/cpitman/puppet-jboss_admin/issues/68#issuecomment-95934493

from puppet-wildfly.

SanSan- avatar SanSan- commented on July 28, 2024

@jairojunior, oops that my fault (w datasource).

yeah, i think, i will implement standalone features for domain cluster.

Thank you for help.

from puppet-wildfly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.