Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Karaf / Activemq connection issues #649

Closed
dannylamb opened this issue May 26, 2017 · 11 comments
Closed

Karaf / Activemq connection issues #649

dannylamb opened this issue May 26, 2017 · 11 comments

Comments

@dannylamb
Copy link
Contributor

dannylamb commented May 26, 2017

After spinning up a new vagrant, Karaf cannot connect to activemq anymore. Error message from the logs:

2017-05-26 02:27:58,972 | ERROR | Consumer[fedora] | faultJmsMessageListenerContainer | 87 - org.apache.servicemix.bundles.spring-jms - 4.1.9.RELEASE_1 | Could not refresh JMS Connection for destination 'fedora' - retrying using FixedBackOff{interval=5000, currentAttempts=7, maxAttempts=unlimited}. Cause: Error while attempting to add new Connection to the pool; nested exception is javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused (Connection refused)

This is probably related to us merging in features for Api-X yesterday.

@dannylamb
Copy link
Contributor Author

FWIW This was resolved by cycling the fcrepo-api-x feature. I did that with

  1. feature:uninstall fcrepo-api-x
  2. feature:install fcrepo-api-x

@whikloj
Copy link
Member

whikloj commented May 26, 2017

Is the API-X JMS broker inside Karaf? Because I'm starting to think that is not a great idea.

@DiegoPino
Copy link
Contributor

DiegoPino commented May 26, 2017

@whikloj not sure. I don't see an embedded OSGI broker being configured. I was more in the impression it was using the fcrepo one? Maybe i'm looking at the wrong component
At least not seeing this http://activemq.apache.org/osgi-integration.html
and seeing this https://github.com/fcrepo4-labs/fcrepo-api-x/tree/master/fcrepo-api-x-listener

Also, if the connection to tcp://localhost:61616 is being refused, maybe fcrepo's broker is not available when api-x feature boots -deploys- ? (probably wrong word that boot. do features "boot" ? )

@whikloj
Copy link
Member

whikloj commented May 26, 2017

Right...right. I should know that. So is fcrepo-api-x missing some sort of JMS failover to keep trying to connect if the connection is not available when it starts up? Have to look into that later.

@dannylamb
Copy link
Contributor Author

dannylamb commented May 26, 2017

@whikloj We're using the Activemq embedded within Fedora, as @DiegoPino suggested. It seems to be a bug where fcrepo-service-activemq doesn't restart correctly after a configuration change. @acoburn mentioned it here: fcrepo4-labs/fcrepo-api-x#106 (comment)

That's def a better idea than cycling the feature, but either should do the trick.

@whikloj
Copy link
Member

whikloj commented May 31, 2017

@dannylamb have you tried sticking the org.fcrepo.camel.service.activemq.cfg config into Karaf before starting it up?

@dannylamb
Copy link
Contributor Author

I've just been cycling our features. Was about to try that out tho and if it worked, issue a PR.

Have you tried yourself and are running into issues?

@whikloj
Copy link
Member

whikloj commented May 31, 2017

No not really, I'm still behind on my API-X integration knowledge. Just wondering if adding that to the claw_vagrant build would be an easy fix.

@dannylamb
Copy link
Contributor Author

dannylamb commented May 31, 2017

In theory, yes. You should just have to curl down the cfg fie from Github before installing any features.

Otherwise you just have to cycle all the features that use fcrepo-service-activemq.

  • islandora-indexing-triplestore
  • islandora-indexing-fcrepo
  • islandora-connector-broadcast
  • fcrepo-api-x

Which is what I've been doing manually and works fine, but that list will grow as we pile on more features.

@dannylamb
Copy link
Contributor Author

FYI, I just tried it by curling down the config file beforehand and it didn't work for me. Looks lke cycling the features is the way to go. Gosh I hate that but I'll live with it for now.

@ruebot
Copy link
Member

ruebot commented Jun 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants