scholzj / docker-qpid-dispatch

Docker image for Qpid Dispatch router
3 stars 6 forks source link

How do i start listening? #2

Open slinkydeveloper opened 4 years ago

slinkydeveloper commented 4 years ago

Hi, I'm trying to run this image using:

docker run -P scholzj/qpid-dispatch                          

just with the default configuration (like I do without docker), but I don't know why the server never start listening:

2020-02-17 17:54:47.712594 +0000 SERVER (warning) HTTP support is not available
2020-02-17 17:54:47.712614 +0000 SERVER (info) Container Name: NTY1ZmVjMjJjMDZkNTdhY2E4ODIxOGQ4
2020-02-17 17:54:47.712647 +0000 ROUTER (info) Router started in Standalone mode
2020-02-17 17:54:47.712652 +0000 ROUTER (info) Version: 1.9.0
2020-02-17 17:54:47.712828 +0000 ROUTER (info) Core module present but disabled: edge_router
2020-02-17 17:54:47.712842 +0000 ROUTER (info) Core module present but disabled: core_test_hooks
2020-02-17 17:54:47.712846 +0000 ROUTER (info) Core module present but disabled: edge_addr_tracking
2020-02-17 17:54:47.712850 +0000 ROUTER (info) Core module present but disabled: address_lookup_server
2020-02-17 17:54:47.712857 +0000 ROUTER (info) Core module enabled: address_lookup_client
2020-02-17 17:54:47.712861 +0000 ROUTER (info) Router Core thread running. 0/NTY1ZmVjMjJjMDZkNTdhY2E4ODIxOGQ4
2020-02-17 17:54:47.712866 +0000 ROUTER (info) In-process subscription M/$management
2020-02-17 17:54:47.720602 +0000 AGENT (info) Activating management agent on $_management_internal
2020-02-17 17:54:47.720674 +0000 ROUTER (info) In-process subscription L/$management
2020-02-17 17:54:47.720704 +0000 ROUTER (info) In-process subscription L/$_management_internal
2020-02-17 17:54:47.720940 +0000 POLICY (info) Policy configured maxConnections: 65535, policyDir: '',access rules enabled: 'false', use hostname patterns: 'false'
2020-02-17 17:54:47.721538 +0000 POLICY (info) Policy fallback defaultVhost is defined: '$default'
2020-02-17 17:54:47.721574 +0000 SERVER (notice) Operational, 4 Threads Running (process ID 1)

Without docker, I see:

% qdrouterd                                                                                                                                                                                 
2020-02-17 18:56:56.678003 +0100 SERVER (info) Container Name: Standalone_QI68_87Ab1I8euP
2020-02-17 18:56:56.678057 +0100 ROUTER (info) Router started in Standalone mode
2020-02-17 18:56:56.678061 +0100 ROUTER (info) Version: 1.9.0
2020-02-17 18:56:56.678250 +0100 ROUTER (info) Core module present but disabled: edge_router
2020-02-17 18:56:56.678282 +0100 ROUTER (info) Core module present but disabled: core_test_hooks
2020-02-17 18:56:56.678286 +0100 ROUTER (info) Core module present but disabled: edge_addr_tracking
2020-02-17 18:56:56.678288 +0100 ROUTER (info) Core module present but disabled: address_lookup_server
2020-02-17 18:56:56.678291 +0100 ROUTER (info) Core module enabled: address_lookup_client
2020-02-17 18:56:56.678294 +0100 ROUTER (info) Router Core thread running. 0/Standalone_QI68_87Ab1I8euP
2020-02-17 18:56:56.678297 +0100 ROUTER (info) In-process subscription M/$management
2020-02-17 18:56:56.682222 +0100 AGENT (info) Activating management agent on $_management_internal
2020-02-17 18:56:56.682293 +0100 ROUTER (info) In-process subscription L/$management
2020-02-17 18:56:56.682309 +0100 ROUTER (info) In-process subscription L/$_management_internal
2020-02-17 18:56:56.683207 +0100 POLICY (info) Policy configured maxConnections: 65535, policyDir: '',access rules enabled: 'false', use hostname patterns: 'false'
2020-02-17 18:56:56.683622 +0100 POLICY (info) Policy fallback defaultVhost is defined: '$default'
2020-02-17 18:56:56.683751 +0100 CONN_MGR (info) Configured Listener: 0.0.0.0:amqp proto=any, role=normal
2020-02-17 18:56:56.684239 +0100 CONN_MGR (info) Configured Listener: 0.0.0.0:8672 proto=any, role=normal, http
2020-02-17 18:56:56.684309 +0100 SERVER (info) HTTP server thread running
2020-02-17 18:56:56.684404 +0100 SERVER (notice) Listening for HTTP on 0.0.0.0:8672
2020-02-17 18:56:56.685597 +0100 SERVER (notice) Operational, 4 Threads Running (process ID 188996)
2020-02-17 18:56:56.685678 +0100 SERVER (notice) Listening on 0.0.0.0:amqp

Any ideas? I'm using the latest version of the image

scholzj commented 4 years ago

I have to say you got me :-o. It is so long since I actually used it I have problems to remember :-o. Looking at the entrypoint script, it looks like unless you specify some more options, the listener section is not added to the config file. So you can for example do docker run -ti -P -e QDROUTERD_ADMIN_USERNAME=admin -e QDROUTERD_ADMIN_PASSWORD=123456 scholzj/qpid-dispatch. But if you don't specify any SASL or SSL params, the listener section will not be there.

I'm sure I had some reason for it at that time, but not sure what it was. Maybe I just never needed it. The tests can show you different combinations which should work. For example this one can do anonymous listener without any auth: https://github.com/scholzj/docker-qpid-dispatch/blob/f3ae6cb96e2659a05d5c108021f4e32eb8442756/tests.bats#L47. (although I agree it is maybe more complicated than it needs to.)

slinkydeveloper commented 4 years ago

It works! Thanks