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

RabbitMQ producer and ssl #1742

Closed
viacheslav-shcherbyna opened this issue Sep 20, 2021 · 1 comment
Closed

RabbitMQ producer and ssl #1742

viacheslav-shcherbyna opened this issue Sep 20, 2021 · 1 comment

Comments

@viacheslav-shcherbyna
Copy link

Hello, we are not able to get it working with rabbitmq server with ssl enabled.

docker run --rm --network host  zendesk/maxwell bin/maxwell --user=maxwell --password=1234 --host=host.com --port=3306 --filter='exclude:*.*, include:*.table' --producer=rabbitmq --rabbitmq_host=rabbitmq --rabbitmq_port=5671 --rabbitmq_user=maxwell --rabbitmq_pass=pass --rabbitmq_virtual_host=production --rabbitmq_exchange=maxwell --rabbitmq_declare_exchange=false  --rabbitmq_routing_key_template=%table%
10:33:29,313 INFO  Maxwell - Starting Maxwell. maxMemory: 973078528 bufferMemoryUsage: 0.25
10:33:29,458 WARN  ForgivingExceptionHandler - An unexpected connection driver error occured (Exception message: Connection reset)
10:33:29,471 INFO  TaskManager - Stopping 0 tasks
10:33:29,472 ERROR TaskManager - cause: 
java.lang.RuntimeException: java.io.IOException
	at com.zendesk.maxwell.producer.RabbitmqProducer.<init>(RabbitmqProducer.java:65) ~[maxwell-1.33.1.jar:1.33.1]
	at com.zendesk.maxwell.MaxwellContext.getProducer(MaxwellContext.java:408) ~[maxwell-1.33.1.jar:1.33.1]
	at com.zendesk.maxwell.Maxwell.startInner(Maxwell.java:213) ~[maxwell-1.33.1.jar:1.33.1]
	at com.zendesk.maxwell.Maxwell.start(Maxwell.java:183) ~[maxwell-1.33.1.jar:1.33.1]
	at com.zendesk.maxwell.Maxwell.main(Maxwell.java:286) ~[maxwell-1.33.1.jar:1.33.1]
Caused by: java.io.IOException
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:375) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:64) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:156) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1106) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1063) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1021) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1182) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.zendesk.maxwell.producer.RabbitmqProducer.<init>(RabbitmqProducer.java:60) ~[maxwell-1.33.1.jar:1.33.1]
	... 4 more
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error
	at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:317) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:64) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:156) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1106) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1063) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1021) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1182) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.zendesk.maxwell.producer.RabbitmqProducer.<init>(RabbitmqProducer.java:60) ~[maxwell-1.33.1.jar:1.33.1]
	... 4 more
Caused by: java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:186) ~[?:?]
	at java.net.SocketInputStream.read(SocketInputStream.java:140) ~[?:?]
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:252) ~[?:?]
	at java.io.BufferedInputStream.read(BufferedInputStream.java:271) ~[?:?]
	at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:293) ~[?:?]
	at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:91) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:184) ~[amqp-client-5.7.3.jar:5.7.3]
	at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:598) ~[amqp-client-5.7.3.jar:5.7.3]
	at java.lang.Thread.run(Thread.java:834) [?:?]
10:33:29,494 INFO  TaskManager - Stopped all tasks
java.lang.RuntimeException: java.io.IOException
	at com.zendesk.maxwell.producer.RabbitmqProducer.<init>(RabbitmqProducer.java:65)
	at com.zendesk.maxwell.MaxwellContext.getProducer(MaxwellContext.java:408)
	at com.zendesk.maxwell.Maxwell.startInner(Maxwell.java:213)
	at com.zendesk.maxwell.Maxwell.start(Maxwell.java:183)
	at com.zendesk.maxwell.Maxwell.main(Maxwell.java:286)
Caused by: java.io.IOException
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
	at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:375)
	at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:64)
	at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:156)
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1106)
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1063)
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1021)
	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1182)
	at com.zendesk.maxwell.producer.RabbitmqProducer.<init>(RabbitmqProducer.java:60)
	... 4 more
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error
	at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
	at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
	at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
	at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:317)
	... 11 more
Caused by: java.net.SocketException: Connection reset
	at java.base/java.net.SocketInputStream.read(SocketInputStream.java:186)
	at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
	at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
	at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:271)
	at java.base/java.io.DataInputStream.readUnsignedByte(DataInputStream.java:293)
	at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:91)
	at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:184)
	at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:598)
	at java.base/java.lang.Thread.run(Thread.java:834)

I guess that factory.useSslProtocol call must be added? What do you think ?

@wk8
Copy link
Contributor

wk8 commented Dec 28, 2024

See #2143

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

2 participants