Unsolved FW 3.5.2 Web Control unusable when password and telnet used
-
Upgraded from 3.4.6 to 3.5.2 using Duet2and3Firmware-3.5.2.zip and Web Control lost CSS formatting leaving most of the interface unusable. Reverting back to 3.4.6 fixed the issue.
I tested multiple times redoing firmware upgrade, redownloading files, manually recreating www directory on SD card, using a new SD card, but the error persisted. Reverting back to 3.4.6 always fixed the issue.
Finally figured out that the GET request for app.ef12892b.css was being refused with error NS_ERROR_UNKNOWN_HOST.
This only caused a problem when I was using a Password (M551 P"password") and had Telnet also enabled (M586 P2 S1). Web Control randomly worked if I restarted the machine using emergency stop but then the gcode editor did not work. if I power cycled the machine then Web Control would always load incorrectly.
I finally just disabled telnet, by commenting out M586 P2 S1, and everything works as expected.
Is this a bug?
Below is my config and result of M122 command. Let me know if you need any more info.
; Configuration file for Duet Maestro (firmware version 3) ; executed by the firmware on start-up ; ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"ForkLift" ; set printer name ; Accessories M575 P1 S0 B57600 ; configure PanelDue support ; Network M551 P"password" ; set password M552 P0.0.0.0 S1 ; enable network and acquire dynamic address via DHCP M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP ;M586 P2 S1 ; enable Telnet ; Drives M569 P0 S0 D2 ; Driver 0 (X) goes backwards (S0) spread cycle (D2) M569 P1 S0 D2 ; Driver 1 (Y) goes backwards (S0) spread cycle (D2) M569 P2 S1 D2 ; Driver 2 (Z) goes forwards (S1) spread cycle (D2) M569 P4 S1 D2 ; Driver 4 (Extruder 0) goes forwards (S1) spread cycle (D2) ; Motor Idle Current Reduction M906 I30 ; set motor current idle factor M84 S30 ; set motor current idle timeout ; Axes M584 X0 Y1 Z2 ; set axis mapping M350 X16 Y16 Z16 I1 ; configure microstepping with interpolation M906 X1600 Y1600 Z1600 ; set axis driver currents M92 X80 Y80 Z1600 ; configure steps per mm M208 X-17:325 Y-21:325 Z0:295 ; set minimum and maximum axis limits M566 X900 Y900 Z60 ; set maximum instantaneous speed changes (mm/min) M203 X6000 Y6000 Z180 ; set maximum speeds (mm/min) M201 X500 Y500 Z20 ; set accelerations (mm/s^2) ; Extruders M584 E4 ; set extruder mapping M350 E16 I1 ; configure microstepping with interpolation M906 E640 ; set extruder driver currents 800 max, 640 @ 80% M92 E932 ; configure steps per mm M566 E120 ; set maximum instantaneous speed changes (mm/min) M203 E6000 ; set maximum speeds (mm/min) M201 E250 ; set accelerations (mm/s^2) ; Kinematics M669 K1 ; configure CoreXY kinematics ; Probes M558 K0 P9 C"^zprobe.in" H5 F120 T6000 ; configure BLTouch probe via slot #0 G31 P500 X13 Y54 Z4.58 ; set Z probe trigger value, offset and trigger height M950 S0 C"zprobe.mod" ; create servo #0 for BLtouch ; Endstops M574 X1 P"xstop" S1 ; configure X axis endstop M574 Y1 P"ystop" S1 ; configure Y axis endstop M574 Z1 S2 ; configure Z axis endstop ; Mesh Bed Compensation M557 X15:315 Y35:315 S50:46 ; define grid for mesh bed compensation ; Sensors M308 S0 P"bedtemp" Y"thermistor" A"Heated Bed" T100000 B3950 C7.06e-8 ; configure sensor #0 M308 S1 P"spi.cs1" Y"rtdmax31865" A"Nozzle" ; configure sensor #1 ; Heaters M950 H0 C"bedheat" T0 ; create heater #0 M143 H0 P0 T0 C0 S120 A0 ; configure heater monitor #0 for heater #0 S120 = 120C max heat M307 H0 R0.281 K0.257:0.000 D5.65 E1.35 S1.00 B0 ; Calibrated bed heater using M303 H0 S60 M950 H1 C"e0heat" T1 ; create heater #1 M143 H1 P0 T1 C0 S270 A0 ; configure heater monitor #0 for heater #1 S270 = 270C max heat M307 H1 R2.663 K0.248:0.200 D11.87 E1.35 S1.00 B0 V24.1 ; Calibrated bed heater using M303 H1 S220 ; Heated beds M140 P0 H0 ; configure heated bed #0 ; Fans M950 F0 C"fan0" ; create fan #0 M106 P0 C"Part" S0 L0 X1 B0.1 ; configure fan #0 M950 F1 C"fan1" ; create fan #1 M106 P1 C"Tool" S0 B0.1 H1 T45 ; configure fan #1 ; Tools M563 P0 D0 H1 F0 ; create tool #0 M568 P0 R0 S0 ; set initial tool #0 active and standby temperatures to 0C ; Custom settings M950 P1 C"e1heat" ; LED light connected to E1 heater connection and set as GPIO output pin 0 M671 X4:310:324:4 Y4:4:310:324 P0.35 ; Define manual bed levelling position of screws 4 max - point1 (10,290), point2 (290,290), point3 (290,10), point4 (10,10)
M122 === Diagnostics === RepRapFirmware for Duet 2 Maestro version 3.5.2 (2024-06-11 17:12:19) running on Duet Maestro 1.0 Board ID: 08DLM-9T6R1-MA3TN-6JKDJ-3SW6J-1HZKP Used output buffers: 1 of 26 (16 max) === RTOS === Static ram: 23600 Dynamic ram: 64480 of which 0 recycled Never used RAM 27624, free system stack 212 words Tasks: NETWORK(1,ready,28.3%,236) HEAT(3,nWait 5,0.1%,340) Move(4,nWait 5,0.0%,396) TMC(4,nWait 5,1.8%,108) MAIN(1,running,69.8%,790) IDLE(0,ready,0.1%,30), total 100.0% Owned mutexes: === Platform === Last reset 00:05:29 ago, cause: power up Last software reset at 2024-07-20 12:56, reason: User, Gcodes spinning, available RAM 27624, slot 0 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00000000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 MCU temperature: min 42.6, current 47.9, max 48.3 Supply voltage: min 24.2, current 24.2, max 24.3, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0 Events: 0 queued, 0 completed Driver 0: standstill, read errors 0, write errors 0, ifcnt 7, reads 54944, writes 7, timeouts 0, DMA errors 0, CC errors 0 Driver 1: standstill, read errors 0, write errors 0, ifcnt 7, reads 54943, writes 7, timeouts 0, DMA errors 0, CC errors 0 Driver 2: standstill, read errors 0, write errors 0, ifcnt 7, reads 54943, writes 7, timeouts 0, DMA errors 0, CC errors 0 Driver 3: standstill, read errors 0, write errors 0, ifcnt 6, reads 54944, writes 6, timeouts 0, DMA errors 0, CC errors 0 Driver 4: standstill, read errors 0, write errors 0, ifcnt 7, reads 54943, writes 7, timeouts 0, DMA errors 0, CC errors 0 Driver 5: not present Driver 6: not present Date/time: 2024-07-20 13:05:44 Slowest loop: 8.17ms; fastest: 0.18ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 10 SD card 0 detected, interface speed: 15.0MBytes/sec SD card longest read time 1.9ms, write time 0.0ms, max retries 0 === Move === DMs created 83, segments created 0, maxWait 0ms, bed compensation in use: none, height map offset 0.000, max steps late 0, min interval 0, bad calcs 0, ebfmin 0.00, ebfmax 0.00 no step interrupt scheduled Moves shaped first try 0, on retry 0, too short 0, wrong shape 0, maybepossible 0 === DDARing 0 === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters 0 -1, chamber heaters -1 -1, ordering errs 0 === GCodes === Movement locks held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Q0 segments left 0 Code queue 0 is empty === Network === Slowest loop: 7.58ms; fastest: 0.01ms Responder states: HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) HTTP sessions: 1 of 8 Interface state active, link 100Mbps full duplex Socket states: 1 2 2 2 0 2
M39 SD card in slot 0: capacity 31.02GB, partition size 31.01GB, free space 30.81GB, speed 15.00MBytes/sec, cluster size 32kB
-
-
@tinker If you get CSS errors even after force-reloading the page via Ctrl+Shift+R, maybe something went wrong while you uploaded DWC 3.5.2. You could copy it over directly from a PC to the
www
directory if it failed before. NS_ERROR_UNKOWN_HOST means that your browser could not resolve the hostname of your printer while trying to request something, so better try to connect via the IP address, that should eliminate that error.If you enable Telnet, you have fewer sockets available on the Duet Maestro which can cause problems with certain browsers (in particular Chrome) especially if you have FTP enabled as well. If you don't need FTP too frequently, I highly recommend disabling it to get more HTTP sockets as well which should make the web interface more reliable.
I doubt setting a password has a big effect on the web interface. Enabling (or disabling) FTP and/or Telnet certainly has an effect, though.
-
@chrishamm Thanks for the input.
If you get CSS errors even after force-reloading the page via Ctrl+Shift+R, maybe something went wrong while you uploaded DWC 3.5.2...
I did try force-reloading, clearing cache, and cookies. Also tried manually copying files to SD. I don't think the files are corrupted because the problem is repeatable just by turning password and telnet on and power cycling the board. When Password or Telnet is disabled everything works so the files must be good.
NS_ERROR_UNKOWN_HOST means that your browser could not resolve the hostname of your printer while trying to request something, so better try to connect via the IP address...
I tried using IP address and the error changed to NS_ERROR_CONNECTION_REFUSED. The CSS was still not loaded and the end result was the same.
If you enable Telnet, you have fewer sockets available on the Duet Maestro which can cause problems
I tested:
- Password off, FTP on, Telnet on - everything works
- Password on, FTP on, Telnet on - CSS not loaded
- Password on, FTP off, Telnet on - CSS not loaded
- Password on, FTP off, Telnet off - everything works
- Password on, FTP on, Telnet off - everything works
I doubt setting a password has a big effect on the web interface. Enabling (or disabling) FTP and/or Telnet certainly has an effect, though.
I think it has something to do with the order files are loaded by the browser. The CSS is loaded before the password is requested and I think that is stopping it from loading. Once the password is entered the CSS is not reloaded, as it was assumed to be loaded already, so the interface does not work. When I occasionally got Web Control to work, by using emergency stop, it was reloading the page with the password transferred in request so the CSS loaded successfully.
-
@tinker It might be possible that the slight delay you need to enter a password is sufficient for the resources on the Duet to free up. That's the only explanation I can think of. NS_ERROR_CONNECTION_REFUSED would be a sign that the Duet is still overloaded (because of too few free sockets) when DWC attempts to load the object model.
If you need FTP and/or Telnet access from time to time, perhaps consider creating macros to turn that on and off on demand, but start with FTP/Telnet disabled. That should make the initial load of DWC on a Duet 2 Ethernet or Duet Maestro more stable.