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

tcp protocol is not supported #116

Closed
yangtao309 opened this Issue Aug 1, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@yangtao309

yangtao309 commented Aug 1, 2015

in my mac os. run the mvn clean install
what's happend

[INFO] Building image example
八月 01, 2015 4:33:20 下午 org.apache.http.impl.execchain.RetryExec execute
信息: I/O exception (org.apache.http.conn.UnsupportedSchemeException) caught when processing request to {}->tcp://192.168.99.100:2376: tcp protocol is not supported
八月 01, 2015 4:33:20 下午 org.apache.http.impl.execchain.RetryExec execute
信息: Retrying request to {}->tcp://192.168.99.100:2376
八月 01, 2015 4:33:20 下午 org.apache.http.impl.execchain.RetryExec execute
信息: I/O exception (org.apache.http.conn.UnsupportedSchemeException) caught when processing request to {}->tcp://192.168.99.100:2376: tcp protocol is not supported
八月 01, 2015 4:33:20 下午 org.apache.http.impl.execchain.RetryExec execute
信息: Retrying request to {}->tcp://192.168.99.100:2376
八月 01, 2015 4:33:20 下午 org.apache.http.impl.execchain.RetryExec execute
信息: I/O exception (org.apache.http.conn.UnsupportedSchemeException) caught when processing request to {}->tcp://192.168.99.100:2376: tcp protocol is not supported
八月 01, 2015 4:33:20 下午 org.apache.http.impl.execchain.RetryExec execute
信息: Retrying request to {}->tcp://192.168.99.100:2376
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.482s
[INFO] Finished at: Sat Aug 01 16:33:20 CST 2015
[INFO] Final Memory: 44M/698M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.12:build (default) on project micro-service-campaign: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.UnsupportedSchemeException: tcp protocol is not supported -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
@yangtao309

This comment has been minimized.

Show comment
Hide comment
@yangtao309

yangtao309 Aug 1, 2015

in my pom.xml configuration

<plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.2.12</version>
                <configuration>
                    <imageName>example</imageName>
                    <dockerDirectory>.</dockerDirectory>
                    <dockerHost>tcp://192.168.99.100:2376</dockerHost>
                    <resources>
                        <resource>
                            <targetPath>/</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.jar</include>
                        </resource>
                    </resources>
                    <serverId>docker-hub</serverId>
                    <registryUrl>https://docker.fenxibao.com/v1/</registryUrl>
                </configuration>

                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

yangtao309 commented Aug 1, 2015

in my pom.xml configuration

<plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.2.12</version>
                <configuration>
                    <imageName>example</imageName>
                    <dockerDirectory>.</dockerDirectory>
                    <dockerHost>tcp://192.168.99.100:2376</dockerHost>
                    <resources>
                        <resource>
                            <targetPath>/</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.jar</include>
                        </resource>
                    </resources>
                    <serverId>docker-hub</serverId>
                    <registryUrl>https://docker.fenxibao.com/v1/</registryUrl>
                </configuration>

                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
@davidxia

This comment has been minimized.

Show comment
Hide comment
@davidxia

davidxia Aug 3, 2015

Member

That's strange. I got this error when I run mvn clean package docker:build:

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.12:build (default) on project helioscanary: Exception caught: https URI must be provided to use certificates -> [Help 1]

I think your issue can be solved by changing tcp to https in <dockerHost>https://192.168.99.100:2376</dockerHost>. You could also remove that line and set an the environment variable DOCKER_HOST=tcp://<host>:2375.

Let me know if this works. If so, you can close the issue.

Member

davidxia commented Aug 3, 2015

That's strange. I got this error when I run mvn clean package docker:build:

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.12:build (default) on project helioscanary: Exception caught: https URI must be provided to use certificates -> [Help 1]

I think your issue can be solved by changing tcp to https in <dockerHost>https://192.168.99.100:2376</dockerHost>. You could also remove that line and set an the environment variable DOCKER_HOST=tcp://<host>:2375.

Let me know if this works. If so, you can close the issue.

@davidxia

This comment has been minimized.

Show comment
Hide comment
@davidxia
Member

davidxia commented Aug 3, 2015

@davidxia davidxia added the question label Aug 3, 2015

@yangtao309

This comment has been minimized.

Show comment
Hide comment
@yangtao309

yangtao309 Aug 3, 2015

@davidxia

That's strange. I got this error when I run mvn clean package docker:build:

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.12:build (default) on project helioscanary: Exception caught: https URI must be provided to use certificates -> [Help 1]

need to set; env variable

yangtaodeMacBook-Pro:micro-service-campaign yangtao$ docker-machine env dev
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/Users/yangtao/.docker/machine/machines/dev"
export DOCKER_MACHINE_NAME="dev"
# Run this command to configure your shell: 
# eval "$(docker-machine env dev)"

now i will change the "tcp://192.168.99.100:2376" to "https://192.168.99.100:2376" , will happend new error

[INFO] Building image example
Step 0 : FROM docker.fenxibao.com/shuyun/oracle-java8:latest
Pulling repository docker.fenxibao.com/shuyun/oracle-java8
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.931 s
[INFO] Finished at: 2015-08-03T13:39:54+08:00
[INFO] Final Memory: 51M/563M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.12:build (default) on project micro-service-campaign: Exception caught: Authentication is required. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

yangtao309 commented Aug 3, 2015

@davidxia

That's strange. I got this error when I run mvn clean package docker:build:

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.12:build (default) on project helioscanary: Exception caught: https URI must be provided to use certificates -> [Help 1]

need to set; env variable

yangtaodeMacBook-Pro:micro-service-campaign yangtao$ docker-machine env dev
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/Users/yangtao/.docker/machine/machines/dev"
export DOCKER_MACHINE_NAME="dev"
# Run this command to configure your shell: 
# eval "$(docker-machine env dev)"

now i will change the "tcp://192.168.99.100:2376" to "https://192.168.99.100:2376" , will happend new error

[INFO] Building image example
Step 0 : FROM docker.fenxibao.com/shuyun/oracle-java8:latest
Pulling repository docker.fenxibao.com/shuyun/oracle-java8
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.931 s
[INFO] Finished at: 2015-08-03T13:39:54+08:00
[INFO] Final Memory: 51M/563M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.12:build (default) on project micro-service-campaign: Exception caught: Authentication is required. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
@davidxia

This comment has been minimized.

Show comment
Hide comment
@davidxia

davidxia Aug 10, 2015

Member

@yangtao309 This means you are trying to pull something from a docker registry that requires authentication. See https://github.com/spotify/docker-maven-plugin#authenticating-with-private-registries. Closing for now as it seems these errors are caused by misconfiguration.

Member

davidxia commented Aug 10, 2015

@yangtao309 This means you are trying to pull something from a docker registry that requires authentication. See https://github.com/spotify/docker-maven-plugin#authenticating-with-private-registries. Closing for now as it seems these errors are caused by misconfiguration.

@davidxia davidxia closed this Aug 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment