[GH-ISSUE #748] [Bug]: MQTT connection going stale after a minute on some printers #501

Closed
opened 2026-05-06 12:30:20 +02:00 by BreizhHardware · 3 comments

Originally created by @jimmy-brightz on GitHub (Mar 18, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/748

Originally assigned to: @maziggy on GitHub.

Bug Description

I have a print farm of H2D printers and I added a couple of them to Bambuddy to try it out. Some of the H2Ds work perfectly with Bambuddy, but 3 of them will not stay connected and will go offline after a minute. In the logs, I see that the initial MQTT connection is successful, but after a minute the connection drops because it goes "stale". I was previously using the Home Assistant Bambu Lab integration to monitor these printers, and had no issues setting that up with them.

Bambuddy is running on my Docker host from the provided docker-compose, with a few small tweaks to use a directory as the volume and to hook into my Traefik reverse proxy for the web interface. I've tried running it with host mode networking and got the same behavior. I can ping the printers without a problem from the Docker host, as well as connect to their MQTT port through telnet.

The printers are all running the latest firmware version available from Bambu Lab, 01.02.00.00. Ive tried power cycling them, toggling LAN mode, generating a new access code, and several combinations of these things. I removed these printers from the Home Assistant integration in case the extra MQTT traffic was causing problems.

Expected Behavior

The printers remain connected and Bambuddy gathers data from them.

Steps to Reproduce

  1. Put printer into LAN mode with developer mode enabled
  2. Connect Bambuddy to the printer using its IP, access code, and serial number
  3. The printer shows connected with some basic information, but goes "offline" after a minute

Printer Model

H2D

Bambuddy Version

0.2.2

Printer Firmware Version

01.02.00.00

Installation Method

Docker

Operating System

Docker

Relevant Logs / Support Package

bambuddy-support-20260318-085757.zip

Screenshots

No response

Additional Context

No response

Checklist

  • I have searched existing issues to ensure this bug hasn't already been reported
  • I am using the latest version of Bambuddy
  • My printer is set to LAN Only mode
  • My printer has Developer Mode enabled
Originally created by @jimmy-brightz on GitHub (Mar 18, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/748 Originally assigned to: @maziggy on GitHub. ### Bug Description I have a print farm of H2D printers and I added a couple of them to Bambuddy to try it out. Some of the H2Ds work perfectly with Bambuddy, but 3 of them will not stay connected and will go offline after a minute. In the logs, I see that the initial MQTT connection is successful, but after a minute the connection drops because it goes "stale". I was previously using the Home Assistant Bambu Lab integration to monitor these printers, and had no issues setting that up with them. Bambuddy is running on my Docker host from the provided docker-compose, with a few small tweaks to use a directory as the volume and to hook into my Traefik reverse proxy for the web interface. I've tried running it with host mode networking and got the same behavior. I can ping the printers without a problem from the Docker host, as well as connect to their MQTT port through telnet. The printers are all running the latest firmware version available from Bambu Lab, 01.02.00.00. Ive tried power cycling them, toggling LAN mode, generating a new access code, and several combinations of these things. I removed these printers from the Home Assistant integration in case the extra MQTT traffic was causing problems. ### Expected Behavior The printers remain connected and Bambuddy gathers data from them. ### Steps to Reproduce 1. Put printer into LAN mode with developer mode enabled 2. Connect Bambuddy to the printer using its IP, access code, and serial number 3. The printer shows connected with some basic information, but goes "offline" after a minute ### Printer Model H2D ### Bambuddy Version 0.2.2 ### Printer Firmware Version 01.02.00.00 ### Installation Method Docker ### Operating System Docker ### Relevant Logs / Support Package [bambuddy-support-20260318-085757.zip](https://github.com/user-attachments/files/26087681/bambuddy-support-20260318-085757.zip) ### Screenshots _No response_ ### Additional Context _No response_ ### Checklist - [x] I have searched existing issues to ensure this bug hasn't already been reported - [x] I am using the latest version of Bambuddy - [x] My printer is set to LAN Only mode - [x] My printer has Developer Mode enabled
BreizhHardware 2026-05-06 12:30:20 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@maziggy commented on GitHub (Mar 18, 2026):

I'm also using multiple H2D with Bambuddy and cannot reproduce the problem. At least there seems to be a FTP problem, because Bambuddy cannot find the print file on the printer.

  • SD card inserted and formatted?
  • "Store sent files on external storage" enabled in slicer?
  • any firewalls running?

I also strongly suggest to enable Docker network mode host as per documentation. We already saw very weird things when Docker network was set to bridge.

<!-- gh-comment-id:4083279808 --> @maziggy commented on GitHub (Mar 18, 2026): I'm also using multiple H2D with Bambuddy and cannot reproduce the problem. At least there seems to be a FTP problem, because Bambuddy cannot find the print file on the printer. - SD card inserted and formatted? - "Store sent files on external storage" enabled in slicer? - any firewalls running? I also strongly suggest to enable Docker network mode host as per documentation. We already saw very weird things when Docker network was set to bridge.
Author
Owner

@maziggy commented on GitHub (Mar 18, 2026):

Oh yes...and check your folder permissions.

2026-03-17 14:18:52,697 ERROR [backend.app.services.virtual_printer.manager] Cannot create directory /app/data/virtual_printer/uploads: Permission denied. For Docker: ensure
the data volume is writable by the container user. For bare metal: run 'sudo chown -R $(whoami) /app/data/virtual_printer'
2026-03-17 14:18:52,697 ERROR [backend.app.services.virtual_printer.manager] Cannot create directory /app/data/virtual_printer/certs: Permission denied. For Docker: ensure th
e data volume is writable by the container user. For bare metal: run 'sudo chown -R $(whoami) /app/data/virtual_printer'

<!-- gh-comment-id:4083508410 --> @maziggy commented on GitHub (Mar 18, 2026): Oh yes...and check your folder permissions. >2026-03-17 14:18:52,697 ERROR [backend.app.services.virtual_printer.manager] Cannot create directory /app/data/virtual_printer/uploads: Permission denied. For Docker: ensure the data volume is writable by the container user. For bare metal: run 'sudo chown -R $(whoami) /app/data/virtual_printer' >2026-03-17 14:18:52,697 ERROR [backend.app.services.virtual_printer.manager] Cannot create directory /app/data/virtual_printer/certs: Permission denied. For Docker: ensure th e data volume is writable by the container user. For bare metal: run 'sudo chown -R $(whoami) /app/data/virtual_printer'
Author
Owner

@jimmy-brightz commented on GitHub (Mar 18, 2026):

I spun up a fresh new container keeping the networking in host mode, and it worked. There must be something else going on with my setup. It's so weird how it's just those 3 printers that have issues.

I'm still getting the FTP 550 errors, but that doesn't seem to impact anything from what I can tell? I'm going to spin up a VM just for Bambuddy and just keep everything as default.

<!-- gh-comment-id:4084033224 --> @jimmy-brightz commented on GitHub (Mar 18, 2026): I spun up a fresh new container keeping the networking in host mode, and it worked. There must be something else going on with my setup. It's so weird how it's just those 3 printers that have issues. I'm still getting the FTP 550 errors, but that doesn't seem to impact anything from what I can tell? I'm going to spin up a VM just for Bambuddy and just keep everything as default.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy#501
No description provided.