gofabric8> Unable to unzip /Users/apple/.fabric8/bin/oc.zip zip: not a valid zip

拈花ヽ惹草 提交于 2019-12-11 02:44:46

问题


I'm trying to set up environment for microservices. I'm using fabric8 to do that.

I'm using mvn fabric8:cluster-start -Dfabric8.cluster.kind=openshift command. while executing i'm getting following error...

  [INFO] gofabric8> Downloading https://github.com/openshift/origin/releases/download/v1.3.1/openshift-origin-client-tools-v1.3.1-dad658de7465ba8a234a4fb40b5b446a45a4cee1-mac.zip...
    [INFO] gofabric8> **Unable to unzip /Users/apple/.fabric8/bin/oc.zip zip: not a valid zip fileUnable to download client zip: not a valid zip file**
    [INFO] gofabric8> using the executable /Users/apple/.fabric8/bin/minishift
    [INFO] gofabric8> running: /Users/apple/.fabric8/bin/minishift start --vm-driver=xhyve --memory=4096 --cpus=1
    [INFO] gofabric8> Starting local OpenShift cluster...
    [INFO] gofabric8> Downloading ISO
    [INFO] gofabric8> 
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 18:50 min
    [INFO] Finished at: 2016-11-14T16:05:32+05:30
    [INFO] Final Memory: 21M/224M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal io.fabric8:fabric8-maven-plugin:3.1.49:cluster-start (default-cli) on project demo: Failed to execute gofabric8 start --batch --minishift --console. java.io.IOException: Failed to execute process stdin for gofabric8 start --batch --minishift --console: java.util.UnknownFormatConversionException: Conversion = ''' -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.fabric8:fabric8-maven-plugin:3.1.49:cluster-start (default-cli) on project demo: Failed to execute gofabric8 start --batch --minishift --console. java.io.IOException: Failed to execute process stdin for gofabric8 start --batch --minishift --console: java.util.UnknownFormatConversionException: Conversion = '''
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)

Any Idea?


回答1:


I had the similar problem today when I attempted to follow the fabric8 get started instructions here: https://fabric8.io/guide/getStarted/gofabric8.html. I used: gofabric8 start --minishift and received this error:

DSKTP-000003:~ usr$ gofabric8 start --minishift fabric8 recommends OSX users use the xhyve driver xhyve driver already installed Downloading https://github.com/jimmidyson/minishift/releases/download/v1.0.0-beta.1/minishift-darwin-amd64... Downloaded /Users/brent.fisher/.fabric8/bin/minishift kubectl is already available on your PATH Downloading https://github.com/openshift/origin/releases/download/v1.3.1/openshift-origin-client-tools-v1.3.1-dad658de7465ba8a234a4fb40b5b446a45a4cee1-mac.zip... Unable to unzip /Users/brent.fisher/.fabric8/bin/oc.zip zip: not a valid zip fileUnable to download client zip: not a valid zip file using the executable /Users/brent.fisher/.fabric8/bin/minishift Unable to get status fork/exec /Users/brent.fisher/.fabric8/bin/minishift: exec format errorDSKTP-000003:~ usr$

I am using gofabric8 version 0.4.112:

gofabric8 version gofabric8, version 0.4.112 (branch: 'master', revision: '50d5d75') build date: '20161129-10:39:49' go version: '1.7.1' It seems that the minishift option tries to download a version of openshift client (oc) that no longer exists [1.3.1] at that url. I was able to get around the error by manually downloading open shift from here: https://github.com/openshift/origin/releases/tag/v1.3.2 and extracting it and renaming the extracted executable to oc.




回答2:


I wonder what the output of this command is:

gofabric8 version

The binary is in ~/.fabric8/bin if its not on your $PATH.

I wonder if its just that your gofabric8 binary is old. e.g. we have a 0.4.105 version now.

If your gofabric8 binary is old; its sounding like the auto upgrading isn't working correctly; so try deleting ~/.fabric8/bin/gofabric8 and re-running your mvn command




回答3:


Check https://github.com/openshift/origin/releases for the list of currently avalable releases.

Your maven build is looking for an older release: https://github.com/openshift/origin/releases/download/v1.3.1/openshift-origin-client-tools-v1.3.1-dad658de7465ba8a234a4fb40b5b446a45a4cee1-mac.zip

You can try to override the dependency in your builds pom and use the currently available version: openshift-origin-client-tools-v1.3.2-ac1d579-mac.zip




回答4:


I just ran into the same thing and Brent's answer above worked for me. Oc is up to 1.3.3 now and minishift is up to Beta2.

To answer James' question, here's my fabric8 version:

gofabric8, version 0.4.113 (branch: 'master', revision: '0610f51') build date: '20170110-20:02:39' go version: '1.7.1'



来源:https://stackoverflow.com/questions/40586946/gofabric8-unable-to-unzip-users-apple-fabric8-bin-oc-zip-zip-not-a-valid-zip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!