You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/05/09 05:07:39 UTC
[GitHub] [skywalking] skundu1234 opened a new issue, #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
skundu1234 opened a new issue, #9012:
URL: https://github.com/apache/skywalking/issues/9012
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues.
### Apache SkyWalking Component
Java Agent (apache/skywalking-java)
### What happened
we observed issues with the applications using “openjdk:8-jdk-alpine” base-image in docker file. Its working fine with adoptopenjdk:11-jre-hotspot image .We observed this below error while using this image and most applications are using this image for our organisation so what could be the solution can you please check.
Please update if Apache skywalking works only those images mentioned in document.
https://skywalking.apache.org/docs/skywalking-java/v8.10.0/en/setup/service-agent/java-agent/plugin-test/
Below error coming.
ERROR 2022-04-29 10:23:28:033 main AgentClassLoader : ._apm-mongodb-2.x-plugin-8.10.0.jar jar file can't be resolved
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.jar.JarFile.(JarFile.java:166)
at java.util.jar.JarFile.(JarFile.java:130)
at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.doGetJars(AgentClassLoader.java:195)
at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.getAllJars(AgentClassLoader.java:177)
at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.findResources(AgentClassLoader.java:138)
at java.lang.ClassLoader.getResources(ClassLoader.java:1142)
at org.apache.skywalking.apm.agent.core.plugin.PluginResourcesResolver.getResources(PluginResourcesResolver.java:40)
at org.apache.skywalking.apm.agent.core.plugin.PluginBootstrap.loadPlugins(PluginBootstrap.java:45)
at org.apache.skywalking.apm.agent.SkyWalkingAgent.premain(SkyWalkingAgent.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
ERROR 2022-04-29 10:23:28:046 main AgentClassLoader : ._apm-elasticsearch-5.x-plugin-8.10.0.jar jar file can't be resolved
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.jar.JarFile.(JarFile.java:166)
at java.util.jar.JarFile.(JarFile.java:130)
at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.doGetJars(AgentClassLoader.java:195)
at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.getAllJars(AgentClassLoader.java:177)
at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.findResources(AgentClassLoader.java:138)
at java.lang.ClassLoader.getResources(ClassLoader.java:1142)
at org.apache.skywalking.apm.agent.core.plugin.PluginResourcesResolver.getResources(PluginResourcesResolver.java:40)
at org.apache.skywalking.apm.agent.core.plugin.PluginBootstrap.loadPlugins(PluginBootstrap.java:45)
at org.apache.skywalking.apm.agent.SkyWalkingAgent.premain(SkyWalkingAgent.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
INFO 2022-04-29 10:23:28:047 main AgentClassLoader : /releaseapp/skywalking-stage-java-agent-8.10.0/plugins/apm-jetty-server-9.x-plugin-8.10.0.jar loaded.
INFO 2022-04-29 10:23:28:048 main AgentClassLoader : /releaseapp/skywalking-stage-java-agent-8.10.0/plugins/apm-httpasyncclient-4.x-plugin-8.10.0.jar loaded.
ERROR 2022-04-29 10:23:28:049 main AgentClassLoader : ._apm-spring-concurrent-util-4.x-plugin-8.10.0.jar jar file can't be resolved
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.jar.JarFile.(JarFile.java:166)
at java.util.jar.JarFile.(JarFile.java:130)
### What you expected to happen
Application needs to start without calling with . _apm.*jar like ". _apm-elasticsearch-5.x-plugin-8.10.0.jar " .
As Apache sky walking should start with openjdk images.
### How to reproduce
We are facing same error for all docker applications "openjdk:8-jdk-alpine" using this image.
ERROR 2022-04-29 10:23:28:033 main AgentClassLoader : ._apm-mongodb-2.x-plugin-8.10.0.jar jar file can't be resolved
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.jar.JarFile.(JarFile.java:166)
at java.util.jar.JarFile.(JarFile.java:130)
at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.doGetJars(AgentClassLoader.java:195)
at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.getAllJars(AgentClassLoader.java:177)
at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.findResources(AgentClassLoader.java:138)
at java.lang.ClassLoader.getResources(ClassLoader.java:1142)
at org.apache.skywalking.apm.agent.core.plugin.PluginResourcesResolver.getResources(PluginResourcesResolver.java:40)
at org.apache.skywalking.apm.agent.core.plugin.PluginBootstrap.loadPlugins(PluginBootstrap.java:45)
at org.apache.skywalking.apm.agent.SkyWalkingAgent.premain(SkyWalkingAgent.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
ERROR 2022-04-29 10:23:28:046 main AgentClassLoader : ._apm-elasticsearch-5.x-plugin-8.10.0.jar jar file can't be resolved
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.jar.JarFile.(JarFile.java:166)
at java.util.jar.JarFile.(JarFile.java:130)
at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.doGetJars(AgentClassLoader.java:195)
at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.getAllJars(AgentClassLoader.java:177)
at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.findResources(AgentClassLoader.java:138)
at java.lang.ClassLoader.getResources(ClassLoader.java:1142)
at org.apache.skywalking.apm.agent.core.plugin.PluginResourcesResolver.getResources(PluginResourcesResolver.java:40)
at org.apache.skywalking.apm.agent.core.plugin.PluginBootstrap.loadPlugins(PluginBootstrap.java:45)
at org.apache.skywalking.apm.agent.SkyWalkingAgent.premain(SkyWalkingAgent.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
INFO 2022-04-29 10:23:28:047 main AgentClassLoader : /releaseapp/skywalking-stage-java-agent-8.10.0/plugins/apm-jetty-server-9.x-plugin-8.10.0.jar loaded.
INFO 2022-04-29 10:23:28:048 main AgentClassLoader : /releaseapp/skywalking-stage-java-agent-8.10.0/plugins/apm-httpasyncclient-4.x-plugin-8.10.0.jar loaded.
ERROR 2022-04-29 10:23:28:049 main AgentClassLoader : ._apm-spring-concurrent-util-4.x-plugin-8.10.0.jar jar file can't be resolved
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.jar.JarFile.(JarFile.java:166)
at java.util.jar.JarFile.(JarFile.java:130)
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] kezhenxu94 commented on issue #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #9012:
URL: https://github.com/apache/skywalking/issues/9012#issuecomment-1120673066
@skundu1234 which SkyWalking Java agent image are you using? We don't have such image named `openjdk:8-jdk-alpine` or `adoptopenjdk:11-jre-hotspot`, please provide reproducible steps or related details.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] kezhenxu94 commented on issue #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #9012:
URL: https://github.com/apache/skywalking/issues/9012#issuecomment-1120701129
This is duplicate of https://github.com/apache/skywalking/discussions/8975
> Docker file is fine but only base image is the problem and Skywalking agent does not work > with openjdk thats also official from Docker Hub.
> https://hub.docker.com/_/openjdk
> Is there anything that Skywalking agent only works only certain base images.
You have no idea whether base image is the only problem, for what it's worth here are my suggestions:
- Use our prebuilt Docker image instead of downloading on the fly, e.g.
```Dockerfile
COPY --from=apache/skywalking-java-agent:8.9.0-alpine /skywalking/agent /path/to/your/desired/agent/location
# ...
```
- `._` files are hidden so when you said `We did not see with ._apm-spring-concurrent-util-4.x-plugin-8.10.0.jar file anywhere in plugin,option plugins,activations.Not sure how _ underscore is coming.` make sure you use `ls -alh` to list all hidden files, also, these files are totally possible produced on your side please Google it first https://apple.stackexchange.com/questions/14980/why-are-dot-underscore-files-created-and-how-can-i-avoid-them
- `Agent is downloaded in entrypoint.sh`, I don't think this is a good idea because you'll need to download the agent every time you start the app, which is unnecessary and sometimes it's inconsistent from time to time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] skundu1234 commented on issue #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
Posted by GitBox <gi...@apache.org>.
skundu1234 commented on issue #9012:
URL: https://github.com/apache/skywalking/issues/9012#issuecomment-1130171719
@kezhenxu94 Can you please check and update on this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on issue #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9012:
URL: https://github.com/apache/skywalking/issues/9012#issuecomment-1120668557
@kezhenxu94 Could you run a single verification? Never heard of this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] kezhenxu94 commented on issue #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #9012:
URL: https://github.com/apache/skywalking/issues/9012#issuecomment-1131187585
@skundu1234 I have no idea simply from the logs you posted, please check yourself or provide necessary context and detail logs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] skundu1234 commented on issue #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
Posted by GitBox <gi...@apache.org>.
skundu1234 commented on issue #9012:
URL: https://github.com/apache/skywalking/issues/9012#issuecomment-1120982499
Thank you very much @kezhenxu94 for this details.We are not able to see this error now.We are getting GRPC collector fail and this collector backend service is able to connect with other application. Any thoughts about that.
Note: Kept enable_TLS: True and ca/ca.crt is present.
GRPC collector fail error log in skywalking-api.log:
ERROR 2022-05-09 11:20:28:125 SkywalkingAgent-12-GRPCChannelManager-0 GRPCChannelManager : Create channel to fail.
java.lang.NullPointerException
at org.apache.skywalking.apm.agent.core.remote.GRPCChannelManager.run(GRPCChannelManager.java:152)
at org.apache.skywalking.apm.util.RunnableWithExceptionProtection.run(RunnableWithExceptionProtection.java:33)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] skundu1234 commented on issue #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
Posted by GitBox <gi...@apache.org>.
skundu1234 commented on issue #9012:
URL: https://github.com/apache/skywalking/issues/9012#issuecomment-1120683379
We are using 8.9.0 Skywalking Java Agent.We are starting application along with sky-walking arguments in docker file.
Agent is downloaded in entrypoint.sh. Agent is downloaded from here: https://skywalking.apache.org/downloads/
Docker file details:
FROM openjdk:8-jdk-alpine
# copy extracted agent folder from the downloaded archive
EXPOSE 8080
ADD entrypoint.sh /app/entrypoint.sh
RUN chmod -R 777 /app/entrypoint.sh
# copy the jar file
COPY /target/spring-petclinic-2.4.5.jar /app/application.jar
WORKDIR /app
ENTRYPOINT ["entrypoint.sh", "application.jar" ]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] skundu1234 commented on issue #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
Posted by GitBox <gi...@apache.org>.
skundu1234 commented on issue #9012:
URL: https://github.com/apache/skywalking/issues/9012#issuecomment-1120696177
Docker file is fine but only base image is the problem and Skywalking agent does not work with openjdk thats also official from Docker Hub.
https://hub.docker.com/_/openjdk
Is there anything that Skywalking agent only works only certain base images.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on issue #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9012:
URL: https://github.com/apache/skywalking/issues/9012#issuecomment-1120691485
Your docker file, your responsibility.
We have provided official docker images in dockerhub.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng closed issue #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
URL: https://github.com/apache/skywalking/issues/9012
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] kezhenxu94 commented on issue #9012: [Bug] - “openjdk:8-jdk-alpine” base-image docker based application unable to start with Apache Skywalking
Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #9012:
URL: https://github.com/apache/skywalking/issues/9012#issuecomment-1131187784
Also please open new issue since this issue was for Docker image and it's resolved
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org