Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download URLs always starting with "http://localhost:8080" #173

Closed
Silvanoc opened this issue May 12, 2016 · 2 comments
Closed

Download URLs always starting with "http://localhost:8080" #173

Silvanoc opened this issue May 12, 2016 · 2 comments
Milestone

Comments

@Silvanoc
Copy link

We have installed Hawkbit on a machine and have devices getting uploads via DDI (HTTP).

In past versions (last update older than 1 month) everything worked fine, but yesterday we updated to the newest master and suddenly the downloads of artifacts aren't working anymore. The issue is that the download URL being provided starts with "http://localhost:8080" although Hawkbit is being contacted from outside of the machine.

Are there any changes in the configuration that we haven't done so far? Or is it an issue in Hawkbit?

Unfortunately I don't think I can provide which version was working fine until Tuesday.

@michahirsch
Copy link
Contributor

michahirsch commented May 13, 2016

Hi @Silvanoc

Yes it has been changed a little. Due in many cases you want that devices are not downloading directly from the hawkBit server (maybe through an external download-server) to reduce the load on the hawkBit-server during downloads which could be long running and resource intensive and so reduce the available threads for answering other poll-request. It was necessary to introduce a interface org.eclipse.hawkbit.api.ArtifactUrlHandler to render URLs to artifacts.

The default implementation org.eclipse.hawkbit.api.PropertyBasedArtifactUrlHandler uses properties for defining the download URL pattern and placeholders like hostname, filename etc, which must be specified as properties. The properties and defaults are specified in the org.eclipse.hawkbit.api.ArtifactUrlHandlerProperties

Currently you'll need to configure the hostname or IP address in your property-file.

hawkbit.artifact.url.http.hostname=myhawkbitserver
hawkbit.artifact.url.https.hostname=myhawkbitserver
hawkbit.artifact.url.http.port=80
hawkbit.artifact.url.https.port=443
hawkbit.artifact.url.https.enabled=true
hawkbit.artifact.url.http.enabled=true

The default URL pattern would then be

{protocol}://{hostname}:{port}/{tenant}/controller/v1/{targetId}/softwaremodules/{softwareModuleId}/artifacts/{artifactFileName}

Cheers,
Michael

@Silvanoc
Copy link
Author

Thank you for the prompt answer! It worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants