6 Replies Latest reply on Mar 31, 2008 10:18 AM by twenckebach

    Problem with JEMS JMS install: User is NOT authenticated

    karpinsn

      Hi,

      I'm trying to install a simple setup of JBoss with JBoss messaging. I used JEMS 1.2.1.CR4 to install a JMS setup with everything default except for the configuration which I have named messaging. From this point I can start JBoss at a command line issuing "run -c messaging" from the %JBOSS_HOME%/bin directory. JBoss starts just fine and starts up messaging.

      Now the problem I am having is when I run examples that are included in the JBoss Messaging 1.4.0.SP3. If I try and run the topic example I get an error that User null is NOT authenticated. Listed below is the stack trace that I get


      D:\Download\jboss-messaging-1.4.0.SP3\examples\topic>ant
      Buildfile: build.xml

      identify:
      [echo] ####################################################################
      #######
      [echo] # Running the TOPIC example
      #
      [echo] ####################################################################
      #######
      [echo] The topic: testTopic
      [echo] The client jar: ../..//jboss-messaging-client.jar

      sanity-check:

      init:

      compile:

      run:
      [java] Topic /topic/testTopic exists
      [java] javax.jms.JMSSecurityException: User null is NOT authenticated
      [java] at org.jboss.jms.server.security.SecurityMetadataStore.authentic
      ate(SecurityMetadataStore.java:202)
      [java] at org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint
      .createConnectionDelegateInternal(ServerConnectionFactoryEndpoint.java:222)
      [java] at org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint
      .createConnectionDelegate(ServerConnectionFactoryEndpoint.java:162)
      [java] at org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvise
      d.org$jboss$jms$server$endpoint$advised$ConnectionFactoryAdvised$createConnectio
      nDelegate$aop(ConnectionFactoryAdvised.java:108)
      [java] at org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvise
      d.createConnectionDelegate(ConnectionFactoryAdvised.java)
      [java] at org.jboss.jms.wireformat.ConnectionFactoryCreateConnectionDel
      egateRequest.serverInvoke(ConnectionFactoryCreateConnectionDelegateRequest.java:
      91)
      [java] at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invo
      ke(JMSServerInvocationHandler.java:143)
      [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:76
      9)
      [java] at org.jboss.remoting.transport.socket.ServerThread.processInvoc
      ation(ServerThread.java:573)
      [java] at org.jboss.remoting.transport.socket.ServerThread.dorun(Server
      Thread.java:387)
      [java] at org.jboss.remoting.transport.socket.ServerThread.run(ServerTh
      read.java:166)
      [java] at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemot
      eClientInvoker.java:163)
      [java] at org.jboss.remoting.Client.invoke(Client.java:1634)
      [java] at org.jboss.remoting.Client.invoke(Client.java:548)
      [java] at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate
      .org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionD
      elegate$aop(ClientConnectionFactoryDelegate.java:167)
      [java] at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate
      $createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactor
      yDelegate$createConnectionDelegate_N3019492359065420858.java)
      [java] at org.jboss.jms.client.container.StateCreationAspect.handleCrea
      teConnectionDelegate(StateCreationAspect.java:83)
      [java] at org.jboss.aop.advice.org.jboss.jms.client.container.StateCrea
      tionAspect0.invoke(StateCreationAspect0.java)
      [java] at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate
      $createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactor
      yDelegate$createConnectionDelegate_N3019492359065420858.java)
      [java] at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate
      .createConnectionDelegate(ClientConnectionFactoryDelegate.java)
      [java] at org.jboss.jms.client.JBossConnectionFactory.createConnectionI
      nternal(JBossConnectionFactory.java:205)
      [java] at org.jboss.jms.client.JBossConnectionFactory.createConnection(
      JBossConnectionFactory.java:87)
      [java] at org.jboss.jms.client.JBossConnectionFactory.createConnection(
      JBossConnectionFactory.java:82)
      [java] at org.jboss.example.jms.topic.TopicExample.example(TopicExample
      .java:67)
      [java] at org.jboss.example.jms.common.ExampleSupport.run(ExampleSuppor
      t.java:147)
      [java] at org.jboss.example.jms.topic.TopicExample.main(TopicExample.ja
      va:132)
      [java]
      [java] #####################
      [java] ### FAILURE! ###
      [java] #####################

      BUILD FAILED
      D:\Download\jboss-messaging-1.4.0.SP3\examples\topic\build.xml:81: Java returned
      : 1

      Total time: 2 seconds


      If I try and run the queue example I get a similar error that again says user null is NOT authenticated. Am I missing something in a configuration file?

      Thank you for any help,

      - Nik

        • 1. Re: Problem with JEMS JMS install: User is NOT authenticated
          ataylor

          Can you confirm that you have the following files under conf/props:

          messaging-roles.properties
          messaging-users.properties

          These define the security for messaging, they should contain something like:

          #
          # user=role1,role2,...
          #
          guest=guest


          and
          #
          # user=password
          #
          guest=guest


          also check the login-config.xml file to make sure it contains the correct application policy:

          <application-policy name = "messaging">
          
           <authentication>
          
           <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
          
           flag = "required" >
          
           <module-option name = "unauthenticatedIdentity">guest</module-option>
          
           <module-option name = "usersProperties">props/messaging-users.properties</module-option>
          
           <module-option name = "rolesProperties">props/messaging-roles.properties</module-option>
          
           </login-module>
          
           </authentication>
          
           </application-policy>


          • 2. Re: Problem with JEMS JMS install: User is NOT authenticated
            karpinsn

            Yes I have both of the messaging properties files, which look exactly like what you posted. Also my login-config contains the messaging policy and it too looks exactly like what you posted.

            - Nik

            • 3. Re: Problem with JEMS JMS install: User is NOT authenticated
              ataylor

              can you post the login-config.xml file

              • 4. Re: Problem with JEMS JMS install: User is NOT authenticated
                timfox

                Personally I wouldn't bother with the installer, but install using the instructions in the user guide.

                • 5. Re: Problem with JEMS JMS install: User is NOT authenticated
                  karpinsn

                  I have gone though the install without using the JEMS installer, and now JBoss Messaging is working. I am able to run the examples, along with creating, posting, and reading new topics. Now I'm going to attempt to switch the DB to an Oracle DB so hopefully that will go a bit smoother. Thanks for the help.

                  • 6. Re: Problem with JEMS JMS install: User is NOT authenticated
                    twenckebach

                    Hello,
                    the JEMS installer has a bug, already in version JEMSInstaller_1_2_1_CR3_trunk. The login-config is incorrect:

                    <application-policy name = "messaging">
                     <authentication>
                     <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
                     flag = "required" >
                     <module-option name = "unauthenticatedIdentity">guest</module-option>
                     <module-option name = "usersProperties">messaging-users.properties</module-option>
                     <module-option name = "rolesProperties">messaging-roles.properties</module-option>
                     </login-module>
                     </authentication>
                    </application-policy>
                    

                    The path to usersProperties and rolesProperties is wrong, it must be props/messaging-users.properties and props/messaging-roles.properties, respectively. See JIRA JBINSTALL-373 http://jira.jboss.com/jira/browse/JBINSTALL-373