Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Trouble making HTTP requests from docker container

    Scheduled Pinned Locked Moved
    Duet Web Control
    5
    20
    625
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Peter Lebiedzinskiundefined
      Peter Lebiedzinski @Peter Lebiedzinski
      last edited by

      @Peter-Lebiedzinski @chrishamm Since I don't currently have access to a USB cable with duet until Sunday, and this is time-sensitive for me.

      1 Reply Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators @Peter Lebiedzinski
        last edited by

        @Peter-Lebiedzinski Since reprapfirmware is using its own little http server there is no dedicate config file. Here you can find some docs about the general API: https://github.com/Duet3D/RepRapFirmware/wiki/HTTP-requests Note that every request starting with /rr_ is covered there.

        Every other request is a file request. Probably some subdirectory (like /foobar/rr_status) is added to your request leading to that error. Without further debugging as pointed out above it's hard to say what it is.

        Maybe you can run Wireshark on the host and capture what exactly is going on.

        Duet software engineer

        Peter Lebiedzinskiundefined 1 Reply Last reply Reply Quote 0
        • Peter Lebiedzinskiundefined
          Peter Lebiedzinski @chrishamm
          last edited by

          @chrishamm It looks like the request URI is not resolving properly and this is causing the server to treat it as a file request:

          https://github.com/Duet3D/RepRapFirmware/blob/v3-chrishamm/src/Networking/HttpResponder.cpp#L1140

          Wireshark traces:

          Working request payload:

          Hypertext Transfer Protocol
          GET /rr_status HTTP/1.1\r\n
          Host: 192.168.75.110\r\n
          User-Agent: curl/7.83.1\r\n
          Accept: /\r\n
          \r\n
          [Full request URI: http://192.168.75.110/rr_status]
          [HTTP request 1/1]
          [Response in frame: 9957]

          Not working request payload:

          Hypertext Transfer Protocol
          GET http://192.168.75.110/rr_status HTTP/1.1\r\n
          Host: 192.168.75.110\r\n
          User-Agent: curl/7.74.0\r\n
          Accept: /\r\n
          \r\n
          [Full request URI: http://192.168.75.110/rr_status]
          [HTTP request 1/1]
          [Response in frame: 23915]

          chrishammundefined 1 Reply Last reply Reply Quote 0
          • o_lampeundefined
            o_lampe
            last edited by

            All that HTTP and Docker stuff is way out of my knowledge zone, but I'd try to "ping" the Duet bord from inside the docker container.
            Maybe Duets IP address is out of Dockers reach?

            1 Reply Last reply Reply Quote 0
            • chrishammundefined
              chrishamm administrators @Peter Lebiedzinski
              last edited by

              @Peter-Lebiedzinski Thanks, that explains it, looks like the Duet HTTP server didn't understand absolute URIs. I've got a fix ready, if you are comfortable running out a beta version, here my current dev build for the 6HC with that fix.

              Duet software engineer

              Peter Lebiedzinskiundefined 1 Reply Last reply Reply Quote 0
              • Peter Lebiedzinskiundefined
                Peter Lebiedzinski @chrishamm
                last edited by

                @chrishamm Okay I can try the new build. Will it work on the following Duet hardware:

                Board: Duet 2 WiFi (2WiFi)
                Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.4.4 (2022-10-20)
                Duet WiFi Server Version: 1.27

                chrishammundefined 1 Reply Last reply Reply Quote 0
                • chrishammundefined
                  chrishamm administrators @Peter Lebiedzinski
                  last edited by

                  @Peter-Lebiedzinski Sorry, that's for the 6HC, for some reason I thought you were using that. I'll prepare another Duet 2 build when I get home again.

                  Duet software engineer

                  Peter Lebiedzinskiundefined 1 Reply Last reply Reply Quote 0
                  • Peter Lebiedzinskiundefined
                    Peter Lebiedzinski @chrishamm
                    last edited by

                    @chrishamm Great. Thank you for the fast support.

                    chrishammundefined 1 Reply Last reply Reply Quote 0
                    • chrishammundefined
                      chrishamm administrators @Peter Lebiedzinski
                      last edited by

                      @Peter-Lebiedzinski Here you go.

                      Duet software engineer

                      Peter Lebiedzinskiundefined 3 Replies Last reply Reply Quote 1
                      • Peter Lebiedzinskiundefined
                        Peter Lebiedzinski @chrishamm
                        last edited by

                        @chrishamm This new firmware has fixed the issue. Thank you.

                        1 Reply Last reply Reply Quote 2
                        • Peter Lebiedzinskiundefined
                          Peter Lebiedzinski @chrishamm
                          last edited by

                          @chrishamm would we be able to generate the firmware for the Duet 3 6XD board as well?

                          jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                          • jay_s_ukundefined
                            jay_s_uk @Peter Lebiedzinski
                            last edited by jay_s_uk

                            @Peter-Lebiedzinski the fix should be included in 3.5b3

                            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                            1 Reply Last reply Reply Quote 1
                            • Peter Lebiedzinskiundefined
                              Peter Lebiedzinski @chrishamm
                              last edited by

                              @chrishamm Sorry for asking again, but I am working with someone who is unable to use the latest version 3.5b3, and has to use 3.4.5, specifically with the following:

                              Board: Duet 3 MB6XD (MB6XD)
                              DSF Version: 3.4.5
                              Firmware: RepRapFirmware for Duet 3 MB6XD 3.4.5
                              Duet Web Control 3.4.5

                              Could you generate the firmware for this configuration? If possible, in the future, I'd like to save you the trouble of generating these files, is there documentation on how I can generate these files myself?

                              dc42undefined 1 Reply Last reply Reply Quote 0
                              • dc42undefined
                                dc42 administrators @Peter Lebiedzinski
                                last edited by

                                @Peter-Lebiedzinski I've back-ported the fix to the 3.4-dev branch, so it will be included in the forthcoming 3.4.6 release.

                                Duet WiFi hardware designer and firmware engineer
                                Please do not ask me for Duet support via PM or email, use the forum
                                http://www.escher3d.com, https://miscsolutions.wordpress.com

                                1 Reply Last reply Reply Quote 1
                                • First post
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA