Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

tcp protocol is not supported #116

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

tcp protocol is not supported #116

yangtao309 opened this issue Aug 1, 2015 · 5 comments
Labels

Comments

@yangtao309
Copy link

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Contributor

davidxia commented Aug 3, 2015

@yangtao309 ^

@yangtao309
Copy link
Author

@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
Copy link
Contributor

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants