Coder Social home page Coder Social logo

hawkbit URL regression about rauc-hawkbit-updater HOT 7 CLOSED

rauc avatar rauc commented on June 15, 2024
hawkbit URL regression

from rauc-hawkbit-updater.

Comments (7)

Bastian-Krause avatar Bastian-Krause commented on June 15, 2024

Hi,

please run rauc-hawkbit-updater with --debug. This should print the json responses from the server. I'd like to see the response to the base resource, similar to this example.

Wild guess: you're using some kind of HTTP proxy hawkBit does not know about.

from rauc-hawkbit-updater.

Bastian-Krause avatar Bastian-Krause commented on June 15, 2024

Might be similar to #85.

from rauc-hawkbit-updater.

einoj avatar einoj commented on June 15, 2024

Hi,

Thanks for the feedback. With the --debug flag running v1.1 I get the same result as with GDB

MESSAGE: Checking for new software...
DEBUG: Response body: {
  "config" : {
    "polling" : {
      "sleep" : "23:59:00"
    }
  },
  "_links" : {
    "deploymentBase" : {
      "href" : "http://hawkbit:8080/DEFAULT/controller/v1/TEST/deploymentBase/2137?c=-1956918325"
    }
  }
}
WARNING: Couldn't resolve host name

I'll have a look at the example and #85

from rauc-hawkbit-updater.

einoj avatar einoj commented on June 15, 2024

with commit 8624e71 the error message is slightly different

MESSAGE: Checking for new software...
DEBUG: Response body: {
  "config" : {
    "polling" : {
      "sleep" : "23:59:00"
    }
  },
  "_links" : {
    "deploymentBase" : {
      "href" : "http://hawkbit:8080/DEFAULT/controller/v1/TEST/deploymentBase/2137?c=-1956918325"
    }
  }
}
DEBUG: Failed to get resource from hawkbit server. Status: 0
CRITICAL: Error: HTTP request failed: Couldn't resolve host name

And with the parent commit cbafe65 it works fine

MESSAGE: Checking for new software...
DEBUG: Response body: {
  "config" : {
    "polling" : {
      "sleep" : "23:59:00"
    }
  },
  "_links" : {
    "deploymentBase" : {
      "href" : "http://hawkbit:8080/DEFAULT/controller/v1/TEST/deploymentBase/2137?c=-1956918325"               
    }
  }                                                           
}                                                             
DEBUG: Response body: {                                       
  "id" : "2137",                     
  "deployment" : {        
    "download" : "forced",
    "update" : "forced",
    "chunks" : [             
      {       
        "part" : "os",
        "version" : "v1.2.3",
        "name" : "test-linux",
        "artifacts" : [  
          {      
            "filename" : "test-linux-delta.raucb",
            "hashes" : {
              "sha1" : "dcf25521b1ca54da339354bb98d25daab51d767e",                            
              "md5" : **"a8ce7ac760017c4bd7e3173f0ce6a6f30",**     
              "sha256" : "6bbf1a9ee6025a44974561cc63366e7b950503f71e44d694383f21ef9539163d"
            },                 
            "size" : 143726,              
            "_links" : {                           
              "download-http" : {
                "href" : "https://hawkbit.mydomain.se/DEFAULT/controller/v1/TEST/softwaremodules/294/artifacts/test-linux.raucb"    
              },
              "md5sum-http" : {
                "href" : "https://hawkbit.mydomain.se/DEFAULT/controller/v1/TEST/softwaremodules/294/artifacts/test-linux-delta.raucb.MD5SUM"
              }   
            }
          }
        ]
      }                                                       
    ]                                                         
  }                                                           
}                      

from rauc-hawkbit-updater.

Bastian-Krause avatar Bastian-Krause commented on June 15, 2024

Okay, then this is expected behavior. rauc-hawkbit-updater queries the deploymentBase resource as advertised by your hawkBit instance. Quoting myself:

the depoymentBase URL is used as given by hawkBit since 8624e71. Before that the URL was handcrafted. In my opinion the correct way is to use the URLs as provided by hawkBit.

[1]

What makes hawkBit think that your instance is running on hawkbit:8080? If you fix your hawkBit configuration, rauc-hawkbit-updater will also work. I am not a hawkBit expert, but I assume that you can specify your FQDN and port somewhere.

from rauc-hawkbit-updater.

ejoerns avatar ejoerns commented on June 15, 2024

Maybe someone who successfully fixed this should add a hint to the documentation on how to fix/configure this in hawkBit.

from rauc-hawkbit-updater.

einoj avatar einoj commented on June 15, 2024

It was indeed the same issue as #85.
This was the fix: server.forward-headers-strategy=NATIVE along with setting the correct incoming "Host:" header.

from rauc-hawkbit-updater.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.