Can't upload signed artifacts compressed with LZMA

Ok I tried mender-cli and it worked.
But I was following logs of mender-deployments and some activity appeared there only at the very end of upload process. So I suppose when you upload file via mender-cli, not the same checks are performed as when you upload via GUI? But @oleorhagen sais he doesn’t have problems with gui, while me and @mirzak have. Very strange.

Everything is hosted on one VPS as containers, everything is as it was with V2.0.0 release of Integration:

root@server:~# docker ps -a
CONTAINER ID        IMAGE                                      COMMAND                  CREATED             STATUS                PORTS                    NAMES
c9f7c10ce350        mendersoftware/api-gateway:2.0.0           "/entrypoint.sh"         8 weeks ago         Up 3 days             0.0.0.0:443->443/tcp     menderproduction_mender-api-gateway_1
3c099a572673        mendersoftware/deviceauth:2.0.0            "/usr/bin/deviceauth…"   8 weeks ago         Up 3 days             8080/tcp                 menderproduction_mender-device-auth_1
b948e8bc2cdc        mendersoftware/mender-conductor:1.3.0      "/srv/start_conducto…"   8 weeks ago         Up 3 days             8080/tcp, 8090/tcp       menderproduction_mender-conductor_1
39ddaa080578        openresty/openresty:1.13.6.2-0-alpine      "/usr/local/openrest…"   8 weeks ago         Up 3 days             0.0.0.0:9000->9000/tcp   menderproduction_storage-proxy_1
31cafee8c1c6        mendersoftware/inventory:1.6.0             "/usr/bin/inventory …"   8 weeks ago         Up 3 days             8080/tcp                 menderproduction_mender-inventory_1
fd81613468ef        mendersoftware/deployments:1.7.0           "/entrypoint.sh --co…"   8 weeks ago         Up 3 days             8080/tcp                 menderproduction_mender-deployments_1
8fa46e396ed9        mendersoftware/useradm:1.7.0               "/usr/bin/useradm --…"   8 weeks ago         Up 3 days             8080/tcp                 menderproduction_mender-useradm_1
2de77f968113        mongo:3.4                                  "docker-entrypoint.s…"   8 weeks ago         Up 3 days             27017/tcp                menderproduction_mender-mongo_1
b761f62ae5ee        mendersoftware/gui:2.0.0                   "/entrypoint.sh"         8 weeks ago         Up 3 days             80/tcp                   menderproduction_mender-gui_1
88f2b818fb8e        redis:5-alpine3.8                          "/redis/entrypoint.sh"   8 weeks ago         Up 3 days             6379/tcp                 menderproduction_mender-redis_1
f32b818e4c52        elasticsearch:5-alpine                     "/docker-entrypoint.…"   8 weeks ago         Up 3 days             9200/tcp, 9300/tcp       menderproduction_mender-elasticsearch_1
ecededc4eb40        minio/minio:RELEASE.2018-09-25T21-34-43Z   "/usr/bin/docker-ent…"   8 weeks ago         Up 3 days (healthy)   9000/tcp                 menderproduction_minio_1

I see. Which browser are you using?

Bang, I think we’re close to the truth)

I was using Chrome: Version 71.0.3578.98 (Official Build) (64-bit)

Then I tried Firefox V60.0 (64-bit) and it worked!

1 Like

I see. Hmm. And distro and architecture?

I’m on Linux Mint 18.3 x64

Would you mind trying Chrome v73, or higher?

Updated Chrome to the latest stable (Version 75.0.3770.142 (Official Build) (64-bit)), the issue is still present.

Same logs from mender-deployments:

time="2019-07-17T13:21:33Z" level=info msg="200 1621μs GET /api/management/v1/deployments/artifacts HTTP/1.0 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36" file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=60 request_id=700eb9d0-c028-4be5-89b9-78647596b302 user_id=5ec43064-1fe1-49bd-92b2-c3a7ee220460
time="2019-07-17T13:21:45Z" level=error msg="reading artifact error: readHeaderV3: handleHeaderReads: readHeader: readNext: Failed to copy from tarReader to the writer: unexpected EOF: Cannot parse artifact file" file=images.go func="controller.(*SoftwareImagesController).NewImage" line=239 request_id=b8d54e68-c382-4f58-834b-9d53df2f61cf user_id=5ec43064-1fe1-49bd-92b2-c3a7ee220460
time="2019-07-17T13:21:45Z" level=error msg="reading artifact error: readHeaderV3: handleHeaderReads: readHeader: readNext: Failed to copy from tarReader to the writer: unexpected EOF" file=view.go func="view.(*RESTView).RenderError" line=51 request_id=b8d54e68-c382-4f58-834b-9d53df2f61cf user_id=5ec43064-1fe1-49bd-92b2-c3a7ee220460

One more thing which may potentially be affecting this:

I’m using self-signed certificates for the webserver. Thus Chrome throws these errors in his logs:

ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -202

But these errors appear every time I open Mender gui in the browser, not only during upload process.

@mzedel, I think this one might be for you

Well that is an interesting situation. Locally I was able to reproduce it but only if I throttled the connection speed using the chrome devtools and only in chrome. Doing the same in Firefox seems to work just fine.
Another interesting aspect is that on my machine the reading artifact error appears right at the beginning of the upload and independent of the throttling speed (anywhere from 1Mbit/s to 40Mbit/s).

I’ll have to see what happens in the deployments service at that point, but it definitely is a curious problem!

According to the tracker, fix to this will be released with V2.0.2.
Until then, the workarounds are:

  • use Firefox
  • use mender-cli

to upload Artifacts to the server

2 Likes