WFLYCTL0412: Required services that are not installed:

前端 未结 3 855
一向
一向 2021-02-05 08:00

I\'m trying to add a datasource in Wildfly 10.0, but when i test connection this the error message that throws:

Unexpected HTTP response: 500

Request
{
    \"ad         


        
3条回答
  •  太阳男子
    2021-02-05 08:48

    This was the way I created my xa-datasources with jboss-cli console:

    First, I added the driver on /opt/wildfly/modules/system/layers/base/org/postgresql/main. Notice I created the file for the driver module but I also added the jar

    [root@localhost main]# ls -lrta
    total 776
    drwxr-xr-x. 3 root    root        18 abr  4 17:10 ..
    -rwxr-xr-x. 1 wildfly wildfly 790405 abr  4 17:14 postgresql-42.2.2.jar
    -rwxr-xr-x. 1 wildfly wildfly    278 abr 17 17:25 module.xml
    drwxr-xr-x. 2 root    root        53 abr 17 19:40 .
    [root@localhost main]# cat module.xml
    
    
    
    
    
    
    
    
    
    
    

    Next, I created the datasource on console

    jboss-cli.sh --connect --controller=192.168.119.116:9990 --commands='xa-data-source add --name=FrontEndDSXA --profile=full --driver-name="postgresql" --enabled="true" --use-ccm="true" --jndi-name="java:jboss/datasources/FrontEndDSXA" --user-name="user" --password="password" --validate-on-match=true --background-validation=false --prepared-statements-cache-size=50 --share-prepared-statements=true --min-pool-size=5 --max-pool-size=150 --pool-prefill=true --transaction-isolation=TRANSACTION_READ_COMMITTED --check-valid-connection-sql="select 1;" --xa-datasource-properties={ "DatabaseName"=>"frontend", "PortNumber"=>"5432", "ServerName"=>"192.168.119.114" }'
    

    Next, added the profile full to my-server-group on domain.xml

    
        
            
                
            
            
        
    
    

    Finally, I reloaded Wildfly (in my case, host was master as default)

    /opt/wildfly/bin/jboss-cli.sh --connect --controller=192.168.119.116:9990 --commands="reload --host=master"
    

    Now, all the servers on my-server-group, can see the datasource.

    Hope it helps

提交回复
热议问题