Replies: 6 comments
-
@kezhenxu94 Any insight about this? |
Beta Was this translation helpful? Give feedback.
-
I found the reason for the SWCK injection startup failure: it was caused by a conflict between two optional plugins. The SWCK injection used the configuration of SWAgent, which included both apm-trace-ignore-plugin-9.4.0.jar and trace-sampler-cpu-policy-plugin-9.4.0.jar as optional plugins: optionalPlugins:
The reason why manually building the Docker image allows successful startup is that the optional plugins were not copied into the plugin directory, so there was no conflict. |
Beta Was this translation helpful? Give feedback.
-
@hhhhuanzi make sure you provided useful information, at least, (1) provide the command/configurations of how you installed SWCK, (2) the configuration of your JavaAgent |
Beta Was this translation helpful? Give feedback.
-
Also, even if the optional plugins are enabled, the error is unexpected, I think there is a bug in the so11y, when registering meter in the plugins, the meter service is not yet initialized, FYI @weixiang1862
|
Beta Was this translation helpful? Give feedback.
-
My container has successfully started now. My solution was to keep only the apm-trace-ignore-plugin-9.4.0.jar plugin and not use the trace-sampler-cpu-policy-plugin-9.4.0.jar. 1、install swck: kubectl apply -f config/operator-bundle.yaml apiVersion: operator.skywalking.apache.org/v1alpha1
kind: JavaAgent
metadata:
creationTimestamp: "2025-05-12T10:47:40Z"
generation: 1
labels:
app: demo
name: app-demo-javaagent
namespace: ng-i8
ownerReferences:
- apiVersion: apps/v1
blockOwnerDeletion: true
controller: true
kind: ReplicaSet
name: demo-6b9c9f9ffb
uid: f41ace11-da0d-4d56-8904-a231a6cbd747
resourceVersion: "32321889"
uid: f633e2be-275a-4be0-a48c-4534c348e1e8
spec:
agentConfiguration:
collector.backend_service: skywalking-oap.skywalking.svc.cluster.local:11800
backendService: skywalking-oap.skywalking.svc.cluster.local:11800
podSelector: app=demo
serviceName: Your_ApplicationName
status:
creationTime: "2025-05-12T10:47:40Z"
expectedInjectiedNum: 4
lastUpdateTime: "2025-05-13T03:25:04Z"
realInjectedNum: 4
|
Beta Was this translation helpful? Give feedback.
-
The NPE should be able to be fixed by apache/skywalking-java#755. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Search before asking
Apache SkyWalking Component
SWCK (apache/skywalking-swck)
What happened
SWCK injects the Java Agent into the /sky/agent directory of the container. However, it fails to start. If the injection is not used and the agent is manually downloaded and built into the container using docker build, the startup works fine.
Environment:
JDK Version: OpenJDK version "21-ea" 2023-09-19
SkyWalking Version: OAP 10.0.0, UI 10.0.0
SWCK Version: 0.9.0
Java Agent Version: 9.4.0-java21
The path of the swck injected agent inside the container: /sky/agent/skywalking-agent.jar
The path of the manually built agent inside the container: /sky2/skywalking-agent.jar
Error Log:
### Logs from starting with the manually injected agent:
What you expected to happen
swck injected has bug
How to reproduce
1、download java-agent tar on official website。
2、use dockerfile command 'COPY' skywalking folder into container
3、use swck swagent to inject skywalking-java-agent into container
4、exec container,export JAVA_TOOLS_OPTS=''
5、use java -javaagent:/sky/agent/skywalking-agent.jar watch error log
6、use java -javaagent:/sky2/skywalking.jar watch success log。/sky2/skywalking.jar is docker build into container
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions