Skip to content
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

skywalking support ibm websphere(was ) j9vm #2652

Closed
3 tasks
guojie0701 opened this issue May 11, 2019 · 35 comments
Closed
3 tasks

skywalking support ibm websphere(was ) j9vm #2652

guojie0701 opened this issue May 11, 2019 · 35 comments
Labels
question End user question and discussion.
Milestone

Comments

@guojie0701
Copy link

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • Bug
  • [ --- ] Requirement
  • Feature or performance improvement

Question

  • What do you want to know?

We strongly expect skywalking to support IBM & Oracle Web Containers, because so many product environments run on websphere and weblogic , we believe this feature can greatly improve the skywalking application scenario. thanks.


Bug

  • Which version of SkyWalking, OS and JRE?
    skywalking 6.1
    websphere 6.1+ J9VM 1.6.0+

  • Which company or project?

  • What happen?
    If possible, provide a way for reproducing the error. e.g. demo application, component version.


Requirement or improvement

  • Please describe about your requirements or improvement suggestions.
@wu-sheng
Copy link
Member

I think we can't support them in Apache. The Oracle and IBM Web Containers are commercial products. We can't use their jar libs.

Volunteer may choose to open them at their personal repository as extension.

@wu-sheng wu-sheng added this to the 6.2.0 milestone May 11, 2019
@wu-sheng wu-sheng added the question End user question and discussion. label May 11, 2019
@killme10086
Copy link

Yes, we are eager for this feature too.

@wu-sheng
Copy link
Member

Are we talking about j9vm or websphere here?

@PrettyJerry
Copy link

Yes, we are eager for this feature too.

I also face the same problem, WebSphere 6.x/7.x/8.x, drive me crazy!

@PrettyJerry
Copy link

PrettyJerry commented May 12, 2019

i am not sure if the grpc & protobuf caused the problem or not, but i met so exception on was7.0 & j9vm1.7.0_20150407 just like that:
main ProtectiveShieldMatcher : Byte-buddy occurs exception when match type.
java.lang.IllegalStateException: Cannot resolve type description for java.security.PrivilegedAction

@wu-sheng
Copy link
Member

This is not an issue, this is protected by agent APIs. Only output a log, I remember it is a warning level, right?

@pmq5205209
Copy link

I have tested WebSphere 7.0.0.11 with ibm jdk 1.8_20160719 and 1.7.0_20150407, skywalking-agent has the same logs.
wa7.0_jdk_1.7.0_20150407_skywalking-api.log
wa7.0_jdk_1.8_20160719_skywalking-api.log

WARN 2019-05-09 17:01:35:905 SkywalkingAgent-1-GRPCChannelManager-0 ProtectiveShieldMatcher : Byte-buddy occurs exception when match type.
java.lang.IllegalStateException: Cannot resolve type description for java.security.PrivilegedAction
at org.apache.skywalking.apm.dependencies.net.bytebuddy.pool.TypePool$Resolution$Illegal.resolve(TypePool.java:144)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.pool.TypePool$Default$WithLazyResolution$LazyTypeDescription.delegate(TypePool.java:1392)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.description.type.TypeDescription$AbstractBase$OfSimpleType$WithDelegation.getInterfaces(TypeDescription.java:8016)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.description.type.TypeDescription$Generic$OfNonGenericType.getInterfaces(TypeDescription.java:3621)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.HasSuperTypeMatcher.hasInterface(HasSuperTypeMatcher.java:53)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.HasSuperTypeMatcher.hasInterface(HasSuperTypeMatcher.java:54)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.HasSuperTypeMatcher.matches(HasSuperTypeMatcher.java:38)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.HasSuperTypeMatcher.matches(HasSuperTypeMatcher.java:15)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Conjunction.matches(ElementMatcher.java:107)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:147)
at org.apache.skywalking.apm.agent.core.plugin.match.ProtectiveShieldMatcher.matches(ProtectiveShieldMatcher.java:47)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$RawMatcher$ForElementMatchers.matches(AgentBuilder.java:1249)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$Transformation$Simple.matches(AgentBuilder.java:9893)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$Transformation$Simple.resolve(AgentBuilder.java:9906)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$Transformation$Compound.resolve(AgentBuilder.java:10162)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.resolve(AgentBuilder.java:10494)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.doTransform(AgentBuilder.java:10461)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.transform(AgentBuilder.java:10424)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.access$1500(AgentBuilder.java:10190)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer$LegacyVmDispatcher.run(AgentBuilder.java:10799)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer$LegacyVmDispatcher.run(AgentBuilder.java:10746)
at java.security.AccessController.doPrivileged(AccessController.java:620)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.transform(AgentBuilder.java:10347)
at sun.instrument.TransformerManager.transform(TransformerManager.java:200)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:450)
at com.ibm.oti.vm.VM.findClassOrNull(Native Method)
at com.ibm.oti.vm.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:63)
at java.lang.J9VMInternals.checkPackageAccess(J9VMInternals.java:257)
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:346)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:154)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:727)
at java.net.URLClassLoader.access$400(URLClassLoader.java:95)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1182)
at java.security.AccessController.doPrivileged(AccessController.java:686)
at java.net.URLClassLoader.findClass(URLClassLoader.java:602)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:846)
at java.lang.ClassLoader.loadClass(ClassLoader.java:825)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:325)
at java.lang.ClassLoader.loadClass(ClassLoader.java:805)
at org.apache.skywalking.apm.dependencies.io.grpc.NameResolverProvider.(NameResolverProvider.java:44)
at org.apache.skywalking.apm.dependencies.io.grpc.internal.AbstractManagedChannelImplBuilder.(AbstractManagedChannelImplBuilder.java:86)
at org.apache.skywalking.apm.agent.core.remote.GRPCChannel.(GRPCChannel.java:40)
at org.apache.skywalking.apm.agent.core.remote.GRPCChannel.(GRPCChannel.java:31)
at org.apache.skywalking.apm.agent.core.remote.GRPCChannel$Builder.build(GRPCChannel.java:95)
at org.apache.skywalking.apm.agent.core.remote.GRPCChannelManager.run(GRPCChannelManager.java:105)
at org.apache.skywalking.apm.util.RunnableWithExceptionProtection.run(RunnableWithExceptionProtection.java:36)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:522)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:319)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:191)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:785)

@wu-sheng
Copy link
Member

My question is, what happens after this WARN log. I expect everything is still working.

@pmq5205209
Copy link

After this WARN log, WebSphere failed to start.

@wu-sheng
Copy link
Member

From the logs, I think should add more ignore in byte-buddy match.

@wu-sheng wu-sheng reopened this May 13, 2019
@wu-sheng wu-sheng added bug Something isn't working and you are sure it's a bug! TBD To be decided later, need more discussion or input. and removed question End user question and discussion. labels May 13, 2019
@wu-sheng
Copy link
Member

@pmq5205209 I have read the logs, and add more ignore in branch j9-compatible, could anyone to run the tests and update the log to me?

cc @PrettyJerry @guojie0701

@pmq5205209
Copy link

I can do this right now.

@pmq5205209
Copy link

I copied your SkyWalkingAgent.java , and replace mine. I built the project and tested. The logs are almost the same as yesterday.
wa7.0_jdk_1.7.0_20150407_skywalking-api_20190514.log

@wu-sheng
Copy link
Member

Moving to discussion to byte-buddy, raphw/byte-buddy#652

@wu-sheng
Copy link
Member

@pmq5205209 I am trying to follow Rafael's suggestion to provide a class file locator. Could you show me, how could I set the location? Such as, where are your jdk jars? Or other lib jars?

@pmq5205209
Copy link

@pmq5205209 I am trying to follow Rafael's suggestion to provide a class file locator. Could you show me, how could I set the location? Such as, where are your jdk jars? Or other lib jars?

We use WebSphere's default jdk whose location is "C:\Program Files (x86)\IBM\WebSphere\AppServer3\java". When I replace the jdk version, I just replace this file.

@wu-sheng
Copy link
Member

Are all jars of JRE in that folder?

@pmq5205209
Copy link

图片
Yes, and this is the file's snapshot.

@wu-sheng
Copy link
Member

You need to find jars including those classes in your error log. I think there includes JRE jars and WebSphere jars.

@pmq5205209
Copy link

I cannot find any jars including those classes in the error log. But I find classes in src.zip of WebShpere's default java path. Such as "java.security.BasicPermission".
图片

@wu-sheng
Copy link
Member

This is src, we need the class jar or folders.

@pmq5205209
Copy link

This is src, we need the class jar or folders.

I found the jar which is name rt.jar whose path is "C:\Program Files (x86)\IBM\WebSphere\AppServer3\java\jre\lib\rt.jar".

@wu-sheng
Copy link
Member

Could you give #2708 a try?

@wu-sheng wu-sheng removed this from the 6.2.0 milestone May 25, 2019
@pmq5205209
Copy link

Hi, WuSheng, I had Solved the problem of "java.security.PrivilegedAction". I set the agent's owner to the owner of WebSphere. And add "grant codeBase "file:${agent_dir}/-" { permission java.security.AllPermission; };" in the file of "server.policy". Now skywalking agent can run in WebSphere 6.1 ,7.0, 8.0 with openjdk 1.6.0 , and Apps run normally.
But there is still a problem that my websphere plugin cannot work. My agent has many plugins , such as websphere plugin and oracle plugin. After the WebSphere started, oracle plugin can work well, but websphere plugin cannot work.
I writed as sample agent and add it to WebSphere. It intercepted the classes I hoped.
图片
图片
However, when I write a plugin to skywalking agent and run in websphere, it cannot work.
图片
In additon , the log file has nothing with my WebSphere plugin. There is a error in my logs.
WARN 2019-06-19 20:00:34:372 main ProtectiveShieldMatcher : Byte-buddy occurs exception when match type.
java.lang.IllegalStateException: Cannot resolve type description for com.ibm.ws.runtime.component.Component
at org.apache.skywalking.apm.dependencies.net.bytebuddy.pool.TypePool$Resolution$Illegal.resolve(TypePool.java:159)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.pool.TypePool$Default$WithLazyResolution$LazyTypeDescription.delegate(TypePool.java:1407)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.description.type.TypeDescription$AbstractBase$OfSimpleType$WithDelegation.getInterfaces(TypeDescription.java:8031)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.description.type.TypeDescription$Generic$OfNonGenericType.getInterfaces(TypeDescription.java:3636)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.description.type.TypeDescription$Generic$LazyProjection$WithEagerNavigation.getInterfaces(TypeDescription.java:6375)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.HasSuperTypeMatcher.matches(HasSuperTypeMatcher.java:66)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.HasSuperTypeMatcher.matches(HasSuperTypeMatcher.java:31)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Conjunction.matches(ElementMatcher.java:122)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.matcher.ElementMatcher$Junction$Disjunction.matches(ElementMatcher.java:160)
at org.apache.skywalking.apm.agent.core.plugin.match.ProtectiveShieldMatcher.matches(ProtectiveShieldMatcher.java:47)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$RawMatcher$ForElementMatchers.matches(AgentBuilder.java:1292)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$Transformation$Simple.matches(AgentBuilder.java:9983)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$Transformation$Simple.resolve(AgentBuilder.java:9996)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$Transformation$Compound.resolve(AgentBuilder.java:10252)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.resolve(AgentBuilder.java:10584)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.doTransform(AgentBuilder.java:10551)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.transform(AgentBuilder.java:10514)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.access$1500(AgentBuilder.java:10280)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer$LegacyVmDispatcher.run(AgentBuilder.java:10890)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer$LegacyVmDispatcher.run(AgentBuilder.java:10837)
at java.security.AccessController.doPrivileged(AccessController.java:252)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.transform(AgentBuilder.java:10437)
at sun.instrument.TransformerManager.transform(TransformerManager.java:181)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:377)
at java.lang.reflect.Proxy.defineClass0(Native Method)
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:516)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:593)
at com.ibm.ws.eba.service.damping.GeneralServiceWrapper.getWrappedServiceImpl(GeneralServiceWrapper.java:210)
at com.ibm.ws.eba.service.damping.GeneralServiceWrapper.registerWrappedAliasService(GeneralServiceWrapper.java:74)
at com.ibm.ws.eba.external.framework.LauncherImpl.start(LauncherImpl.java:421)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(AccessController.java:280)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
at org.eclipse.osgi.framework.util.SecureAction$21.run(SecureAction.java:423)
at java.security.AccessController.doPrivileged(AccessController.java:314)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:457)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:627)
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:85)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:162)
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1357)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:151)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:751)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
at org.eclipse.osgi.framework.util.SecureAction$21.run(SecureAction.java:423)
at java.security.AccessController.doPrivileged(AccessController.java:314)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:627)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:338)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:232)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1197)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at com.ibm.ws.management.bla.registry.RegistryExtensionHelper.getContentHandlers(RegistryExtensionHelper.java:134)
at com.ibm.ws.management.bla.registry.BLARegistryHelper.createSortedContentHandlerList(BLARegistryHelper.java:294)
at com.ibm.ws.management.bla.registry.BLARegistryHelper.getContentHandlers(BLARegistryHelper.java:137)
at com.ibm.ws.management.bla.sync.BLABinaryProcessor.initSyncHandlers(BLABinaryProcessor.java:212)
at com.ibm.ws.management.bla.sync.BLABinaryProcessor.(BLABinaryProcessor.java:189)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
at com.ibm.ws.management.repository.FileRepository.initialize(FileRepository.java:356)
at com.ibm.ws.management.component.AdminImpl.initializeConfigRepository(AdminImpl.java:1316)
at com.ibm.ws.management.component.AdminImpl.initialize(AdminImpl.java:484)
at com.ibm.ws.runtime.component.ContainerHelper.initWsComponent(ContainerHelper.java:1192)
at com.ibm.ws.runtime.component.ContainerHelper.initializeComponent(ContainerHelper.java:1099)
at com.ibm.ws.runtime.component.ContainerHelper.initializeComponents(ContainerHelper.java:928)
at com.ibm.ws.runtime.component.ContainerImpl.initializeComponents(ContainerImpl.java:776)
at com.ibm.ws.runtime.component.ContainerImpl.initializeComponents(ContainerImpl.java:750)
at com.ibm.ws.runtime.component.ServerImpl.initialize(ServerImpl.java:332)
at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:336)
at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:267)
at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:730)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:234)
at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:95)
at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:981)
at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:371)
at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:142)

@wu-sheng
Copy link
Member

This is high-value solution, you should send a pull request to FAQ.

I had Solved the problem of "java.security.PrivilegedAction". 
1. Set the agent's owner to the owner of WebSphere.
2. Add "grant codeBase "file:${agent_dir}/-" { permission java.security.AllPermission; };" in the file of "server.policy".

Then skywalking agent can run in WebSphere 6.1 ,7.0, 8.0 with openjdk 1.6.0 , and Apps run normally.

The FAQ should be linked and placed here, https://github.com/apache/skywalking/blob/master/docs/en/FAQ/README.md#runtime

@wu-sheng
Copy link
Member

For your plugin, could you see any log output by SkyWalkingAgent#Transformer#transform()?

            ClassLoader classLoader, JavaModule module) {
            List<AbstractClassEnhancePluginDefine> pluginDefines = pluginFinder.find(typeDescription);
            if (pluginDefines.size() > 0) {
                DynamicType.Builder<?> newBuilder = builder;
                EnhanceContext context = new EnhanceContext();
                for (AbstractClassEnhancePluginDefine define : pluginDefines) {
                    DynamicType.Builder<?> possibleNewBuilder = define.define(typeDescription, newBuilder, classLoader, context);
                    if (possibleNewBuilder != null) {
                        newBuilder = possibleNewBuilder;
                    }
                }
                if (context.isEnhanced()) {
                    logger.debug("Finish the prepare stage for {}.", typeDescription.getName());
                }

                return newBuilder;
            }

            logger.debug("Matched class {}, but ignore by finding mechanism.", typeDescription.getTypeName());
            return builder;

@wu-sheng
Copy link
Member

But there is still a problem that my websphere plugin cannot work. My agent has many plugins , such as websphere plugin and oracle plugin. After the WebSphere started, oracle plugin can work well, but websphere plugin cannot work.

Which Oracle plugin are you talking about?

@wu-sheng wu-sheng added question End user question and discussion. and removed TBD To be decided later, need more discussion or input. bug Something isn't working and you are sure it's a bug! labels Jun 19, 2019
@pmq5205209
Copy link

I download oracle plugin and add it to my local skywalking.
图片

@wu-sheng
Copy link
Member

OK, If oracle plugin works then you means the java agent core should run perfectly. Then 2 things

  1. If you have SpringMVC, then I think you don't even need WebSphere plugin.
  2. We haven't developed the WebSphere plugin before. If you want locate the issue, you need to figure out,
    a) whether the target class loading by been intercepted by agent(from your demo, I will say yes), but you should add log to the method I referred(#transfer)
    b) If SkyWalking enhancing works? Does it return the new builder as expected?

@pmq5205209
Copy link

OK. I will do more try to develop WebSphere plugin, because we have an important customer whose uses many WebSphere.

@wu-sheng
Copy link
Member

OK. I will do more try to develop WebSphere plugin, because we have an important customer whose uses many WebSphere.

I am just saying, when SpringMVC active, you even can't see WebSphere in tracing.

@pmq5205209
Copy link

I know that. But We face a problem that these apps are too old.

@wu-sheng
Copy link
Member

Got it, then follow my suggestions, let's see what happened.

@pmq5205209
Copy link

OK. I will do it in these days.

@wu-sheng wu-sheng closed this as completed Jul 2, 2019
@wu-sheng wu-sheng added this to the 6.3.0 milestone Jul 2, 2019
@wu-sheng
Copy link
Member

wu-sheng commented Jul 2, 2019

As FAQ doc provided, I think installation in Websphere should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question End user question and discussion.
Projects
None yet
Development

No branches or pull requests

5 participants