一、问题
部署完skywalking之后,准备启动一个springboot项目,将其注册到skywalking进行调用链监控。
项目能正常启动,但是在skywalking页面查看不到服务
.
查看java-agent的日志(skywalking-agent/logs/skywalking-api.log日志文件
)如下:
ERROR 2023-05-16 16:45:48.525 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)
二、解决
在springboot项目启动的参数配置里面,SW_AGENT_COLLECTOR_BACKEND_SERVICES
表示skywalking收集数据的地址,该值配置多了http://
,将其改成localhost:11800
,问题解决。
有点坑~