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

Stomp Collector failed #2364

Closed
ludoComp9 opened this issue May 19, 2023 · 8 comments
Closed

Stomp Collector failed #2364

ludoComp9 opened this issue May 19, 2023 · 8 comments

Comments

@ludoComp9
Copy link

Hello,

After received client certificate from n6, I launched:
openssl s_client -cert /usr/lib/python3/dist-packages/intelmq/bots/collectors/stomp/client.pem -key /usr/lib/python3/dist-packages/intelmq/bots/collectors/stomp/n6.key -CAfile /usr/lib/python3/dist-packages/intelmq/bots/collectors/stomp/ca.pem -host n6stream.cert.pl -port 61614
and it worked fine!

So, I tried to configure Stomp Collector module from intelMQ Manager with following parameters:

  • exchange: mydomain.tld
  • heartbeat: 6000
  • port: 61614
  • server: n6stream.cert.pl
  • ssl_ca_certificate: /usr/lib/python3/dist-packages/intelmq/bots/collectors/stomp/ca.pem
  • ssl_client_certificate: /usr/lib/python3/dist-packages/intelmq/bots/collectors/stomp/client.pem
  • ssl_client_certificate_key: /usr/lib/python3/dist-packages/intelmq/bots/collectors/stomp/n6.key

But, when started, I have following error message from StompCollector.log file:

2023-05-19 15:39:05,488 - Stomp-Collector - INFO - Received SIGTERM.
2023-05-19 15:39:05,489 - Stomp-Collector - INFO - Bot stopped.
2023-05-19 15:39:05,896 - Stomp-Collector - INFO - StompCollectorBot initialized with id Stomp-Collector and intelmq 3.1.0 and python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] as process 2668491.
2023-05-19 15:39:05,897 - Stomp-Collector - INFO - Bot is starting.
2023-05-19 15:39:06,180 - Stomp-Collector - INFO - Successfully connected and subscribed.
2023-05-19 15:39:06,180 - Stomp-Collector - INFO - Bot initialization completed.
2023-05-19 15:39:06,232 - Stomp-Collector - ERROR - Received an error: "ACCESS_REFUSED - access to queue '**_mydomain.tld_**' in vhost '/' refused for user '**myemailaddress**'".
2023-05-19 15:39:06,433 - Stomp-Collector - INFO - Successfully connected and subscribed.
2023-05-19 15:39:06,488 - Stomp-Collector - ERROR - Received an error: "ACCESS_REFUSED - access to queue '**_mydomain.tld_**' in vhost '/' refused for user '**myemailaddress**'".
2023-05-19 15:39:06,689 - Stomp-Collector - INFO - Successfully connected and subscribed.
[...]

Any idea ?

Platform:
Ubuntu 22.04.2 LTS
intelMQ: 3.1.0
stomp.py: 4.1.23

@sebix
Copy link
Member

sebix commented May 19, 2023

Are you sure that the correct exchange for you is mydomain.tld? and not the country code or alike?

@ludoComp9
Copy link
Author

Yes, absolutely. n6 CERT team confirmed it.

@sebix
Copy link
Member

sebix commented May 21, 2023

I'm not able to help here, unfortunately. Not operating a STOMP service myself and last used n6's interface 1½ years ago.

@kamil-certat
Copy link
Contributor

Could you enable debug log and see what it returns? Could you try to use the stomp.py CLI and manually connect to the requested queue?

I see that in our configuration the exchange is like /exchange/mydomain.tld/#. Could you try it?

@zuo
Copy link
Contributor

zuo commented Sep 13, 2023

  • @ludoComp9 The value of the exchange parameter should be a string in the format: /exchange/{your organization ID}/{binding key}, e.g.: /exchange/mydomain.tld/*.*.*.*. For more details, see my answer in #2342.

@sebix
Copy link
Member

sebix commented Oct 8, 2023

@zuo is this fixed as well?

@zuo
Copy link
Contributor

zuo commented Oct 10, 2023

@zuo is this fixed as well?

I think it was rather a communication issue than a bug in the code or configuration, and I have already clarified the matter above (and also in comments to the ticket #2342). PRs #2408 and #2414 also improve the documentation related to the matter.

So I believe this ticket can be closed.

@sebix
Copy link
Member

sebix commented Oct 10, 2023

OK, thanks for the explanation

@sebix sebix closed this as completed Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants