12 Replies Latest reply on Feb 26, 2012 3:46 AM by David Carreras

    JMS Client can't connect to server

    David Carreras Newbie

      Hello,

       

      i'am trying to connect a JMS client to the JMS server (JBoss AS 7 Final).

       

      The connection is done via this code :

       

      DiscoveryGroupConfiguration groupConfig = new DiscoveryGroupConfiguration(231.7.7.7, 9876);
      HornetQConnectionFactory fact = HornetQJMSClient.createConnectionFactoryWithHA(groupConfig, JMSFactoryType.CF);
      Thread.sleep(5000);
      connection = fact.createConnection();
      connection = fact.createConnection();
      session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
      

      ...

       

      I got this error on the client side :

       

      javax.jms.JMSSecurityException: Unable to validate user: null
              at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:312)
              at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:780)
              at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:279)
              at org.hornetq.jms.client.HornetQConnection.authorize(HornetQConnection.java:601)
              at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:684)
              at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:119)
              at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:114)
              at fr.dcns.myn.proxy.JMSGenCommand.connect(JMSGenCommand.java:114)
              at fr.dcns.myn.proxy.JMSSpatioQueueProducer.connect(JMSSpatioQueueProducer.java:171)
              at fr.dcns.myn.proxy.JMSSpatioQueueProducer.run(JMSSpatioQueueProducer.java:143)
              at java.lang.Thread.run(Unknown Source)
      Caused by: HornetQException[errorCode=105 message=Unable to validate user: null]
              ... 11 more
      

       

      and this one on the server side :

       

      16:07:46,546 ERROR [org.jboss.security.auth.spi.UsersRolesLoginModule] (Old I/O server worker (parentId: 4461961, [id: 0x00441589, PC-David/xxx.xxx.xxx.xxx:5445])) Failed to load users/passwords/role files: java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found
          at org.jboss.security.auth.spi.Util.loadProperties(Util.java:228) [picketbox-4.0.6.final.jar:4.0.6.final]
          at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:189) [picketbox-4.0.6.final.jar:4.0.6.final]
          at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:203) [picketbox-4.0.6.final.jar:4.0.6.final]
          at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:130) [picketbox-4.0.6.final.jar:4.0.6.final]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_21]
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_21]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_21]
          at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_21]
          at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756) [rt.jar:1.6.0_21]
          at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186) [rt.jar:1.6.0_21]
          at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683) [rt.jar:1.6.0_21]
          at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.6.0_21]
          at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680) [rt.jar:1.6.0_21]
          at javax.security.auth.login.LoginContext.login(LoginContext.java:579) [rt.jar:1.6.0_21]
          at org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:449) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]
          at org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:383) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]
          at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:371) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]
          at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:160) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]
          at org.jboss.as.messaging.HornetQSecurityManagerAS7.validateUser(HornetQSecurityManagerAS7.java:39) [jboss-as-messaging-7.1.0.Final.jar:7.1.0.Final]
          at org.hornetq.core.security.impl.SecurityStoreImpl.authenticate(SecurityStoreImpl.java:134) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.server.impl.HornetQServerImpl.createSession(HornetQServerImpl.java:807) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handleCreateSession(HornetQPacketHandler.java:187) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handlePacket(HornetQPacketHandler.java:85) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:508) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:556) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:517) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:533) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:73) [hornetq-core-2.2.11.Final.jar:]
          at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:534) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:287) [netty-3.2.6.Final.jar:]
          at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.decode(HornetQFrameDecoder2.java:169) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.messageReceived(HornetQFrameDecoder2.java:134) [hornetq-core-2.2.11.Final.jar:]
          at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:367) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:100) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:181) [netty-3.2.6.Final.jar:]
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_21]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_21]
          at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_21]
      
      16:07:46,718 ERROR [org.hornetq.core.protocol.core.impl.HornetQPacketHandler] (Old I/O server worker (parentId: 4461961, [id: 0x00441589, PC-David/xxx.xxx.x.x:5445])) Failed to create session : HornetQException[errorCode=105 message=Unable to validate user: null]
          at org.hornetq.core.security.impl.SecurityStoreImpl.authenticate(SecurityStoreImpl.java:147) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.server.impl.HornetQServerImpl.createSession(HornetQServerImpl.java:807) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handleCreateSession(HornetQPacketHandler.java:187) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handlePacket(HornetQPacketHandler.java:85) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:508) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:556) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:517) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:533) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:73) [hornetq-core-2.2.11.Final.jar:]
          at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:534) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:287) [netty-3.2.6.Final.jar:]
          at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.decode(HornetQFrameDecoder2.java:169) [hornetq-core-2.2.11.Final.jar:]
          at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.messageReceived(HornetQFrameDecoder2.java:134) [hornetq-core-2.2.11.Final.jar:]
          at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:367) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:100) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44) [netty-3.2.6.Final.jar:]
          at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:181) [netty-3.2.6.Final.jar:]
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_21]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_21]
          at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_21]
      

       

      I didn't change the security settings in my configuration file (standalone-full-ha.xml) : configured for guest role.

       

      Someone can help me ?

        • 1. Re: JMS Client can't connect to server
          Justin Bertram Master

          Can you elaborate on the changes you made in standalone-full-ha.xml?  By default JMS is secured so normally you would need to run add-user.sh to add a user to the application realm, but since you've made changes I'm not sure that applies anymore.

          • 2. Re: JMS Client can't connect to server
            David Carreras Newbie

            here is my config file :

             

                          

            <?xml version='1.0' encoding='UTF-8'?>

             

            <server xmlns="urn:jboss:domain:1.1">

             

                <extensions>

                    <extension module="org.jboss.as.clustering.infinispan"/>

                    <extension module="org.jboss.as.clustering.jgroups"/>

                    <extension module="org.jboss.as.cmp"/>

                    <extension module="org.jboss.as.configadmin"/>

                    <extension module="org.jboss.as.connector"/>

                    <extension module="org.jboss.as.deployment-scanner"/>

                    <extension module="org.jboss.as.ee"/>

                    <extension module="org.jboss.as.ejb3"/>

                    <extension module="org.jboss.as.jacorb"/>

                    <extension module="org.jboss.as.jaxr"/>

                    <extension module="org.jboss.as.jaxrs"/>

                    <extension module="org.jboss.as.jdr"/>

                    <extension module="org.jboss.as.jmx"/>

                    <extension module="org.jboss.as.jpa"/>

                    <extension module="org.jboss.as.jsr77"/>

                    <extension module="org.jboss.as.logging"/>

                    <extension module="org.jboss.as.mail"/>

                    <extension module="org.jboss.as.messaging"/>

                    <extension module="org.jboss.as.modcluster"/>

                    <extension module="org.jboss.as.naming"/>

                    <extension module="org.jboss.as.osgi"/>

                    <extension module="org.jboss.as.pojo"/>

                    <extension module="org.jboss.as.remoting"/>

                    <extension module="org.jboss.as.sar"/>

                    <extension module="org.jboss.as.security"/>

                    <extension module="org.jboss.as.threads"/>

                    <extension module="org.jboss.as.transactions"/>

                    <extension module="org.jboss.as.web"/>

                    <extension module="org.jboss.as.webservices"/>

                    <extension module="org.jboss.as.weld"/>

                </extensions>

             

                <management>

                    <security-realms>

                        <security-realm name="ManagementRealm">

                            <authentication>

                                <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>

                            </authentication>

                        </security-realm>

                    </security-realms>

                    <management-interfaces>

                        <native-interface security-realm="ManagementRealm">

                            <socket-binding native="management-native"/>

                        </native-interface>

                        <http-interface security-realm="ManagementRealm">

                            <socket-binding http="management-http"/>

                        </http-interface>

                    </management-interfaces>

                </management>

             

                <profile>

                    <subsystem xmlns="urn:jboss:domain:logging:1.1">

                        <console-handler name="CONSOLE">

                            <level name="INFO"/>

                            <formatter>

                                <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                            </formatter>

                        </console-handler>

                        <periodic-rotating-file-handler name="FILE">

                            <formatter>

                                <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                            </formatter>

                            <file relative-to="jboss.server.log.dir" path="server.log"/>

                            <suffix value=".yyyy-MM-dd"/>

                            <append value="true"/>

                        </periodic-rotating-file-handler>

                        <logger category="com.arjuna">

                            <level name="WARN"/>

                        </logger>

                        <logger category="org.apache.tomcat.util.modeler">

                            <level name="WARN"/>

                        </logger>

                        <logger category="sun.rmi">

                            <level name="WARN"/>

                        </logger>

                        <logger category="jacorb">

                            <level name="WARN"/>

                        </logger>

                        <logger category="jacorb.config">

                            <level name="ERROR"/>

                        </logger>

                        <logger category="fr.dcns">

                            <level name="DEBUG"/>

                        </logger>

                        <root-logger>

                            <level name="INFO"/>

                            <handlers>

                                <handler name="CONSOLE"/>

                                <handler name="FILE"/>

                            </handlers>

                        </root-logger>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:cmp:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:datasources:1.0">

                        <datasources>

                            <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">

                                <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>

                                <driver>h2</driver>

                                <security>

                                    <user-name>sa</user-name>

                                    <password>sa</password>

                                </security>

                            </datasource>

                            <datasource jta="false" jndi-name="java:/MarylinDS" pool-name="MarylinDS" enabled="true" use-ccm="false">

                                <connection-url>jdbc:mysql://localhost:3306/MarylinDB</connection-url>

                                <driver>com.mysql</driver>

                                <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

                                <pool>

                                    <min-pool-size>10</min-pool-size>

                                    <max-pool-size>100</max-pool-size>

                                    <prefill>true</prefill>

                                </pool>

                                <security>

                                    <user-name>root</user-name>

                                    <password>marylin</password>

                                </security>

                                <statement>

                                    <prepared-statement-cache-size>32</prepared-statement-cache-size>

                                    <share-prepared-statements>true</share-prepared-statements>

                                </statement>

                            </datasource>

                            <drivers>

                                <driver name="h2" module="com.h2database.h2">

                                    <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                                </driver>

                                <driver name="com.mysql" module="com.mysql">

                                    <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>

                                </driver>

                            </drivers>

                        </datasources>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">

                        <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:ee:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:ejb3:1.2">

                        <session-bean>

                            <stateless>

                                <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                            </stateless>

                            <stateful default-access-timeout="5000" cache-ref="simple" clustered-cache-ref="clustered"/>

                            <singleton default-access-timeout="5000"/>

                        </session-bean>

                        <mdb>

                            <resource-adapter-ref resource-adapter-name="hornetq-ra"/>

                            <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>

                        </mdb>

                        <pools>

                            <bean-instance-pools>

                                <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                                <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                            </bean-instance-pools>

                        </pools>

                        <caches>

                            <cache name="simple" aliases="NoPassivationCache"/>

                            <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>

                            <cache name="clustered" passivation-store-ref="infinispan" aliases="StatefulTreeCache"/>

                        </caches>

                        <passivation-stores>

                            <file-passivation-store name="file"/>

                            <cluster-passivation-store name="infinispan" cache-container="ejb"/>

                        </passivation-stores>

                        <async thread-pool-name="default"/>

                        <timer-service thread-pool-name="default">

                            <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>

                        </timer-service>

                        <remote connector-ref="remoting-connector" thread-pool-name="default"/>

                        <thread-pools>

                            <thread-pool name="default">

                                <max-threads count="10"/>

                                <keepalive-time time="100" unit="milliseconds"/>

                            </thread-pool>

                        </thread-pools>

                        <iiop enable-by-default="false" use-qualified-name="false"/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:infinispan:1.1" default-cache-container="cluster">

                        <cache-container name="cluster" aliases="ha-partition" default-cache="default">

                            <transport lock-timeout="60000"/>

                            <replicated-cache name="default" mode="SYNC" batching="true">

                                <locking isolation="REPEATABLE_READ"/>

                            </replicated-cache>

                        </cache-container>

                        <cache-container name="web" aliases="standard-session-cache" default-cache="repl">

                            <transport lock-timeout="60000"/>

                            <replicated-cache name="repl" mode="ASYNC" batching="true">

                                <file-store/>

                            </replicated-cache>

                            <replicated-cache name="sso" mode="SYNC" batching="true"/>

                            <distributed-cache name="dist" mode="ASYNC" batching="true">

                                <file-store/>

                            </distributed-cache>

                        </cache-container>

                        <cache-container name="ejb" aliases="sfsb sfsb-cache" default-cache="repl">

                            <transport lock-timeout="60000"/>

                            <replicated-cache name="repl" mode="ASYNC" batching="true">

                                <eviction strategy="LRU"/>

                                <file-store/>

                            </replicated-cache>

                            <replicated-cache name="remote-connector-client-mappings" mode="SYNC" batching="true"/>

                            <distributed-cache name="dist" mode="ASYNC" batching="true">

                                <eviction strategy="LRU"/>

                                <file-store/>

                            </distributed-cache>

                        </cache-container>

                        <cache-container name="hibernate" default-cache="local-query">

                            <transport lock-timeout="60000"/>

                            <local-cache name="local-query">

                                <transaction mode="NONE"/>

                                <eviction strategy="LRU" max-entries="10000"/>

                                <expiration max-idle="100000"/>

                            </local-cache>

                            <invalidation-cache name="entity" mode="SYNC">

                                <transaction mode="NON_XA"/>

                                <eviction strategy="LRU" max-entries="10000"/>

                                <expiration max-idle="100000"/>

                            </invalidation-cache>

                            <replicated-cache name="timestamps" mode="ASYNC">

                                <transaction mode="NONE"/>

                                <eviction strategy="NONE"/>

                            </replicated-cache>

                        </cache-container>

                        <cache-container name="myn" aliases="marylin-cache" default-cache="params" jndi-name="java:jboss/myn">

                            <transport lock-timeout="60000"/>

                            <replicated-cache name="params" mode="ASYNC" batching="true">

                                <file-store/>

                            </replicated-cache>

                            <replicated-cache name="services" mode="ASYNC" batching="true">

                                <file-store/>

                            </replicated-cache>

                            <replicated-cache name="states" mode="ASYNC" batching="true">

                                <file-store/>

                            </replicated-cache>

                            <replicated-cache name="commands" mode="ASYNC" batching="true">

                                <file-store/>

                            </replicated-cache>

                            <replicated-cache name="scf" mode="ASYNC" batching="true">

                                <file-store/>

                            </replicated-cache>

                        </cache-container>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jacorb:1.1">

                        <orb>

                            <initializers security="on" transactions="spec"/>

                        </orb>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jaxr:1.0">

                        <connection-factory jndi-name="java:jboss/jaxr/ConnectionFactory"/>

                        <juddi-server publish-url="http://localhost:8080/juddi/publish" query-url="http://localhost:8080/juddi/query"/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:jca:1.1">

                        <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>

                        <bean-validation enabled="false"/>

                        <default-workmanager>

                            <short-running-threads>

                                <core-threads count="50"/>

                                <queue-length count="50"/>

                                <max-threads count="50"/>

                                <keepalive-time time="10" unit="seconds"/>

                            </short-running-threads>

                            <long-running-threads>

                                <core-threads count="50"/>

                                <queue-length count="50"/>

                                <max-threads count="50"/>

                                <keepalive-time time="10" unit="seconds"/>

                            </long-running-threads>

                        </default-workmanager>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:jgroups:1.1" default-stack="udp">

                        <stack name="udp">

                            <transport type="UDP" socket-binding="jgroups-udp" diagnostics-socket-binding="jgroups-diagnostics"/>

                            <protocol type="PING"/>

                            <protocol type="MERGE2"/>

                            <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>

                            <protocol type="FD"/>

                            <protocol type="VERIFY_SUSPECT"/>

                            <protocol type="BARRIER"/>

                            <protocol type="pbcast.NAKACK"/>

                            <protocol type="UNICAST2"/>

                            <protocol type="pbcast.STABLE"/>

                            <protocol type="pbcast.GMS"/>

                            <protocol type="UFC"/>

                            <protocol type="MFC"/>

                            <protocol type="FRAG2"/>

                        </stack>

                        <stack name="tcp">

                            <transport type="TCP" socket-binding="jgroups-tcp" diagnostics-socket-binding="jgroups-diagnostics"/>

                            <protocol type="MPING" socket-binding="jgroups-mping"/>

                            <protocol type="MERGE2"/>

                            <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>

                            <protocol type="FD"/>

                            <protocol type="VERIFY_SUSPECT"/>

                            <protocol type="BARRIER"/>

                            <protocol type="pbcast.NAKACK"/>

                            <protocol type="UNICAST2"/>

                            <protocol type="pbcast.STABLE"/>

                            <protocol type="pbcast.GMS"/>

                            <protocol type="UFC"/>

                            <protocol type="MFC"/>

                            <protocol type="FRAG2"/>

                        </stack>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jmx:1.1">

                        <show-model value="true"/>

                        <remoting-connector/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jpa:1.0">

                        <jpa default-datasource=""/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:mail:1.0">

                        <mail-session jndi-name="java:jboss/mail/Default">

                            <smtp-server outbound-socket-binding-ref="mail-smtp"/>

                        </mail-session>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:messaging:1.1">

                        <hornetq-server>

                            <clustered>true</clustered>

                            <persistence-enabled>true</persistence-enabled>

                            <journal-file-size>102400</journal-file-size>

                            <journal-min-files>2</journal-min-files>

             

                            <connectors>

                                <netty-connector name="netty" socket-binding="messaging"/>

                                <netty-connector name="netty-throughput" socket-binding="messaging-throughput">

                                    <param key="batch-delay" value="50"/>

                                </netty-connector>

                                <in-vm-connector name="in-vm" server-id="0"/>

                            </connectors>

             

                            <acceptors>

                                <netty-acceptor name="netty" socket-binding="messaging"/>

                                <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">

                                    <param key="batch-delay" value="50"/>

                                    <param key="direct-deliver" value="false"/>

                                </netty-acceptor>

                                <in-vm-acceptor name="in-vm" server-id="0"/>

                            </acceptors>

             

                            <broadcast-groups>

                                <broadcast-group name="bg-group1">

                                    <group-address>231.7.7.7</group-address>

                                    <group-port>9876</group-port>

                                    <broadcast-period>5000</broadcast-period>

                                    <connector-ref>

                                        netty

                                    </connector-ref>

                                </broadcast-group>

                            </broadcast-groups>

             

                            <discovery-groups>

                                <discovery-group name="dg-group1">

                                    <group-address>231.7.7.7</group-address>

                                    <group-port>9876</group-port>

                                    <refresh-timeout>10000</refresh-timeout>

                                </discovery-group>

                            </discovery-groups>

             

                            <cluster-connections>

                                <cluster-connection name="my-cluster">

                                    <address>jms</address>

                                    <connector-ref>netty</connector-ref>

                                    <discovery-group-ref discovery-group-name="dg-group1"/>

                                </cluster-connection>

                            </cluster-connections>

             

                            <security-settings>

                                <security-setting match="#">

                                    <permission type="send" roles="guest"/>

                                    <permission type="consume" roles="guest"/>

                                    <permission type="createNonDurableQueue" roles="guest"/>

                                    <permission type="deleteNonDurableQueue" roles="guest"/>

                                </security-setting>

                            </security-settings>

             

                            <address-settings>

                                <address-setting match="#">

                                    <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                                    <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                                    <redelivery-delay>0</redelivery-delay>

                                    <max-size-bytes>10485760</max-size-bytes>

                                    <address-full-policy>BLOCK</address-full-policy>

                                    <message-counter-history-day-limit>10</message-counter-history-day-limit>

                                    <redistribution-delay>1000</redistribution-delay>

                                </address-setting>

                            </address-settings>

             

                            <jms-connection-factories>

                                <connection-factory name="InVmConnectionFactory">

                                    <connectors>

                                        <connector-ref connector-name="in-vm"/>

                                    </connectors>

                                    <entries>

                                        <entry name="java:/ConnectionFactory"/>

                                    </entries>

                                </connection-factory>

                                <connection-factory name="RemoteConnectionFactory">

                                    <connectors>

                                        <connector-ref connector-name="netty"/>

                                    </connectors>

                                    <entries>

                                        <entry name="RemoteConnectionFactory"/>

                                        <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>

                                    </entries>

                                </connection-factory>

                                <pooled-connection-factory name="hornetq-ra">

                                    <transaction mode="xa"/>

                                    <connectors>

                                        <connector-ref connector-name="in-vm"/>

                                    </connectors>

                                    <entries>

                                        <entry name="java:/JmsXA"/>

                                    </entries>

                                </pooled-connection-factory>

                            </jms-connection-factories>

             

                            <jms-destinations>

                                <jms-queue name="testQueue">

                                    <entry name="queue/test"/>

                                    <entry name="java:jboss/exported/jms/queue/test"/>

                                </jms-queue>

                                <jms-queue name="ReplayQueue">

                                    <entry name="queue/ReplayQueue"/>

                                    <durable>false</durable>

                                </jms-queue>

                                <jms-queue name="DS_SAR_Alert_Queue">

                                    <entry name="queue/DS_SAR_Alert_Queue"/>

                                    <durable>false</durable>

                                </jms-queue>

                                <jms-queue name="DS_SAR_Com_Queue">

                                    <entry name="queue/DS_SAR_Com_Queue"/>

                                    <durable>false</durable>

                                </jms-queue>

                                <jms-queue name="DS_SAR_Ops_Queue">

                                    <entry name="queue/DS_SAR_Ops_Queue"/>

                                    <durable>false</durable>

                                </jms-queue>

                                <jms-queue name="DS_SAR_DynShip_Queue">

                                    <entry name="queue/DS_SAR_DynShip_Queue"/>

                                    <durable>false</durable>

                                </jms-queue>

                                <jms-queue name="DS_SAR_Gonio_Queue">

                                    <entry name="queue/DS_SAR_Gonio_Queue"/>

                                    <durable>false</durable>

                                </jms-queue>

                                <jms-queue name="SAR_DS_Mail_Queue">

                                    <entry name="queue/SAR_DS_Mail_Queue"/>

                                    <durable>false</durable>

                                </jms-queue>

                                <jms-queue name="SAR_DS_Ops_Queue">

                                    <entry name="queue/SAR_DS_Ops_Queue"/>

                                    <durable>false</durable>

                                </jms-queue>

                                <jms-queue name="SCF_SPA_TC_Queue">

                                    <entry name="queue/SCF_SPA_TC_Queue"/>

                                    <durable>false</durable>

                                </jms-queue>

                                <jms-queue name="SCF_RAD_TC_Queue">

                                    <entry name="queue/SCF_RAD_TC_Queue"/>

                                    <durable>false</durable>

                                </jms-queue>

                                <jms-queue name="DS_SAR_ShipInfo_Queue">

                                    <entry name="queue/DS_SAR_ShipInfo_Queue"/>

                                    <durable>false</durable>

                                </jms-queue>

                                <jms-queue name="DS_SAR_Ship_Queue">

                                    <entry name="queue/DS_SAR_Ship_Queue"/>

                                    <durable>false</durable>

                                </jms-queue>

                                <jms-topic name="testTopic">

                                    <entry name="topic/test"/>

                                    <entry name="java:jboss/exported/jms/topic/test"/>

                                </jms-topic>

                                <jms-topic name="SCF_RAD_Com_Topic">

                                    <entry name="topic/SCF_RAD_Com_Topic"/>

                                </jms-topic>

                                <jms-topic name="SCF_Flex_Ship_Topic">

                                    <entry name="topic/SCF_Flex_Ship_Topic"/>

                                </jms-topic>

                                <jms-topic name="SCF_Flex_DynShip_Topic">

                                    <entry name="topic/SCF_Flex_DynShip_Topic"/>

                                </jms-topic>

                                <jms-topic name="SCF_Flex_ASC_Topic">

                                    <entry name="topic/SCF_Flex_ASC_Topic"/>

                                </jms-topic>

                                <jms-topic name="SCF_Archive_Situ_Topic">

                                    <entry name="topic/SCF_Archive_Situ_Topic"/>

                                </jms-topic>

                                <jms-topic name="SCF_Archive_Gonio_Topic">

                                    <entry name="topic/SCF_Archive_Gonio_Topic"/>

                                </jms-topic>

                            </jms-destinations>

                        </hornetq-server>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:modcluster:1.0">

                        <mod-cluster-config advertise-socket="modcluster"/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:naming:1.1"/>

                    <subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">

                        <properties>

                            <property name="org.osgi.framework.startlevel.beginning">

                                1

                            </property>

                        </properties>

                        <capabilities>

                            <capability name="javax.servlet.api:v25"/>

                            <capability name="javax.transaction.api"/>

                            <capability name="org.apache.felix.log" startlevel="1"/>

                            <capability name="org.jboss.osgi.logging" startlevel="1"/>

                            <capability name="org.apache.felix.configadmin" startlevel="1"/>

                            <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>

                        </capabilities>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:remoting:1.1">

                        <connector name="remoting-connector" socket-binding="remoting"/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:sar:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:security:1.1">

                        <security-domains>

                            <security-domain name="other" cache-type="default">

                                <authentication>

                                    <login-module code="UsersRoles" flag="required"/>

                                </authentication>

                            </security-domain>

                            <security-domain name="jboss-web-policy" cache-type="default">

                                <authorization>

                                    <policy-module code="Delegating" flag="required"/>

                                </authorization>

                            </security-domain>

                            <security-domain name="jboss-ejb-policy" cache-type="default">

                                <authorization>

                                    <policy-module code="Delegating" flag="required"/>

                                </authorization>

                            </security-domain>

                            <security-domain name="messaging" cache-type="default">

                                <authentication>

                                    <login-module code="UsersRoles" flag="required">

                                        <module-option name="usersProperties" value="${jboss.server.config.dir}/messaging-users.properties"/>

                                        <module-option name="rolesProperties" value="${jboss.server.config.dir}/messaging-roles.properties"/>

                                    </login-module>

                                </authentication>

                            </security-domain>

                        </security-domains>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:threads:1.1"/>

                    <subsystem xmlns="urn:jboss:domain:transactions:1.1">

                        <core-environment>

                            <process-id>

                                <uuid/>

                            </process-id>

                        </core-environment>

                        <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

                        <coordinator-environment default-timeout="300"/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:web:1.1" native="false" default-virtual-server="default-host">

                        <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

                        <connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" enable-lookups="false" secure="true">

                            <ssl name="ssl" password="pass" certificate-key-file="C:\test\one.ks" protocol="ALL" verify-client="true" ca-certificate-file="C:\test\one.ks"/>

                        </connector>

                        <virtual-server name="default-host" enable-welcome-root="true">

                            <alias name="localhost"/>

                            <alias name="example.com"/>

                        </virtual-server>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:webservices:1.1">

                        <modify-wsdl-address>true</modify-wsdl-address>

                        <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>

                        <endpoint-config name="Standard-Endpoint-Config"/>

                        <endpoint-config name="Recording-Endpoint-Config">

                            <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">

                                <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>

                            </pre-handler-chain>

                        </endpoint-config>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:weld:1.0"/>

                </profile>

             

                <interfaces>

                    <interface name="management">

                        <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>

                    </interface>

                    <interface name="public">

                        <inet-address value="${jboss.bind.address:127.0.0.1}"/>

                    </interface>

                    <interface name="unsecure">

                        <inet-address value="127.0.0.1"/>

                    </interface>

                </interfaces>

             

                <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

                    <socket-binding name="http" port="8080"/>

                    <socket-binding name="https" port="8443"/>

                    <socket-binding name="jacorb" interface="unsecure" port="3528"/>

                    <socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/>

                    <socket-binding name="jgroups-diagnostics" port="0" multicast-address="224.0.75.75" multicast-port="7500"/>

                    <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>

                    <socket-binding name="jgroups-tcp" port="7600"/>

                    <socket-binding name="jgroups-tcp-fd" port="57600"/>

                    <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>

                    <socket-binding name="jgroups-udp-fd" port="54200"/>

                    <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>

                    <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>

                    <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>

                    <socket-binding name="messaging" port="5445"/>

                    <socket-binding name="messaging-throughput" port="5455"/>

                    <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>

                    <socket-binding name="osgi-http" interface="management" port="8090"/>

                    <socket-binding name="remoting" port="4447"/>

                    <socket-binding name="txn-recovery-environment" port="4712"/>

                    <socket-binding name="txn-status-manager" port="4713"/>

                    <outbound-socket-binding name="mail-smtp">

                        <remote-destination host="localhost" port="25"/>

                    </outbound-socket-binding>

                </socket-binding-group>

             

            </server>

             

             

            i have add one user to the default management realm in order to acces the web console.

            • 3. Re: JMS Client can't connect to server
              David Carreras Newbie

              Same error using the jndi way described here : https://issues.jboss.org/browse/AS7-1338

               

              Code :

               

                         

                          System.out.println("3");
                          final Properties env = new Properties();
                          env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
                          env.put(Context.PROVIDER_URL, "remote://localhost:4447");
                          context = new InitialContext(env);
                          System.out.println("4");
                          ConnectionFactory cf = (ConnectionFactory) context.lookup("jms/RemoteConnectionFactory");
                          System.out.println("5");
                          Queue queue = (Queue) context.lookup("jms/queue/test");
                          System.out.println("6");
                          con = cf.createConnection("guest", "guest");
                          System.out.println("7");
                          session = con.createSession(false, Session.CLIENT_ACKNOWLEDGE);
                          System.out.println("8");
                          MessageProducer producer = session.createProducer(queue);
              

               

              i will try with a jboss 7 with default configuration.

              • 4. Re: JMS Client can't connect to server
                David Carreras Newbie

                With the default standalone-full.xml i got the following error on the client side :

                 

                ERROR: JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
                javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.RuntimeException: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed]
                    at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:36)
                    at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:117)
                    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
                    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
                    at javax.naming.InitialContext.init(InitialContext.java:223)
                    at javax.naming.InitialContext.<init>(InitialContext.java:197)
                    at TestNewJMS.startClient(TestNewJMS.java:41)
                    at TestNewJMS.main(TestNewJMS.java:23)
                Caused by: java.lang.RuntimeException: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
                    at org.jboss.naming.remote.protocol.IoFutureHelper.get(IoFutureHelper.java:87)
                    at org.jboss.naming.remote.client.cache.ConnectionCache.get(ConnectionCache.java:42)
                    at org.jboss.naming.remote.client.InitialContextFactory.createConnection(InitialContextFactory.java:153)
                    at org.jboss.naming.remote.client.InitialContextFactory.getOrCreateConnection(InitialContextFactory.java:126)
                    at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:106)
                    ... 6 more
                Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
                    at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:365)
                    at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:214)
                    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
                    at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)
                    at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)
                    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
                    at org.xnio.nio.NioHandle.run(NioHandle.java:90)
                    at org.xnio.nio.WorkerThread.run(WorkerThread.java:184)
                    at ...asynchronous invocation...(Unknown Source)
                    at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:270)
                    at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:251)
                    at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:349)
                    at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:333)
                    at org.jboss.naming.remote.client.cache.EndpointCache$EndpointWrapper.connect(EndpointCache.java:110)
                    at org.jboss.naming.remote.client.cache.ConnectionCache.get(ConnectionCache.java:41)
                    ... 9 more
                

                 

                No error on server side.

                 

                Maybe a problem with the org.jboss.remoting3.remote lib version included in my api ?

                • 5. Re: JMS Client can't connect to server
                  Justin Bertram Master

                  You aren't passing the proper credentials to perform the JNDI lookup.  You need to use this:

                   

                    env.put(Context.SECURITY_PRINCIPAL, "guest");

                    env.put(Context.SECURITY_CREDENTIALS, "guest");

                   

                  This assumes you've added the user "guest" with a password of "guest" to the Application Realm using add-user.sh.

                  • 6. Re: JMS Client can't connect to server
                    Justin Bertram Master

                    Just to be clear, this looks like an old version of standalone*.xml because it is using properties files for JMS security.  This was changed in AS 7.1.Final to use a security-realm.

                    • 7. Re: JMS Client can't connect to server
                      David Carreras Newbie

                      thanks Justin

                      Just to be clear, this looks like an old version of standalone*.xml because it is using properties files for JMS security.  This was changed in AS 7.1.Final to use a security-realm.

                       

                      Can you tell me what part of the standalone*.xml file is out of date ? I can't find what's going wrong.

                      I checked the standalone-full.xml in my initial zip file downloaded from jboss site and the security-settings element seems to be the same.

                      • 8. Re: JMS Client can't connect to server
                        David Carreras Newbie

                        I compared the two folowing files : standalone-full.xml and standalone-full-ha.xml (directly from the zip : without any modifications from myself)

                         

                        Here the differences noticed :

                         

                        standalone-full.xmlstandalone-full-ha.xml
                        <management>
                                <security-realms>
                                    <security-realm name="ManagementRealm">
                                        <authentication>
                                            <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
                                        </authentication>
                                    </security-realm>
                                    <security-realm name="ApplicationRealm">
                                        <authentication>
                                            <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
                                        </authentication>
                                    </security-realm>
                                </security-realms>
                                <management-interfaces>
                                    <native-interface security-realm="ManagementRealm">
                                        <socket-binding native="management-native"/>
                                    </native-interface>
                                    <http-interface security-realm="ManagementRealm">
                                        <socket-binding http="management-http"/>
                                    </http-interface>
                                </management-interfaces>
                            </management>
                        <management>
                                <security-realms>
                                    <security-realm name="ManagementRealm">
                                        <authentication>
                                            <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
                                        </authentication>
                                    </security-realm>
                                </security-realms>
                                <management-interfaces>
                                    <native-interface security-realm="ManagementRealm">
                                        <socket-binding native="management-native"/>
                                    </native-interface>
                                    <http-interface security-realm="ManagementRealm">
                                        <socket-binding http="management-http"/>
                                    </http-interface>
                                </management-interfaces>
                            </management>

                         

                        I think the missing line for "application realm" is needed : is it an issue for bugtracking ?

                         

                        I also found a problem here :

                         

                        standalone-full.xmlstandalone-full-ha.xml
                        <subsystem xmlns="urn:jboss:domain:security:1.1">
                                    <security-domains>
                                        <security-domain name="other" cache-type="default">
                                            <authentication>
                                                <login-module code="Remoting" flag="optional">
                                                    <module-option name="password-stacking" value="useFirstPass"/>
                                                </login-module>
                                                <login-module code="RealmUsersRoles" flag="required">
                                                    <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>
                                                    <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>
                                                    <module-option name="realm" value="ApplicationRealm"/>
                                                    <module-option name="password-stacking" value="useFirstPass"/>
                                                </login-module>
                                            </authentication>
                                        </security-domain>
                                        <security-domain name="jboss-web-policy" cache-type="default">
                                            <authorization>
                                                <policy-module code="Delegating" flag="required"/>
                                            </authorization>
                                        </security-domain>
                                        <security-domain name="jboss-ejb-policy" cache-type="default">
                                            <authorization>
                                                <policy-module code="Delegating" flag="required"/>
                                            </authorization>
                                        </security-domain>
                                    </security-domains>
                                </subsystem>
                        <subsystem xmlns="urn:jboss:domain:security:1.1">
                                    <security-domains>
                                        <security-domain name="other" cache-type="default">
                                            <authentication>
                                                <login-module code="UsersRoles" flag="required"/>
                                            </authentication>
                                        </security-domain>
                                        <security-domain name="jboss-web-policy" cache-type="default">
                                            <authorization>
                                                <policy-module code="Delegating" flag="required"/>
                                            </authorization>
                                        </security-domain>
                                        <security-domain name="jboss-ejb-policy" cache-type="default">
                                            <authorization>
                                                <policy-module code="Delegating" flag="required"/>
                                            </authorization>
                                        </security-domain>
                                        <security-domain name="messaging" cache-type="default">
                                            <authentication>
                                                <login-module code="UsersRoles" flag="required">
                                                    <module-option name="usersProperties" value="${jboss.server.config.dir}/messaging-users.properties"/>
                                                    <module-option name="rolesProperties" value="${jboss.server.config.dir}/messaging-roles.properties"/>
                                                </login-module>
                                            </authentication>
                                        </security-domain>
                                    </security-domains>
                                </subsystem>

                         

                        As you can see the security serttings refer to messaging-users.properties which does not exist in jboss 7 config dir.

                         

                        I think the standalone-full-ha.xml provided in the distrib should be reviewed (issue ?).

                        1 of 1 people found this helpful
                        • 9. Re: JMS Client can't connect to server
                          Justin Bertram Master

                          I think the standalone-full-ha.xml provided in the distrib should be reviewed (issue ?).

                          You're correct. Please open an AS7 JIRA for this and report the ID back here.  Thanks.

                          • 10. Re: JMS Client can't connect to server
                            David Carreras Newbie

                            nice my first issue on jboss server. I will try to do it well.

                             

                            I have another ramaining problem on the discovery way :

                             

                            DiscoveryGroupConfiguration groupConfig = new DiscoveryGroupConfiguration(231.7.7.7, 9876);
                            HornetQConnectionFactory fact = HornetQJMSClient.createConnectionFactoryWithHA(groupConfig, JMSFactoryType.CF);
                            Thread.sleep(5000);
                            connection = fact.createConnection("guest","guestp");

                            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

                            this previous code works properly but i can't find the queue, i tried :

                             

                            queue = session.createQueue("test"); I alos tried : /jms/queue or with exported ...

                            or

                            queue = HornetQJMSClient.createQueue("test");

                             

                            I got an exception because client can't locate the queue.

                             

                            Is there a way to reach queue/topic with this code ?

                            • 11. Re: JMS Client can't connect to server
                              jaikiran pai Master

                              David Carreras wrote:

                               

                              nice my first issue on jboss server. I will try to do it well.

                               

                              David, I created https://issues.jboss.org/browse/AS7-3911 just a few minutes back, before I noticed this thread today. But the actual credit should go to you for finding this. I've commented on that JIRA to change the reporter. Thanks for spotting this.

                              • 12. Re: JMS Client can't connect to server
                                David Carreras Newbie

                                queue = session.createQueue("test"); I alos tried : /jms/queue or with exported ...

                                or

                                queue = HornetQJMSClient.createQueue("test");

                                 

                                Sorry for this last point, i forgot we have a jmsname in the configuration file and with the jmsname connection is ok.

                                 

                                David, I created https://issues.jboss.org/browse/AS7-3911 just a few minutes back, before I noticed this thread today. But the actual credit should go to you for finding this. I've commented on that JIRA to change the reporter. Thanks for spotting this.

                                 

                                No problem, i'm happy to contribute.