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

Socket Exception when building #419

Closed
cescoffier opened this issue Mar 25, 2016 · 14 comments
Closed

Socket Exception when building #419

cescoffier opened this issue Mar 25, 2016 · 14 comments
Milestone

Comments

@cescoffier
Copy link

Hi,

I cannot build an image. I get:

[INFO] Building tar: /Users/clement/Projects/vert.x/vertx-microservices-examples/aggregation-http/A/target/docker/vertx-microservices-example/aggregation-http-A/1.0-SNAPSHOT/tmp/docker-build.tar
[INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://192.168.99.100:2376: Broken pipe
[INFO] Retrying request to {s}->https://192.168.99.100:2376
[INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://192.168.99.100:2376: Broken pipe
[INFO] Retrying request to {s}->https://192.168.99.100:2376
[INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://192.168.99.100:2376: Broken pipe
[INFO] Retrying request to {s}->https://192.168.99.100:2376
[ERROR] DOCKER> Broken pipe

Docker is running fine (I'm using a docker-machine).

I'm using a docker machine, my env is:

set -gx DOCKER_TLS_VERIFY "1";
set -gx DOCKER_HOST "tcp://192.168.99.100:2376";
set -gx DOCKER_CERT_PATH "/Users/clement/.docker/machine/machines/dev";
set -gx DOCKER_MACHINE_NAME "dev";

The debug mode does not give much details:

[DEBUG] http-outgoing-6 >> "[write] I/O error: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Broken pipe"
[DEBUG] http-outgoing-6: Shutdown connection
[DEBUG] Connection discarded
[DEBUG] http-outgoing-6: Close connection
[DEBUG] Connection released: [id: 6][route: {s}->https://192.168.99.100:2376][total kept alive: 3; route allocated: 3 of 100; total allocated: 3 of 20]
[ERROR] DOCKER> Broken pipe

Any idea ?

@cescoffier
Copy link
Author

Seems to be related with file size. Is there a limit ?

@rhuss
Copy link
Collaborator

rhuss commented Mar 25, 2016

Good question. How large is your /Users/clement/Projects/vert.x/vertx-microservices-examples/aggregation-http/A/target/docker/vertx-microservices-example/aggregation-http-A/1.0-SNAPSHOT/tmp/docker-build.tar ?

Do you have the project somewhere online so that I can try to reproduce it here (somtimes later this weekend, its family time for now :) ?

@cescoffier
Copy link
Author

It;s not that large, something around 30 Mb.

I'm going to provide a git repo where you can reproduce it.

Enjoy your long weekend !

@rhuss
Copy link
Collaborator

rhuss commented Mar 25, 2016

Thx :) BTW, I've already built swarm apps with the plugin and docker machine which were larger than 90 MBs ....

@cescoffier
Copy link
Author

Here is a reproducer: https://github.com/cescoffier/docker-maven-issue-broken-pipe

It's not a size issue.

@rhuss
Copy link
Collaborator

rhuss commented Mar 30, 2016

The issue was that one tag contains a - (i.e. 1.0-SNAPSHOT) which is not an allowed value by Docker.

I opened #423 for this.

Thanks for reporting ;)

@rhuss rhuss closed this as completed Mar 30, 2016
@rhuss rhuss reopened this Mar 30, 2016
@rhuss
Copy link
Collaborator

rhuss commented Mar 30, 2016

No, its not the hypen, but sth different with the name. When I set the name explicitely, it works. Strange ...

@rhuss
Copy link
Collaborator

rhuss commented Mar 30, 2016

Got it: No capital letters are allowed. Did you know this ?

@rhuss
Copy link
Collaborator

rhuss commented Mar 30, 2016

So simply change your project from 'A' to 'a'. That's it :)

@rhuss rhuss closed this as completed Mar 30, 2016
@cescoffier
Copy link
Author

Wow.... So many convention. What about a better error message or "name" transformer ?

@rhuss
Copy link
Collaborator

rhuss commented Mar 31, 2016

We decided to introduce an error in that case (see #423). Clean, simple and no magic. Fix for the use is easy anyway.

BTW, you can use - in version numbers, that was my fault. Only uppercase letters do harm (and of course probably other chars as well unfortunately I couldn't found an exact specification how a name could look like)

@rhuss
Copy link
Collaborator

rhuss commented Mar 31, 2016

Ok fixed it. Now the error message looks like

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.489 s
[INFO] Finished at: 2016-03-31T22:44:19+02:00
[INFO] Final Memory: 32M/329M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.14.3-SNAPSHOT:build (default-cli) on project A: Execution default-cli of goal io.fabric8:docker-maven-plugin:0.14.3-SNAPSHOT:build failed: Given repository name 'vertx_acme_example/A:1.0-SNAPSHOT' is invalid:
[ERROR] * image part 'A' doesn't match allowed pattern '[a-z0-9]+(?:(?:[._]|__|[-]*)[a-z0-9]+)*'
[ERROR] See http://bit.ly/docker_image_format for more details
[ERROR] -> [Help 1]

Hope that its a bit clearer now ;-)

@Gengar003
Copy link

Better error message than the docker client! 👍

@cescoffier
Copy link
Author

Great thanks @rhuss !

Much better than the original broken pipe.

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