Skip to content

Add debug info during the login step #301

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

Merged
merged 4 commits into from
Sep 19, 2023
Merged

Add debug info during the login step #301

merged 4 commits into from
Sep 19, 2023

Conversation

Gsantomaggio
Copy link
Member

@Gsantomaggio Gsantomaggio commented Sep 15, 2023

  • Add more debug info to better understand the startup step.
  • print the server properties

Releated to #299

releated to #299

Signed-off-by: Gabriele Santomaggio <[email protected]>
@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.08% ⚠️

Comparison is base (6bb73ea) 92.93% compared to head (d6577ec) 92.86%.
Report is 1 commits behind head on main.

❗ Current head d6577ec differs from pull request most recent head a04e8a2. Consider uploading reports for the commit a04e8a2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #301      +/-   ##
==========================================
- Coverage   92.93%   92.86%   -0.08%     
==========================================
  Files         112      112              
  Lines        9688     9689       +1     
  Branches      769      771       +2     
==========================================
- Hits         9004     8998       -6     
- Misses        523      528       +5     
- Partials      161      163       +2     
Files Changed Coverage Δ
RabbitMQ.Stream.Client/Consts.cs 66.66% <ø> (ø)
RabbitMQ.Stream.Client/RawConsumer.cs 86.42% <0.00%> (+0.22%) ⬆️
RabbitMQ.Stream.Client/RawProducer.cs 87.71% <0.00%> (+0.37%) ⬆️
RabbitMQ.Stream.Client/AvailableFeatures.cs 79.16% <100.00%> (+0.90%) ⬆️
RabbitMQ.Stream.Client/Client.cs 89.66% <100.00%> (-0.81%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Gsantomaggio
Copy link
Member Author

@aeb-dev
Do you have a chance to test the PR?
it adds more debug information to understand what's going on.

Please enable the logs in debug mode.
Thank you

@aeb-dev
Copy link

aeb-dev commented Sep 18, 2023

Sorry, I could not allocate time yet to test it. I will let you know as soon as possible

@Gsantomaggio
Copy link
Member Author

@aeb-dev Ok no problem. I tried to reproduce the issue with the configuration you provided and it works.

Screenshot 2023-09-18 at 15 25 11

conf:

  var config = new StreamSystemConfig()
        {
            
            UserName = "test",
            Password = "test",
            VirtualHost = "test",
            AddressResolver = new AddressResolver(new DnsEndPoint("localhost", 30552)),
            Endpoints = new List<EndPoint> { new DnsEndPoint("localhost", 30552) },
        
        };
        var system = await StreamSystem.Create(config, streamLogger).ConfigureAwait(false);

Logs:

dbug: RabbitMQ.Stream.Client.StreamSystem[0]
      Server properties: [cluster_name, main-rabbitmq], [copyright, Copyright (c) 2007-2023 VMware, Inc. or its affiliates.], [information, Licensed under the MPL 2.0. Website: https://rabbitmq.com], [platform, Erlang/OTP 26.0.2], [product, RabbitMQ], [version, 3.13.0-beta.6]
dbug: RabbitMQ.Stream.Client.StreamSystem[0]
      Sasl mechanism: AMQPLAIN, PLAIN
dbug: RabbitMQ.Stream.Client.StreamSystem[0]
      Open: ConnectionProperties: [advertised_port, 5552], [advertised_host, main-rabbitmq-server-0.main-rabbitmq-nodes.default]
dbug: RabbitMQ.Stream.Client.StreamSystem[0]
      Extracted BrokerVersion version: 3.13.0
dbug: RabbitMQ.Stream.Client.StreamSystem[0]
      Client connected to Unspecified/localhost:30552
info: Filter.FilterConsumer[0]

I'll be looking forward to your feedback since I can't reproduce it.

@Gsantomaggio Gsantomaggio marked this pull request as ready for review September 18, 2023 14:35
@aeb-dev
Copy link

aeb-dev commented Sep 18, 2023

I get this log: Extracted BrokerVersion version: 3.13.0

@aeb-dev
Copy link

aeb-dev commented Sep 18, 2023

Okay, I found the problem.

Before testing for consumer filters I had another rabbitmq installed so I had updated that to test it. So after update, the new rabbitmq was using the old data of old rabbitmq.

You can produce the error with the following approach but I think this might not be a client problem:

First deploy rabbitmq with:

image: docker.io/rabbitmq:3.11.5

then update

image: docker.io/rabbitmq:3.13-rc-management

Then re-run the code from the issue.

Note: If I do a clean install everything works fine

@Gsantomaggio
Copy link
Member Author

You have to enable the feature flags. Coming from an old version, the filter is disabled.
Screenshot 2023-09-18 at 17 17 48

@aeb-dev
Copy link

aeb-dev commented Sep 18, 2023

After enabling, everything works as expected thanks

Signed-off-by: Gabriele Santomaggio <[email protected]>
@Gsantomaggio
Copy link
Member Author

I added the feature flag info in case of problem. That would help in the same situation

Signed-off-by: Gabriele Santomaggio <[email protected]>
Signed-off-by: Gabriele Santomaggio <[email protected]>
@Gsantomaggio Gsantomaggio merged commit c8e3726 into main Sep 19, 2023
@Gsantomaggio Gsantomaggio deleted the add_debug_info branch September 19, 2023 08:18
@Gsantomaggio Gsantomaggio added this to the 1.7.1 milestone Sep 19, 2023
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

Successfully merging this pull request may close these issues.

3 participants