Traceback (most recent call last):
File "server_consumer.py", line 18, in <module>
connection = pika.BlockingConnection(parameters)
File "/home/my_user/Machines/testing-rabbit/venv/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 360, in __init__
self._impl = self._create_connection(parameters, _impl_class)
File "/home/my_user/Machines/testing-rabbit/venv/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 451, in _create_connection
raise self._reap_last_connection_workflow_error(error)
File "/home/my_user/Machines/testing-rabbit/venv/lib/python3.7/site-packages/pika/adapters/utils/io_services_utils.py", line 636, in _do_ssl_handshake
self._sock.do_handshake()
File "/home/my_user/.pyenv/versions/3.7.3/lib/python3.7/ssl.py", line 1117, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error#!/usr/bin/env python
import ssl
import time
import pika
credentials = pika.PlainCredentials('admin', 'admin')
context = ssl.create_default_context(cafile="ca_certificate.pem")
context.load_cert_chain("client_certificate.pem", "client_key.pem")
ssl_options = pika.SSLOptions(context, "localhost")
parameters = pika.ConnectionParameters(
port=5671,
ssl_options=ssl_options,
credentials=credentials)
connection = pika.BlockingConnection(parameters) # <--- Breaks here <---
channel = connection.channel()
channel.queue_declare(queue='task_queue', durable=True)
print(' [*] Waiting for messages. To exit press CTRL+C')
def callback(ch, method, properties, body):
print(" [x] Received %r" % body)
time.sleep(body.count(b'.'))
print(" [x] Done")
ch.basic_ack(delivery_tag=method.delivery_tag)
channel.basic_qos(prefetch_count=1)
channel.basic_consume(queue='task_queue', on_message_callback=callback)
channel.start_consuming()my_user@ubuntu1804:~$ tail /var/log/rabbitmq/*
==> /var/log/rabbitmq/erl_crash.dump <==
normal
timeout
infinity
''
'$end_of_table'
'nonode@nohost'
'_'
true
false
=end
==> /var/log/rabbitmq/log <==
tail: error reading '/var/log/rabbitmq/log': Is a directory
==> /var/log/rabbitmq/rab...@ubuntu1804.log <==
2019-05-29 00:35:34.348 [info] <0.435.0> started TLS (SSL) listener on [::]:5671
2019-05-29 00:35:34.348 [info] <0.296.0> Running boot step direct_client defined by app rabbit
2019-05-29 00:35:34.378 [info] <0.494.0> Management plugin: HTTP (non-TLS) listener started on port 15672
2019-05-29 00:35:34.378 [info] <0.600.0> Statistics database started.
2019-05-29 00:35:34.418 [notice] <0.104.0> Changed loghwm of /var/log/rabbitmq/rab...@ubuntu1804.log to 50
2019-05-29 00:35:34.481 [info] <0.8.0> Server startup complete; 4 plugins started.
* rabbitmq_management
* rabbitmq_web_dispatch
* rabbitmq_management_agent
* rabbitmq_auth_mechanism_ssl
==> /var/log/rabbitmq/rabbit@ubuntu1804_upgrade.log <==
2019-05-23 02:39:59.206 [info] <0.8.0> Log file opened with Lager
2019-05-23 02:52:11.220 [info] <0.8.0> Log file opened with Lager
2019-05-23 05:37:27.085 [info] <0.8.0> Log file opened with Lager
2019-05-23 06:02:30.610 [info] <0.8.0> Log file opened with Lager
2019-05-24 02:09:14.053 [info] <0.8.0> Log file opened with Lager
2019-05-24 03:14:49.990 [info] <0.8.0> Log file opened with Lager
2019-05-24 03:14:56.830 [info] <0.8.0> Log file opened with Lager
2019-05-24 03:29:26.450 [info] <0.8.0> Log file opened with Lager
2019-05-29 00:30:35.600 [info] <0.8.0> Log file opened with Lager
2019-05-29 00:35:32.450 [info] <0.8.0> Log file opened with Lagermy_user@ubuntu1804:~$ ls -la /var/log/rabbitmq/log/
total 8
drwxr-s--- 2 rabbitmq adm 4096 May 22 07:56 .
drwxr-s--- 3 rabbitmq adm 4096 May 23 02:46 ..
-rw-r----- 1 rabbitmq adm 0 May 22 07:56 crash.logHello Luke!Can't see any log when I do the SSL handshake. I did various handshake, latest was at 00:46:??.
my_user@ubuntu1804:~$ tail /var/log/rabbitmq/*
==> /var/log/rabbitmq/erl_crash.dump <==
normal
timeout
infinity
''
'$end_of_table'
'nonode@nohost'
'_'
true
false
=end
==> /var/log/rabbitmq/log <==
tail: error reading '/var/log/rabbitmq/log': Is a directory
==> /var/log/rabbitmq/rabbit@ubuntu1804.log <==
2019-05-29 00:35:34.348 [info] <0.435.0> started TLS (SSL) listener on [::]:5671
2019-05-29 00:35:34.348 [info] <0.296.0> Running boot step direct_client defined by app rabbit
2019-05-29 00:35:34.378 [info] <0.494.0> Management plugin: HTTP (non-TLS) listener started on port 15672
2019-05-29 00:35:34.378 [info] <0.600.0> Statistics database started.
2019-05-29 00:35:34.418 [notice] <0.104.0> Changed loghwm of /var/log/rabbitmq/rabbit@ubuntu1804.log to 50