上传war包制作镜像错误 #42
Unanswered
xiongyunhua-star
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Kubernetes 版本 v1.19.10-r1.0.0-source-119-g112eab5b37dfc3
KubeSphere 版本 v3.2.0
一共有两错误
pod log:
1.
I0215 07:42:15.431749 1 docker.go:506] Using locally available image "pekimg-m0.test.xyh.com/kubesphere/tomcat85-java11-centos7:v3.2.0"
I0215 07:42:15.667846 1 docker.go:506] Using locally available image "pekimg-m0.test.xyh.com/kubesphere/tomcat85-java11-centos7:v3.2.0"
I0215 07:42:15.814856 1 docker.go:506] Using locally available image "pekimg-m0.test.xyh.com/kubesphere/tomcat85-java11-centos7:v3.2.0"
I0215 07:42:15.814874 1 docker.go:800] Image sha256:2ac090c9bafb32f35772d338c4fe6e5f820e9e2e012d4532d53b5eb8474d7ee4 contains scripts-url set to "image:///usr/local/s2i"
I0215 07:42:15.879145 1 docker.go:506] Using locally available image "pekimg-m0.test.xyh.com/kubesphere/tomcat85-java11-runtime:v3.2.0"
I0215 07:42:15.879164 1 docker.go:800] Image sha256:1fad36de6a9d481f49cffa76490d9c33fcd77377c22e8e4d9b24a0c85001af00 contains scripts-url set to "image:///usr/local/s2i"
I0215 07:42:15.879195 1 sti.go:205] Preparing to build xianimg-dfx.test.xyh.com/zhangwen/war:zw09ezoqbv
I0215 07:42:15.944113 1 docker.go:506] Using locally available image "pekimg-m0.test.xyh.com/kubesphere/tomcat85-java11-runtime:v3.2.0"
I0215 07:42:15.997169 1 download.go:31] Start Download Binary tomcat.war
oad.go:75]
Downloading... 52B/52B 1 download.go:80]
I0215 07:42:16.022710 1 download.go:49] Finish Download Binary tomcat.war
I0215 07:42:16.022715 1 download.go:50] Binary size 52B
I0215 07:42:16.023601 1 install.go:261] Using "assemble" installed from "image:///usr/local/s2i/assemble"
I0215 07:42:16.023659 1 install.go:261] Using "run" installed from "image:///usr/local/s2i/run"
I0215 07:42:16.023673 1 install.go:261] Using "save-artifacts" installed from "image:///usr/local/s2i/save-artifacts"
I0215 07:42:16.023697 1 install.go:261] Using "assemble-runtime" installed from "image:///usr/local/s2i/assemble-runtime"
I0215 07:42:16.023717 1 ignore.go:64] .s2iignore file does not exist
I0215 07:42:16.023728 1 sti.go:214] Clean build will be performed
I0215 07:42:16.023736 1 sti.go:228] Running "assemble" in "xianimg-dfx.test.xyh.com/zhangwen/war:zw09ezoqbv"
I0215 07:42:16.023746 1 sti.go:592] Using image name pekimg-m0.test.xyh.com/kubesphere/tomcat85-java11-centos7:v3.2.0
I0215 07:42:16.060080 1 docker.go:506] Using locally available image "pekimg-m0.test.xyh.com/kubesphere/tomcat85-java11-centos7:v3.2.0"
I0215 07:42:16.060109 1 sti.go:477] No user environment provided (no environment file found in application sources)
I0215 07:42:16.060218 1 sti.go:710] starting the source uploading ...
I0215 07:42:16.087391 1 docker.go:800] Image sha256:2ac090c9bafb32f35772d338c4fe6e5f820e9e2e012d4532d53b5eb8474d7ee4 contains scripts-url set to "image:///usr/local/s2i"
I0215 07:42:16.087405 1 docker.go:872] Base directory for S2I scripts is '/usr/local/s2i'. Untarring destination is '/tmp'.
I0215 07:42:16.087517 1 docker.go:1038] Creating container with options {Name:"s2i_pekimg_m0_test_xyh_com_kubesphere_tomcat85_java11_centos7_v3_2_0_f64bbfe0" Config:{Hostname: Domainname: User: AttachStdin:false AttachStdout:true AttachStderr:false ExposedPorts:map[] Tty:false OpenStdin:true StdinOnce:true Env:[] Cmd:[/bin/sh -c tar -C /tmp -xf - && /usr/local/s2i/assemble] Healthcheck: ArgsEscaped:false Image:pekimg-m0.test.xyh.com/kubesphere/tomcat85-java11-centos7:v3.2.0 Volumes:map[] WorkingDir: Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout: Shell:[]} HostConfig:&{Binds:[s2i_java_cache:/tmp/artifacts] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode: PortBindings:map[] RestartPolicy:{Name: MaximumRetryCount:0} AutoRemove:false VolumeDriver: VolumesFrom:[] CapAdd:[] CapDrop:[] DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] GroupAdd:[] IpcMode: Cgroup: Links:[] OomScoreAdj:0 PidMode: Privileged:false PublishAllPorts:false ReadonlyRootfs:false SecurityOpt:[] StorageOpt:map[] Tmpfs:map[] UTSMode: UsernsMode: ShmSize:67108864 Sysctls:map[] Runtime: ConsoleSize:[0 0] Isolation: Resources:{CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DeviceCgroupRules:[] DiskQuota:0 KernelMemory:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness: OomKillDisable: PidsLimit:0 Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[] Init:}} ...
I0215 07:42:44.464599 1 docker.go:1070] Attaching to container "c4284a6cba57d6e7afd2db5895521b9273c104959aa25443f43b2e88c9eea29e" ...
I0215 07:42:44.575753 1 docker.go:1081] Starting container "c4284a6cba57d6e7afd2db5895521b9273c104959aa25443f43b2e88c9eea29e" ...
I0215 07:42:45.221994 1 sti.go:718] ==================================================================
I0215 07:42:45.222013 1 sti.go:718] Starting S2I Java Build .....
I0215 07:42:45.223646 1 sti.go:718] S2I source build with plain binaries detected
I0215 07:42:45.223660 1 sti.go:718] Copying binaries from /tmp/src to /deployments ...
I0215 07:42:45.227509 1 sti.go:718] Checking for fat jar archive...
I0215 07:42:45.239286 1 sti.go:718] ... done
I0215 07:42:45.447695 1 docker.go:1112] Waiting for container "c4284a6cba57d6e7afd2db5895521b9273c104959aa25443f43b2e88c9eea29e" to stop ...
I0215 07:42:45.755158 1 docker.go:1137] Invoking PostExecute function
I0215 07:42:45.755186 1 postexecutorstep.go:178] Executing step: download files from the builder image
I0215 07:42:46.227117 1 tar.go:367] Creating directory /tmp/s2i459549743/upload/runtimeArtifacts/deployments
I0215 07:42:46.227192 1 tar.go:367] Creating directory /tmp/s2i459549743/upload/runtimeArtifacts/deployments/data
I0215 07:42:46.227229 1 tar.go:376] Creating directory /tmp/s2i459549743/upload/runtimeArtifacts/deployments
I0215 07:42:46.227244 1 tar.go:444] Creating /tmp/s2i459549743/upload/runtimeArtifacts/deployments/tomcat.war
I0215 07:42:46.227264 1 tar.go:454] Extracting/writing /tmp/s2i459549743/upload/runtimeArtifacts/deployments/tomcat.war
I0215 07:42:46.227315 1 tar.go:400] Done extracting tar stream
I0215 07:42:46.227349 1 postexecutorstep.go:243] Executing step: start runtime image and upload files
I0215 07:42:46.304898 1 docker.go:506] Using locally available image "pekimg-m0.test.xyh.com/kubesphere/tomcat85-java11-runtime:v3.2.0"
I0215 07:42:46.304916 1 docker.go:800] Image sha256:1fad36de6a9d481f49cffa76490d9c33fcd77377c22e8e4d9b24a0c85001af00 contains scripts-url set to "image:///usr/local/s2i"
I0215 07:42:46.426541 1 docker.go:1038] Creating container with options {Name:"s2i_pekimg_m0_test_xyh_com_kubesphere_tomcat85_java11_runtime_v3_2_0_0286c390" Config:{Hostname: Domainname: User: AttachStdin:false AttachStdout:true AttachStderr:false ExposedPorts:map[] Tty:false OpenStdin:false StdinOnce:false Env:[] Cmd:[/bin/sh -c while [ ! -f "/tmp/s2i-upload-done067071545" ]; do sleep 0.5; done; /usr/local/s2i/assemble-runtime; exit $?] Healthcheck: ArgsEscaped:false Image:pekimg-m0.test.xyh.com/kubesphere/tomcat85-java11-runtime:v3.2.0 Volumes:map[] WorkingDir: Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout: Shell:[]} HostConfig:&{Binds:[] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode: PortBindings:map[] RestartPolicy:{Name: MaximumRetryCount:0} AutoRemove:false VolumeDriver: VolumesFrom:[] CapAdd:[] CapDrop:[] DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] GroupAdd:[] IpcMode: Cgroup: Links:[] OomScoreAdj:0 PidMode: Privileged:false PublishAllPorts:false ReadonlyRootfs:false SecurityOpt:[] StorageOpt:map[] Tmpfs:map[] UTSMode: UsernsMode: ShmSize:67108864 Sysctls:map[] Runtime: ConsoleSize:[0 0] Isolation: Resources:{CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DeviceCgroupRules:[] DiskQuota:0 KernelMemory:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness: OomKillDisable: PidsLimit:0 Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[] Init:}} ...
I0215 07:43:05.095074 1 docker.go:1070] Attaching to container "1206b70a1c904d19903708a3d2402a3a4f648f886936208393750e904d366f12" ...
I0215 07:43:05.199358 1 docker.go:1081] Starting container "1206b70a1c904d19903708a3d2402a3a4f648f886936208393750e904d366f12" ...
I0215 07:43:05.884608 1 docker.go:404] Uploading "/tmp/s2i459549743/upload/runtimeArtifacts" to "/" ...
I0215 07:43:06.095010 1 docker.go:404] Uploading "/tmp/s2i-upload-done067071545" to "/tmp" ...
I0215 07:43:06.405389 1 postexecutorstep.go:353] start script assemble-runtime ....
I0215 07:43:06.501547 1 docker.go:1112] Waiting for container "1206b70a1c904d19903708a3d2402a3a4f648f886936208393750e904d366f12" to stop ...
I0215 07:43:06.865379 1 docker.go:1137] Invoking PostExecute function
I0215 07:43:06.865398 1 postexecutorstep.go:117] Executing step: commit image
I0215 07:43:07.025325 1 postexecutorstep.go:521] Checking for new Labels to apply...
I0215 07:43:07.025352 1 postexecutorstep.go:529] Creating the download path '/tmp/s2i459549743/metadata'
I0215 07:43:07.911239 1 postexecutorstep.go:537] unable to download and extract 'image_metadata.json' ... continuing
I0215 07:43:14.753685 1 postexecutorstep.go:392] Executing step: report success
I0215 07:43:14.753699 1 postexecutorstep.go:396] Successfully built xianimg-dfx.test.xyh.com/zhangwen/war:zw09ezoqbv
I0215 07:43:14.753725 1 docker.go:1048] Removing container "1206b70a1c904d19903708a3d2402a3a4f648f886936208393750e904d366f12" ...
I0215 07:43:14.778493 1 docker.go:1058] Removed container "1206b70a1c904d19903708a3d2402a3a4f648f886936208393750e904d366f12"
I0215 07:43:14.778576 1 docker.go:1048] Removing container "c4284a6cba57d6e7afd2db5895521b9273c104959aa25443f43b2e88c9eea29e" ...
I0215 07:43:14.811112 1 docker.go:1058] Removed container "c4284a6cba57d6e7afd2db5895521b9273c104959aa25443f43b2e88c9eea29e"
I0215 07:43:14.811294 1 docker.go:635] Begin to push image <xianimg-dfx.test.xyh.com/zhangwen/war:zw09ezoqbv>
I0215 07:50:59.832135 1 docker.go:674] pushing image error : pushing image "xianimg-dfx.test.xyh.com/zhangwen/war:zw09ezoqbv" timed out after 4m0s
I0215 07:50:59.832165 1 cleanup.go:33] Removing temporary directory /tmp/s2i459549743
I0215 07:50:59.832175 1 fs.go:302] Removing directory '/tmp/s2i459549743'
I0215 07:50:59.832628 1 s2i.go:75] Build failed
E0215 07:50:59.832640 1 errors.go:297] An error occurred: unable to push xianimg-dfx.test.xyh.com/zhangwen/war:zw09ezoqbv
E0215 07:50:59.832644 1 errors.go:298] Suggested solution: check image name, or check if username and password provided are corrected
I0215 07:50:59.832649 1 errors.go:300] Details: pushing image "xianimg-dfx.test.xyh.com/zhangwen/war:zw09ezoqbv" timed out after 4m0s
E0215 07:50:59.832657 1 errors.go:302] If the problem persists consult the docs at https://kubesphere.io/docs/v2.1/zh-CN/quick-start/source-to-image/ Open an issue at https://github.com/kubesphere/s2irun/issues providing us with a log from your build using log output level 3.
[root@pekekshccp-rxxgk pods]# kubectl logs -f zhangwen-war-zwzhfuhfnq-lw6q-8lc-ec0df6ade041-job-q7nh2 -n zw-image
failed to try resolving symlinks in path "/var/log/pods/zw-image_zhangwen-war-zwzhfuhfnq-lw6q-8lc-ec0df6ade041-job-q7nh2_5ef10c0c-5aaf-445d-ad30-cfb2cac4e5df/s2irun/0.log": lstat /var/log/pods/zw-image_zhangwen-war-zwzhfuhfnq-lw6q-8lc-ec0df6ade041-job-q7nh2_5ef10c0c-5aaf-445d-ad30-cfb2cac4e5df/s2irun/0.log: no such file or directory
[root@pekekshccp-rxxgk pods]#
Beta Was this translation helpful? Give feedback.
All reactions