FUSE ESB
  1. FUSE ESB
  2. ESB-1450

When changing an hot deployed ldap login module, I have to restart servicemix to pick up the changes

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.3.1-fuse-00-00, 4.3.1-fuse-01-09
    • Fix Version/s: 4.3.1-fuse-xx-00
    • Component/s: Core
    • Labels:
      None
    • Similar Issues:
      Show 9 results 

      Description

      While working with LDAP configuration, I've noticed that if I make any change to say a deployed, login module, I receive "service unavailable errors" on my next execution:

      producer:
           [echo] Running producer against server at $url = tcp://localhost:61617 for subject $subject = TEST.FOO
           [java] Connecting to URL: tcp://localhost:61617
           [java] Publishing a Message with size 1000 to queue: TEST.FOO
           [java] Using non-persistent messages
           [java] Sleeping between publish 0 ms
           [java] Running 1 parallel threads
           [java] javax.jms.JMSException: User name or password is invalid.
           [java] 	at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
           [java] 	at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1295)
           [java] 	at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1392)
           [java] 	at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:504)
           [java] 	at ProducerTool.run(Unknown Source)
           [java] Caused by: java.lang.SecurityException: User name or password is invalid.
           [java] 	at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:83)
           [java] 	at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
           [java] 	at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:695)
           [java] 	at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:83)
           [java] 	at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:137)
           [java] 	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:310)
           [java] 	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:184)
           [java] 	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)
           [java] 	at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
           [java] 	at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:227)
           [java] 	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
           [java] 	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
           [java] 	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
           [java] 	at java.lang.Thread.run(Thread.java:680)
           [java] Caused by: java.lang.Throwable: org.osgi.service.blueprint.container.ServiceUnavailableException: Service is unavailable
           [java] 	at org.apache.aries.blueprint.container.ReferenceListRecipe$ServiceDispatcher.call(ReferenceListRecipe.java:201)
           [java] 	at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$CgLibProxyFactory$1.loadObject(AbstractServiceReferenceRecipe.java:652)
           [java] 	at org.apache.karaf.jaas.config.JaasRealm$$EnhancerByCGLIB$$51a0697d.getName(<generated>)
           [java] 	at org.apache.karaf.jaas.config.impl.OsgiConfiguration.getAppConfigurationEntry(OsgiConfiguration.java:54)
           [java] 	at javax.security.auth.login.LoginContext.init(LoginContext.java:243)
           [java] 	at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
           [java] 	at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:75)
           [java] 	... 13 more
           [java] [Thread-2] Caught: javax.jms.JMSException: User name or password is invalid.
      

      I've tried, removing everything from the hot deploy directory and re-deploying, refreshing bundles, same error, e.g:

      karaf@root> list |grep -i ldap
      [ 202] [Active     ] [Created     ] [       ] [   60] my_ldap_karaf_module_apacheds.xml (0.0.0)
      [ 203] [Active     ] [Created     ] [       ] [   60] my_ldap_amq_module_openldap.xml (0.0.0)
      [ 204] [Active     ] [            ] [       ] [   60] my_LdapSrpingBroker-broker-openldap.xml (0.0.0)
      
      --> Un-deploy stuff and verify it's gone:
      karaf@root> list |grep -i ldap
      karaf@root> 
      
      

      Only restarting servicemix seems to clear it.

      Test Case Set-up

      1. Set up the environment as detailed in ESB-1445 for the Spring use case. Ignore the blueprint stuff.
      2. Run the ProducerTool Demo from activemq:

      "ant producer -Durl=tcp://0.0.0.0:61617 -Dmax=1"
      

      3. Edit the ./deploy/my_ldap_amq_module.xml and add a space in a comment card or something trivial, save.
      4. Re-run the Producer Tool Demo

      I spotted this Karaf bug, https://issues.apache.org/jira/browse/KARAF-344, which may be related. It was recently closed as unable to reproduce. The scenario is a bit different but maybe it will help.

        Activity

        Hide
        Susan Javurek
        added a comment - - edited

        I've also encountered this problem when deploying a second LDAP configuration and editing it, even though it has nothing to do with the one I'm using.

        1. Deploy the attached configuration (my_ldap_karaf_module_apacheds.xml).
        2. Edit it (again change something trivial like space or even just re-save it). Actually, "touch ./deploy/my_ldap_karaf_module_apacheds.xml" does the trick also.
        3. Try running the test above which actually doesn't reference it. Fails with service unavailable.

        Show
        Susan Javurek
        added a comment - - edited I've also encountered this problem when deploying a second LDAP configuration and editing it, even though it has nothing to do with the one I'm using. 1. Deploy the attached configuration (my_ldap_karaf_module_apacheds.xml). 2. Edit it (again change something trivial like space or even just re-save it). Actually, "touch ./deploy/my_ldap_karaf_module_apacheds.xml" does the trick also. 3. Try running the test above which actually doesn't reference it. Fails with service unavailable.

          People

          • Assignee:
            Unassigned
            Reporter:
            Susan Javurek
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: