-
Notifications
You must be signed in to change notification settings - Fork 56
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
Rabbit MQ Port is not being set Properly #220
Comments
We are facing the same problem. If I change protocol from amqps to amqp in uri, the port I provide (5595) is being used. However, when I change url back to amqps (with ssl:true) the port that I provide is not being used, default value (5671) is used. Also, when I evaluate |
We faced the same issue and solved it by using a pull request and adding only the following few lines of code. I believe that if you fix it by adding below, it will be useful for the rest of the community, rather than us creating a fork of it. AmqpCfEnvProcessor.java if (uriInfo.getScheme().equals("amqps")) { can you please help us! -Rama |
In case it's not set (default) then replace it with 5671, to not break existing behaviour
hello @rama78 , @berkkonak |
@anthonydahanne - Thanks a lot for making the changes. I tested the respective branch, and it failed. Then, I realized we added an extra line (to fetch the VHOST). I sincerely apologize for missing that in the above code snippet. PCF CUPS URI format: amqps://temp:temp!@abc..com:8071/CPE_SWAT We have added code like the one below: if (uriInfo.getScheme().equals("amqps")) { Our server is rejecting the connection because it is not finding the VHOST information as we added part of the URI. can you please add the logic to fetch the VHOST from the URI like the above code snippet? Thanks again! |
hum, ok, it seems consistent with some VCAP_SERVICES that was sent to me via another channel
It also seems consistent with: https://www.rabbitmq.com/uri-spec.html Finally, you just reminded me to focus on: https://github.com/spring-cloud/spring-cloud-connectors/blob/v2.0.2.RELEASE/spring-cloud-core/src/test/java/org/springframework/cloud/service/common/AmqpServiceInfoTest.java and make sure we have something equivalent, as long as it does not break existing behavior All good; I'll update ! |
thanks, @anthonydahanne - we use the enterprise Rabbit MQ (outside PCF) with the CUPS, thanks for accepting the changes, I will look forward to the new branch and test it out when available. Rama |
OK, I think it's simpler than what I thought. |
Even better; I've published an online buildpack using the fixed java-cfenv:
You'll see:
|
@anthonydahanne - Thanks a lot for the quick turnaround. I tested the branch, and it works as expected. I'm looking forward to a GA release so that we can start using it! -Rama |
Indeed, great news! It may take time for me to test this buildpack as our company restricts downloads from the internet. We use offline buildpacks downloaded from Pivnet, but we could use an HTTP Proxy. I need to get access, etc |
@anthonydahanne - Even with latest JBP v4-64-0, we are still seeing rabbit mq connection errors.. we have to go down to JBP 4-59-0 to get past this error. {"level":"ERROR","timestamp":"2023-12-18T22:38:47.378Z","loggerName":"com.rabbitmq.client.impl.SocketFrameHandler","message":"TLS connection failed: No subject alternative names matching IP address found","logType":"Normal","duid":"duid"} This issue is seen in the JBP versions starting at least 4-62-0 |
Describe the bug
I am deploying my spring boot app to Cloud Foundry. I am connecting to an external Rabbit MQ instance with a cups (user provided service). When I specify a uri with "amqps" it is trying to connect to RMQ with a port of 5671, but that is not the port our RMQ is running on, and not the port in my URI.
Reproduction steps
1.Create a cups on Cloud Foundry with an ampqs URI that is not running on 5671
2.Push a spring boot 3.1.2 application and bind to the cups
3.Try to push a message to RMQ from your spring boot apps
...
Expected behavior
Should use the port provided in URI
Additional context
No response
The text was updated successfully, but these errors were encountered: