DWC destroyed config.g



  • Hi,

    Bug report:

    DuetWifi 1.19.2 + DWC

    I was editing my config.g via the web editor, and clicked save - and got a weird AJAX error and a missing config.g!
    Only the config.g.bak was still there, but the "last modified" date is 2 weeks ago - so not the most recent bak file I presume.
    https://imgur.com/a/QJslw

    This is the first time this happened - must be some weird edge case, since I can't reproduce it again…

    So, just a word of advice, until I can track this down: MAKE A BACKUP! Luckily I had almost all recent changes in a git repository.



  • Hmm weird things are happening - halloween around the corner? 🙂

    Somehow I now am completely unable to modify my config.g via DWC. I always end up with above error.
    I managed to get the following serial debug output:

    New conn on socket 0 for local port 80
    HTTP connection accepted
    Found responder
    Received 615 bytes
    Sending reply, file = no
    HTTP req, command words { GET /rr_delete HTTP/1.0 }, parameters { name=0:/sys/config.g.bak }
    New conn on socket 0 for local port 80
    HTTP connection accepted
    Found responder
    Received 632 bytes
    Sending reply, file = no
    HTTP req, command words { GET /rr_move HTTP/1.0 }, parameters { old=0:/sys/config.g new=0:/sys/config.g.bak }
    New conn on socket 0 for local port 80
    HTTP connection accepted
    Found responder
    Received 2048 bytes
    Sending reply, file = no
    Webserver: rejecting message with: 500 too many header key-value pairs
    Received 2048 bytes
    
    


  • Ok - I think I found the culprit!

    I was running DWC behind an nginx reverse proxy (proxy_pass).
    Apparently this causes problems: [c]proxy_set_header Host $http_host;[/c], because it will append the port number the the Host header [c]10.0.0.42:80[/c], which then, I think, causes an error here: https://github.com/dc42/RepRapFirmware/blob/871c22c0c5b1c5479488014f7d428efe423c38c7/src/DuetNG/HttpResponder.cpp#L360
    Removing the proxy_set_header, which was part of include proxy_params, resolved this issue.

    All in all a bunch of weird configurations & errors on my side. Still surprised that the config.g just disappeared.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.