TFyre/bambu-farm

Unknown Exception upon entering the web interface?

bolsoncerrado opened this issue · 7 comments

Hi!

First time setting this up, I launch the jar with the minimal .env created with 3 machines (P1P) which ARE CURRENTLY PRINTING (dunno if that makes a difference) but as soon as I log into the web interface and the 3 machines are supposed to be listed, the terminal window is flooded with red text and the following text repeats over and over:

2024-06-11 10:36:38,372 ERROR [com.tfy.bam.cam.CamelController] (executor-thread-1) onCamelContextFullyStarted: Errors with stopStart: [myprinter1: Unknown Exception: com.tfyre.bambu.printer.BambuPrinterException: myprinter1: Error starting route: consumer-myprinter1, myprinter2: Unknown Exception: com.tfyre.bambu.printer.BambuPrinterException: myprinter2: Error starting route: consumer-myprinter2, myprinter3: Unknown Exception: com.tfyre.bambu.printer.BambuPrinterException: myprinter3: Error starting route: consumer-myprinter3]: com.tfyre.bambu.printer.BambuPrinterException: Errors with stopStart: [myprinter1: Unknown Exception: com.tfyre.bambu.printer.BambuPrinterException: myprinter1: Error starting route: consumer-myprinter1, myprinter2: Unknown Exception: com.tfyre.bambu.printer.BambuPrinterException: myprinter2: Error starting route: consumer-myprinter2, myprinter3: Unknown Exception: com.tfyre.bambu.printer.BambuPrinterException: myprinter3: Error starting route: consumer-myprinter3]

What's exactly going on?

I made sure serials, ips and access codes were right :??? What am I missing here?

Thanks for this GREAT idea for FARM CONTROL! Much long awaited!!

EDIT1: Apparently I can read Connection timeouts for each printer.

EDIT2: Does it matter my printers are on the 192.168.1.xxx network and the bambu-farm thing works on the http://127.0.0.1:8080/ network?

Hi !
Can you send your .env configuration file without the IDs and access_code of your printers?

192.168.xxx.xxx is the IP address of your local private network and 127.0.0.1 is the address that allows access to the ports of your computer on which you have the server. This difference is therefore normal (can also be replaced by localhost:8080).
But is your computer connected to the same network as your printers?

yes it is, Bstudio access them without any issues.

Current .env and printers repeat up to 3 instances just for test purposes. Have a few more printers to add granted it works as it should ;)

`alex@Mac-Studio farm % more .env

bambu.auto-login=true
bambu.remote-view=true
bambu.dashboard.remote-view=true
quarkus.http.limits.max-body-size=30M
bambu.dark-mode=true
bambu.users.admin.password=admin
bambu.users.admin.role=admin

quarkus.http.host=192.168.1.2
quarkus.http.port=8080

bambu.printers.myprinter1.name=TARS
bambu.printers.myprinter1.enabled=true
bambu.printers.myprinter1.device-id=01Sxxxxxxxxxxxxxx
bambu.printers.myprinter1.access-code=xxxxxxxxxxxx
bambu.printers.myprinter1.ip=192.68.1.117
bambu.printers.myprinter1.stream.enable=true
bambu.printers.myprinter1.bed-levelling=true
bambu.printers.myprinter1.flow-calibration=false
bambu.printers.myprinter1.model=p1p`

  • in the above I tried quarkus at same printer network, website works fine but same results for printers.

EDIT: Just to add, this morning I had 2 of the printers completed print and one awaiting filament, none could connect to bambufarm. It just times out:

'2024-06-12 10:40:35,725 INFO [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 4.6.0 (camel-1) started in 7ms (build:0ms init:0ms start:7ms)
2024-06-12 10:40:35,731 INFO [com.tfy.bam.pri.BambuPrintersImpl] (executor-thread-1) TARS: starting
2024-06-12 10:40:35,812 INFO [io.quarkus] (main) bambu-web 1.2.0 on JVM (powered by Quarkus 3.11.0) started in 1.126s. Listening on: http://192.168.1.2:8080
2024-06-12 10:40:35,812 INFO [io.quarkus] (main) Profile prod activated.
2024-06-12 10:40:35,812 INFO [io.quarkus] (main) Installed features: [camel-core, camel-direct, camel-paho, cdi, rest, rest-jackson, scheduler, security, servlet, smallrye-context-propagation, vaadin-quarkus, vertx, websockets, websockets-client]
2024-06-12 10:40:47,775 INFO [com.vaa.qua.QuarkusInstantiator] (executor-thread-6) Can't find any @VaadinServiceScoped bean implementing 'I18NProvider'. Cannot use CDI beans for I18N, falling back to the default behavior.
2024-06-12 10:41:35,791 ERROR [com.tfy.bam.pri.BambuPrintersImpl] (executor-thread-1) TARS: Unknown Exception: com.tfyre.bambu.printer.BambuPrinterException: TARS: Error starting route: consumer-TARS'

It takes an (almost) exact minute to find out it times out.

TFyre commented

You can remove all the defaulted options from your config eg:

bambu.remote-view=true
bambu.dashboard.remote-view=true

bambu.printers.myprinter1.enabled=true
bambu.printers.myprinter1.flow-calibration=false
bambu.printers.myprinter1.model=p1p

Why do you set the http host/port directly? I dont think its required

quarkus.http.host=192.168.1.2
quarkus.http.port=8080

Looks like its not able to connect to the printer's mqtt interface. You can test this from terminal:

ping 192.68.1.117
openssl s_client -connect 192.68.1.117:8883

I believe the IP is incorrect, it should be 192.168.1.117 (168 vs 68)

LOOOOOOL

STUPID ME!

OF COURSE IT'S 168!

ROTFL!

TESTING NOW!

ULTRATHANKS FOR This overlook!

And of course, FULLY and AUTOMATICALLY WORKING NOW!

GEEZ!

Blame on me! Shame on me!

Thanks again.

TFyre commented

Blame on me! Shame on me!

No need, it happens to us all 😃