hummingbot / brokers

This repository contains different brokers that can be used to communicate multiple instances of Hummingbot, or send information to the bots.
Apache License 2.0
22 stars 13 forks source link

MQTT Bridge failed to connect to the broker #8

Closed rapcmia closed 11 months ago

rapcmia commented 1 year ago

When starting the hummingbot client with mqtt_autostart enabled without a running hummingbot broker, the expected behavior is that it would return an error of:

image

When starting the hummingbot broker while the client is running, you would get a different behavior where the heartbeat thread ended yet still getting Failed to connect MQTT Bridge: Connection timed out after 30.0 seconds. Retrying in 10.0 seconds.

image

Would be possible to stop the prompt of failed to connect and recognize that a connection has been established from client and mqtt like gateway?

rapcmia commented 1 year ago

Workaround: When hummingbot broker connection is established, relaunch hummingbot client

klpanagi commented 12 months ago

Sorry guys, I was AFK for some time. I will have a look on this one. The broker client should be able to reconnect without exiting hummingbot

rapcmia commented 12 months ago

No worries, thanks for checking it @klpanagi 🙇🏼

rapcmia commented 11 months ago

Hi @klpanagi good day to you, just want to check for update if we can have a PR for fix? if not possible we can open a community bounty as well for the fix. Thank you 🙇🏼

klpanagi commented 11 months ago

Hello @rapcmia I am currently working on a fix. This should be a PR on the hummingbot/hummingbot codebase. Would appreciate a bounty assigned to me for this :)

nikspz commented 11 months ago

Bounty Title: Fix for Broker Issue with mqtt_autostart Enabled

Description: There is a known issue with the broker when the client is started with mqtt_autostart enabled, especially in conjunction with the dashboard. The objective is to address and resolve this issue to enhance the overall functionality.

Requirements: Investigate the broker behavior when the client is initiated with mqtt_autostart. Identify and fix the issue causing complications, especially in coordination with the dashboard. Ensure that the broker functions seamlessly, providing a stable and reliable experience.

Reward: 50,000 HBOT

Submission Guidelines: Submit a detailed explanation of the changes made, including any relevant code modifications. Provide steps to reproduce the previous issue and demonstrate that the proposed fix resolves it effectively.

Contact: For any clarifications or updates, reach out to @rapcmia or @nikspz

Note: This bounty is aimed at improving the user experience and functionality of the broker, particularly when the client is started with mqtt_autostart enabled. The Hummingbot community values your contributions in making the platform more robust and user-friendly.

nikspz commented 11 months ago

Assigned to @klpanagi , please be informed:

Thanks for your contribution!

klpanagi commented 11 months ago

Hello @nikspz .

I have already prepare a fix for this: https://github.com/klpanagi/hummingbot/commit/f803bb9ead4a0f5e417c70c5c9a17dde007848c6

I will create the PR today.

klpanagi commented 11 months ago

PR created: https://github.com/hummingbot/hummingbot/pull/6704

rapcmia commented 11 months ago

Fix has been deployed on development and will be part of release 1.23.0

nikspz commented 9 months ago

Thanks for your participation, the bounty has been sent to @klpanagi . The fix has been deployed on development branch and hummingbot version 1.23.0.