Repository navigation
SkyWalking Go Agent fails to connect to OAP service due to version incompatibilityProblem DescriptionThe Go application using SkyWalking Go Agent fails to connect to the OAP service. Although network connectivity tests are successful, the Agent consistently attempts to connect to Environment Information
Steps to Reproduce
services:
skywalking-oap:
image: apache/skywalking-oap-server:9.7.0
ports:
- "11800:11800"
- "12800:12800"
environment:
- SW_REST_ENABLED=true
- SW_STORAGE=h2
- SW_H2_STORAGE_EMBEDDED=true
volumes:
- oap-data:/skywalking/oap-libs/h2
skywalking-ui:
image: apache/skywalking-ui:9.7.0
ports:
- "8081:8080"
environment:
- SW_OAP_ADDRESS=http://skywalking-oap:12800
depends_on:
- skywalking-oap
volumes:
oap-data:
FROM apache/skywalking-go:0.5.0-go1.23
WORKDIR /app
ENV GOPROXY=https://goproxy.cn,direct
COPY . .
RUN env GOPROXY=$GOPROXY skywalking-go-agent -inject /app
RUN env GOPROXY=$GOPROXY go build -toolexec="skywalking-go-agent" -o my-app .
RUN rm -f skywalking.yaml skywalking_inject.go
EXPOSE 8080
CMD ["./my-app", "-agent.opts=-Dskywalking.oap.address=skywalking-oap:11800"]
Error LogsGo Application LogsNetwork Connectivity Test# Test connectivity inside the container
ping skywalking-oap -c 3
# Output:
PING skywalking-oap (172.19.0.3) 56(84) bytes of data.
64 bytes from sky1-skywalking-oap-1.sky1_default (172.19.0.3): icmp_seq=1 ttl=64 time=0.138 ms
telnet skywalking-oap 11800
# Output:
Trying 172.19.0.3...
Connected to skywalking-oap.Possible CauseBased on troubleshooting, the issue is likely caused by version incompatibility:
Tried Solutions
CMD ["./my-app", "-agent.opts=-Dskywalking.oap.address=skywalking-oap:11800"]
Expected Solutions
Additional Information
Thank you for your assistance! |
Replies: 1 comment 3 replies
|
We have a version compatibility doc, https://skywalking.apache.org/docs/main/next/en/setup/service-agent/agent-compatibility/ But your version seems fine. Meanwhile, I saw you face connectivity issue, rather than compatibility issue. @mrproliu any suggestion? |
It’s not related to the agent compatibility, it’s related your configuration. Your backend address setting in a wrong way, please following this documentation to config the backend address: https://skywalking.apache.org/docs/skywalking-go/next/en/advanced-features/settings-override/