Closed mahudees closed 3 years ago
Do you use any supported components? Please open debug level in the agent.config. Then you can see whether trace segment reports.
Yes, the petclinic project uses SpringBoot which is supported. I was able visit the UI pages which should be generating the trace.
Logs looks to be similar as earlier, any particular logs that I need to look. Noticed the following one while starting,
INFO 2021-08-08 17:32:36:117 main PluginBootstrap : no plugin files (skywalking-plugin.def) found, continue to start application.
DEBUG 2021-08-08 17:32:36:793 main SamplingService : Agent sampling mechanism started. Sample 500 traces in 3 seconds.
DEBUG 2021-08-08 17:32:36:794 SkywalkingAgent-8-ServiceManagementClient-0 ServiceManagementClient : ServiceManagementClient running, status:DISCONNECT.
DEBUG 2021-08-08 17:32:36:798 SkywalkingAgent-13-GRPCChannelManager-0 GRPCChannelManager : Selected collector grpc service running, reconnect:true.
DEBUG 2021-08-08 17:32:36:885 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.logging.InternalLoggerFactory : Using SLF4J as the default logging framework
DEBUG 2021-08-08 17:32:36:889 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent : Platform: MacOS
DEBUG 2021-08-08 17:32:36:891 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0 : -Dio.netty.noUnsafe: false
DEBUG 2021-08-08 17:32:36:891 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0 : Java version: 11
DEBUG 2021-08-08 17:32:36:892 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0 : sun.misc.Unsafe.theUnsafe: available
DEBUG 2021-08-08 17:32:36:893 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0 : sun.misc.Unsafe.copyMemory: available
DEBUG 2021-08-08 17:32:36:893 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0 : java.nio.Buffer.address: available
DEBUG 2021-08-08 17:32:36:894 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0 : direct buffer constructor: unavailable
java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled
at org.apache.skywalking.apm.dependencies.io.netty.util.internal.ReflectionUtil.trySetAccessible(ReflectionUtil.java:31)
at org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0$4.run(PlatformDependent0.java:233)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:227)
at org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:289)
at org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:92)
at org.apache.skywalking.apm.dependencies.io.netty.util.AsciiString.<init>(AsciiString.java:223)
at org.apache.skywalking.apm.dependencies.io.netty.util.AsciiString.<init>(AsciiString.java:210)
at org.apache.skywalking.apm.dependencies.io.netty.util.AsciiString.cached(AsciiString.java:1401)
at org.apache.skywalking.apm.dependencies.io.netty.util.AsciiString.<clinit>(AsciiString.java:48)
at org.apache.skywalking.apm.dependencies.io.grpc.netty.Utils.<clinit>(Utils.java:72)
at org.apache.skywalking.apm.dependencies.io.grpc.netty.NettyChannelBuilder.<clinit>(NettyChannelBuilder.java:75)
at org.apache.skywalking.apm.agent.core.remote.GRPCChannel.<init>(GRPCChannel.java:40)
at org.apache.skywalking.apm.agent.core.remote.GRPCChannel.<init>(GRPCChannel.java:31)
at org.apache.skywalking.apm.agent.core.remote.GRPCChannel$Builder.build(GRPCChannel.java:105)
at org.apache.skywalking.apm.agent.core.remote.GRPCChannelManager.run(GRPCChannelManager.java:138)
at org.apache.skywalking.apm.util.RunnableWithExceptionProtection.run(RunnableWithExceptionProtection.java:33)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
DEBUG 2021-08-08 17:32:36:898 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0 : java.nio.Bits.unaligned: available, true
DEBUG 2021-08-08 17:32:36:899 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0 : jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable
java.lang.IllegalAccessException: class org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0$6 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @2dc54ad4
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591)
at java.base/java.lang.reflect.Method.invoke(Method.java:558)
at org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0$6.run(PlatformDependent0.java:347)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:338)
at org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:289)
at org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:92)
at org.apache.skywalking.apm.dependencies.io.netty.util.AsciiString.<init>(AsciiString.java:223)
at org.apache.skywalking.apm.dependencies.io.netty.util.AsciiString.<init>(AsciiString.java:210)
at org.apache.skywalking.apm.dependencies.io.netty.util.AsciiString.cached(AsciiString.java:1401)
at org.apache.skywalking.apm.dependencies.io.netty.util.AsciiString.<clinit>(AsciiString.java:48)
at org.apache.skywalking.apm.dependencies.io.grpc.netty.Utils.<clinit>(Utils.java:72)
at org.apache.skywalking.apm.dependencies.io.grpc.netty.NettyChannelBuilder.<clinit>(NettyChannelBuilder.java:75)
at org.apache.skywalking.apm.agent.core.remote.GRPCChannel.<init>(GRPCChannel.java:40)
at org.apache.skywalking.apm.agent.core.remote.GRPCChannel.<init>(GRPCChannel.java:31)
at org.apache.skywalking.apm.agent.core.remote.GRPCChannel$Builder.build(GRPCChannel.java:105)
at org.apache.skywalking.apm.agent.core.remote.GRPCChannelManager.run(GRPCChannelManager.java:138)
at org.apache.skywalking.apm.util.RunnableWithExceptionProtection.run(RunnableWithExceptionProtection.java:33)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
DEBUG 2021-08-08 17:32:36:900 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent0 : java.nio.DirectByteBuffer.<init>(long, int): unavailable
DEBUG 2021-08-08 17:32:36:900 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent : sun.misc.Unsafe: available
DEBUG 2021-08-08 17:32:36:902 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent : maxDirectMemory: 4294967296 bytes (maybe)
DEBUG 2021-08-08 17:32:36:902 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent : -Dio.netty.tmpdir: /var/folders/4h/lzl2z8d95qj1z9p8xzsnvdpc0000gn/T (java.io.tmpdir)
DEBUG 2021-08-08 17:32:36:902 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent : -Dio.netty.bitMode: 64 (sun.arch.data.model)
DEBUG 2021-08-08 17:32:36:904 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent : -Dio.netty.maxDirectMemory: -1 bytes
DEBUG 2021-08-08 17:32:36:904 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.PlatformDependent : -Dio.netty.uninitializedArrayAllocationThreshold: -1
DEBUG 2021-08-08 17:32:36:905 SkywalkingAgent-13-GRPCChannelManager-0 org.apache.skywalking.apm.dependencies.io.netty.util.internal.CleanerJava9 : java.nio.ByteBuffer.cleaner(): available
Thanks, Mahudees
Which JDK are you using? I am not sure why this
java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled
According to this, the netty is not working, then grpc is not working. So, nothing would be reported.
I'm using java 11, Adopt Open JDK.
spring-petclinic$ java -version openjdk version "11.0.7" 2020-04-14 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
From application logs.
2021-08-08 17:32:38.060 INFO 14947 --- [ main] o.s.s.petclinic.PetClinicApplication : Starting PetClinicApplication v2.4.5 using Java 11.0.7 on C02Y94BVJG5J with PID 14947 (/Users/mpalanisamy/fm/scale/petclinic/spring-petclinic/target/spring-petclinic-2.4.5.jar started by mpalanisamy in /Users/mpalanisamy/fm/scale/petclinic/spring-petclinic)
Thanks, Mahudees
I did a search. This seems not related to SkyWalking, take a look at how Netty works.
https://stackoverflow.com/questions/57885828/netty-cannot-access-class-jdk-internal-misc-unsafe
From this https://github.com/netty/netty/issues/10032, it looks like this issue reported doesn't affect the functionality of Netty. Is there some thing I need to do to make Skywalking work in Java11? Will this Netty issue affect Skywalking functionality as well?
From this netty/netty#10032, it looks like this issue reported doesn't affect the functionality of Netty. Is there some thing I need to do to make Skywalking work in Java11? Will this Netty issue affect Skywalking functionality as well?
Seems they say it doesn't matter.
Are you running a main func only or a server exposing HTTP service or similar? If you are writing a very small main, nothing would be reported.
Please notice what is SkyWalking designed for. SkyWalking: an APM(application performance monitor) system, especially designed for microservices
https://github.com/apache/skywalking/blob/bca62f63fa0c57bf3bb5d8ebde9d6969b55b8429/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/TraceSegmentServiceClient.java#L146 This debug log would be out if something was reported.
Neither of those logs are available, not sure what is wrong. Don't see any error or warning as well in the logs.
C02Y94BVJG5J:logs mpalanisamy$ ll skywalking-api.log C02Y94BVJG5J:logs mpalanisamy$ grep "trace segments have been sent to collector" C02Y94BVJG5J:logs mpalanisamy$ grep "trace segments have been abandoned, cause by no available channel" C02Y94BVJG5J:logs mpalanisamy$
Read my comments and questions again.
Actually it didn't worked with our web application running in Tomcat, that's the reason I tried with more simple example. I was able to get traces from our web application for the REST endpoints when using Pinpoint and Opentelemetry earlier. May be will try to setup everything fresh again.
Actually it didn't worked with our web application running in Tomcat, that's the reason I tried with more simple example. I was able to get traces from our web application for the REST endpoints when using Pinpoint and Opentelemetry earlier. May be will try to setup everything fresh again.
Main app doesn't work, else you have been familiar at how SkyWalking works. Try Tomcat or SpringMVC. We have many cases working. Such as this simple one, https://github.com/apache/skywalking/tree/master/test/plugin/scenarios/httpclient-4.3.x-scenario
Also, you could see this case is running in JDK14, https://github.com/apache/skywalking/blob/master/test/plugin/scenarios/jdk14-with-gson-scenario/pom.xml
But Tomcat 10 is not on our support list, I don't know whether this is your issue. Check the doc before you set up tests. https://skywalking.apache.org/docs/main/latest/en/setup/service-agent/java-agent/supported-list/
Thanks @wu-sheng The sample application now used is started using JDK 14, embedded tomcat 9.0.46 and Spring boot 2.5.0. Still no luck, one thing is able to get JVM metrics in UI Dashboard, under instance. But still not able to get any other metrics and Trace. Now switched the storage from default H2 to Elastic. But I believe this would have worked earlier as well. Some thing is missing, let me debug further.
:: Spring Boot :: (v2.5.0)
2021-08-09 00:08:33.596 INFO 10505 --- [ main] com.example.springboot.Application : Starting Application using Java 14.0.2 on C02Y94BVJG5J with PID 10505 (/Users/mpalanisamy/javatools/pinpoint/gs-spring-boot/initial/target/classes started by mpalanisamy in /Users/mpalanisamy/javatools/pinpoint/gs-spring-boot) 2021-08-09 00:08:33.607 INFO 10505 --- [ main] com.example.springboot.Application : No active profile set, falling back to default profiles: default 2021-08-09 00:08:35.664 INFO 10505 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2021-08-09 00:08:35.692 INFO 10505 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2021-08-09 00:08:35.693 INFO 10505 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.46]
@wu-sheng It seems I'm having the same problem: Use the latest version from https://github.com/apache/skywalking-java.git
Proxy 8.16.0
java version openjdk version "17.0.8" 2023-07-18 OpenJDK runtime environment Temurin-17.0.8+7 (build 17.0.8+7) OpenJDK 64-bit Server VM Temurin-17.0.8+7 (build 17.0.8+7, mixed mode, shared)
The following words in the log: 2023-08-17T17:11:12.040370534+08:00 DEBUG 2023-08-17 17:11:12.039 main AgentPackagePath : The beacon class location is jar:file:/usr/agent/skywalking-agent.jar!/org/ apache/skywalking/apm/agent/core/boot/AgentPackagePath.class. 2023-08-17T17:11:12.040743810+08:00 INFO 2023-08-17 17:11:12.040 main SnifferConfigInitializer : Config file found in /usr/agent/config/agent.config. 2023-08-17T17:11:12.074335569+08:00 INFO 2023-08-17 17:11:12.074 main SnifferConfigInitializer : SnifferConfigInitializer url:jar:file:/app/app.jar!/META-INF/MANIFEST.MF 2023-08-17T17:11:12.076056951+08:00 INFO 2023-08-17 17:11:12.075 main SnifferConfigInitializer : SnifferConfigInitializer url:jar:file:/usr/agent/skywalking-agent.jar!/META- INF/ MANIFEST.MF 2023-08-17T17:11:12.079754225+08:00 INFO 2023-08-17 17:11:12.079 main PluginBootstrap : no plugin files (skywalking-plugin.def) found, continue to start application.
It is only displayed in the UI, but there is no trace information. Where can I check it?
Don't ping me. Don't post duplicate information.
I don't have an obligation to answer any question!! I HATE THIS BEHAVIOR
I'm trying to do a simple demo with petclinic project. Most of config and components are the default ones, except the following config in agent.config
agent.service_name=petclinic collector.backend_service=10.xx.xx.xx:11800 agent.sample_n_per_3_secs=500
Setup the basic backend, did the above config in agent. Started the petclinic project and visited few UI pages to generate some trace. After some time, when checked in skywalking UI didn't see any thing in trace, but petclinic is listed in the service. Not sure if I missed any thing?. I have checked the following.
1) There was <20 min time difference was there between agent and the collector, I had extended the time interval of the query in UI to include for 3 days (a day before and a day after). So it shouldn't be a problem.
2) connection is available between agent and collector, in fact service name configured in agent is listed in Skywalking UI.
3) No error/issue seen in collector logs
4) Neither it was seen in agent logs as well.
Thanks, Mahudees