SerializationError while using s3 plugin

Hello :slightly_smiling_face:

I get the following error while going through the upload step of my drone pipeline:

|1|time=“2019-03-26T16:17:11Z” level=info msg=“Attempting to upload” bucket=osm2n4jrouting endpoint=“http://snipped/minio” region=us-east-1|
| — | — |
|2|time=“2019-03-26T16:17:11Z” level=info msg=“Uploading file” bucket=osm2n4jrouting content-type=application/octet-stream name=bin/osm2n4jrouting target=/bin/osm2n4jrouting|
|3|time=“2019-03-26T16:17:11Z” level=error msg=“Could not upload file” bucket=osm2n4jrouting error=“SerializationError: failed to decode S3 XML error response\n\tstatus code: 413, request id: , host id: \ncaused by: expected element type <Error> but have <html>” name=bin/osm2n4jrouting target=/bin/osm2n4jrouting|
|4|time=“2019-03-26T16:17:11Z” level=fatal msg=“SerializationError: failed to decode S3 XML error response\n\tstatus code: 413, request id: , host id: \ncaused by: expected element type <Error> but have <html>”|

I have a minio container running on the same host as the nginx and drone container.
If I navigate to /minio, I get access to the service and I can create buckets, etc.

While browsing I found a similar problem with http2, thus I added the proxy_http_version 1.1, but it didn’t help.

  location /minio {
    proxy_http_version 1.1;
    proxy_pass http://minio:9000;
  }

Every step of the pipeline runs without a problem except for this one.

The step looks like this:

 - name: upload
   image: plugins/s3
    settings:
     access_key: snipped
     secret_key: snipped
     bucket: osm2n4jrouting
     source: bin/*
     target: /
     path_style: true
     endpoint: http://snipped/minio

the build step which runs before the upload step builds the binary like this:

- go build -o bin/osm2n4jrouting

Do you have any idea what I could be doing wrong?

Best regards,
Luke

It definitely sounds like some sort of networking error or routing problem. The error message says that it receives an <html> which likely means a webpage is being returned from your Minio API request.

expected element type <Error> but have <html>

That seems to be the key problem.

The only thing I could find on this is: https://github.com/minio/mc/issues/1160
I’ll try to find a solution :slight_smile:

Thanks for your answer!

I found a fix for this problem!

It’s in relation with the nginx container I’m running.

This documentation helped me: https://docs.minio.io/docs/setup-nginx-proxy-with-minio

The point “Proxy all requests” right below title number 3 :slight_smile:

great, glad to hear you found a fix. Thanks for sharing the link :slight_smile:

1 Like