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

Error downloading .tgz #2600

Closed
tbartelmess opened this issue Apr 30, 2017 · 3 comments
Closed

Error downloading .tgz #2600

tbartelmess opened this issue Apr 30, 2017 · 3 comments

Comments

@tbartelmess
Copy link
Contributor

tbartelmess commented Apr 30, 2017

Nomad version

Nomad version: Nomad v0.5.6

Operating system and Environment details

Ubuntu 16.04 LTS

Issue

I am trying to use the Java driver to run Graylog, which is distributed as .tgz file. Using an artifact stanza like this

    artifact {
      source = "https://s3.ca-central-1.amazonaws.com/marketcircle-nomad-artifacts/graylog-2.2.3.tgz"
      destination = "/tmp/gl"
    }

Nomad is downloading the file but it looks like after decompressing the /tmp/gl folder is empty. Doing the same with a .zip archive https://s3.ca-central-1.amazonaws.com/marketcircle-nomad-artifacts/graylog-2.2.3.zip works fine.

I've also tried to use the go-getter test tool to download the tgz file and it downloads and decompresses it fine

Reproduction steps

Run the job from the Job file section

$ nomad run graylog.nomad
==> Monitoring evaluation "25984e0e"
    Evaluation triggered by job "graylog"
    Allocation "4f07e679" created: node "957b1432", group "server"
    Evaluation status changed: "pending" -> "complete"
==> Evaluation "25984e0e" finished with status "complete"

Check the alloc logs, and you'll see something like

04/30/17 15:55:15 UTC  Restarting                Task restarting in 15.867810596s
04/30/17 15:55:15 UTC  Failed Artifact Download  failed to download artifact "https://s3.ca-central-1.amazonaws.com/marketcircle-nomad-artifacts/graylog-2.2.3.tgz": open /var/nomad/alloc/4f07e679-6740-ae05-d09c-5fb8bcfd06e6/server/tmp/gl/graylog-2.2.3/graylog.jar: no such file or directory
04/30/17 15:55:11 UTC  Downloading Artifacts     Client is downloading artifacts

And checking the download folder, shows an empty folder:

nomad fs 4f07e679 server/tmp/gl
Mode  Size  Modified Time  Name

Try the same with the .zip download (just replace .tgz with .zip in the job file) and the server/tmp/gl folder will look like this:

root@golem:~# nomad fs 24031c50 server/tmp/gl
Mode        Size     Modified Time          Name
drwxr-xr-x  4.0 KiB  04/30/17 15:57:51 UTC  __MACOSX/
drwxr-xr-x  4.0 KiB  04/30/17 15:57:51 UTC  graylog-2.2.3/

Job file

job "graylog" {
  type = "service"
  datacenters = ["dc1"]
  task "server" {
    driver = "java"
    artifact {
      source = "https://s3.ca-central-1.amazonaws.com/marketcircle-nomad-artifacts/graylog-2.2.3.zip"
      destination = "/tmp/gl"
    }
    resources {
      cpu = 1000
      memory = 1024
      network {
        port "http" {}
      }
    }
    config {
        jar_path = "tmp/gl/graylog-2.2.3/graylog.jar" # This won't work because some extra stuff is needed, however this is irrelevant for this bug.  
    }
  }
}
@dadgar
Copy link
Contributor

dadgar commented May 3, 2017

Hey this is fixed by #2524 and will be part of 0.6.0! Sorry you ran into it!

@dadgar dadgar closed this as completed May 3, 2017
@tbartelmess
Copy link
Contributor Author

@dadgar Nice! Thanks.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants