fedora.server.errors.ModuleInitializationException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused

Sakai JIRA | A. Soroka | 6 years ago
  1. 0

    If Fedora is started with JMS messaging turned on and configured for an external broker with direct connection (and not through a JNDI provider) but that broker is unavailable at startup, the entire server goes back down. That seems like a pretty drastic failure. To duplicate: 0) Turn off a repository. 1) Turn on the Messaging module and assign an external broker to "java.naming.provider.url" in fedora.fcfg, e.g. <param name="java.naming.provider.url" value="tcp://localhost:61616"/> 2) Make sure the external broker is not available. 3) Start up Fedora. You'll see something like: FATAL 2010-09-21 09:59:55.571 [main] (Server) Module (fedora.server.messaging.Messaging) failed to initialize fedora.server.errors.ModuleInitializationException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused at fedora.server.messaging.MessagingModule.initModule(MessagingModule.java:81) at fedora.server.Module.<init>(Module.java:63) at fedora.server.messaging.MessagingModule.<init>(MessagingModule.java:58) ... and then a server shutdown. Much better would be to see some kind of warning, then attempts to connect as appropriate with warnings thrown on failures. It's not known to me whether this behavior is the same with a JNDI-provided ConnectionFactory, because I've never been able to get that stronger configuration to work, which is a whole 'nother problem. {grin}

    Sakai JIRA | 6 years ago | A. Soroka
    fedora.server.errors.ModuleInitializationException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused
  2. 0

    If Fedora is started with JMS messaging turned on and configured for an external broker with direct connection (and not through a JNDI provider) but that broker is unavailable at startup, the entire server goes back down. That seems like a pretty drastic failure. To duplicate: 0) Turn off a repository. 1) Turn on the Messaging module and assign an external broker to "java.naming.provider.url" in fedora.fcfg, e.g. <param name="java.naming.provider.url" value="tcp://localhost:61616"/> 2) Make sure the external broker is not available. 3) Start up Fedora. You'll see something like: FATAL 2010-09-21 09:59:55.571 [main] (Server) Module (fedora.server.messaging.Messaging) failed to initialize fedora.server.errors.ModuleInitializationException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused at fedora.server.messaging.MessagingModule.initModule(MessagingModule.java:81) at fedora.server.Module.<init>(Module.java:63) at fedora.server.messaging.MessagingModule.<init>(MessagingModule.java:58) ... and then a server shutdown. Much better would be to see some kind of warning, then attempts to connect as appropriate with warnings thrown on failures. It's not known to me whether this behavior is the same with a JNDI-provided ConnectionFactory, because I've never been able to get that stronger configuration to work, which is a whole 'nother problem. {grin}

    Sakai JIRA | 6 years ago | A. Soroka
    fedora.server.errors.ModuleInitializationException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused

    Root Cause Analysis

    1. fedora.server.errors.ModuleInitializationException

      Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused

      at fedora.server.messaging.MessagingModule.initModule()
    2. fedora.server.messaging
      MessagingModule.initModule
      1. fedora.server.messaging.MessagingModule.initModule(MessagingModule.java:81)
      1 frame
    3. fedora.server
      Module.<init>
      1. fedora.server.Module.<init>(Module.java:63)
      1 frame
    4. fedora.server.messaging
      MessagingModule.<init>
      1. fedora.server.messaging.MessagingModule.<init>(MessagingModule.java:58)
      1 frame