You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "fireinrain (via GitHub)" <gi...@apache.org> on 2025/03/07 02:52:40 UTC
[I] [Bug] skywalking-oap-server cant use es service name as address in docker container [skywalking]
fireinrain opened a new issue, #13085:
URL: https://github.com/apache/skywalking/issues/13085
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues.
### Apache SkyWalking Component
OAP server (apache/skywalking)
### What happened
I have made a docker-compose.yml:
content as below:
version: '3'
services:
opensearch:
image: opensearchproject/opensearch:2.12.0
container_name: igavin-opensearch
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true # 添加此项以提高性能
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # 限制内存使用
- plugins.security.disabled=true
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=JmC@2024!Opensearch
volumes:
- ./opensearch-data:/usr/share/opensearch/data
ports:
- 9200:9200
ulimits: # 添加资源限制
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
networks:
- skywalking-net
opensearch-dashboards: # 新增OpenSearch Dashboards服务(UI界面)
image: opensearchproject/opensearch-dashboards:2.12.0
container_name: igavin-opensearch-dashboards
depends_on:
- opensearch
environment:
- 'OPENSEARCH_HOSTS=["http://opensearch:9200"]'
- 'DISABLE_SECURITY_DASHBOARDS_PLUGIN=true' # 关闭安全插件支持,适合无认证场景
ports:
- 5601:5601
networks:
- skywalking-net
skywalking-oap:
image: apache/skywalking-oap-server:10.0.0
container_name: igavin-skywalking-oap
depends_on:
- opensearch
environment:
- TZ=Asia/Shanghai
- SW_STORAGE=elasticsearch
- SW_STORAGE_ES_CLUSTER_NODES=opensearch:9200
- SW_ES_USER=
- SW_ES_PASSWORD=
- SW_STORAGE_ES_PROTOCOL=http
- SW_CORE_REST_PORT=12800
- SW_CORE_GRPC_PORT=11800
- SW_SEARCH_ES_INDICES_SHARDS_NUMBER=1 # 设置分片数为1
- SW_SEARCH_ES_INDICES_REPLICAS_NUMBER=0 # 设置副本数为0
volumes:
- ./skywalking-oap-data:/skywalking/oap-data
ports:
- 11800:11800
- 12800:12800
networks:
- skywalking-net
skywalking-ui:
image: apache/skywalking-ui:10.0.0
container_name: igavin-skywalking-ui
depends_on:
- skywalking-oap
ports:
- 18080:8080
environment:
- TZ=Asia/Shanghai
- SW_OAP_ADDRESS=http://skywalking-oap:12800
networks:
- skywalking-net
networks:
skywalking-net:
external: true
when I use this docker compose yml,and run docker compose -f docker-compose.yml up -d.
And all of them are up with normal except the skywalking-oap-server.
I check out the logs of skywalking-oap-server container:
here is an error:
Caused by: com.linecorp.armeria.client.UnprocessedRequestException: io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: opensearch/172.22.0.2:9200
at com.linecorp.armeria.client.UnprocessedRequestException.of(UnprocessedRequestException.java:45) ~[armeria-1.27.3.jar:?]
... 25 more
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: opensearch/172.22.0.2:9200
Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused
at io.netty.channel.unix.Errors.newConnectException0(Errors.java:166) ~[netty-transport-native-unix-common-4.1.108.Final-osx-x86_64.jar:4.1.108.Final]
at io.netty.channel.unix.Errors.handleConnectErrno(Errors.java:131) ~[netty-transport-native-unix-common-4.1.108.Final-osx-x86_64.jar:4.1.108.Final]
at io.netty.channel.unix.Socket.finishConnect(Socket.java:359) ~[netty-transport-native-unix-common-4.1.108.Final-osx-x86_64.jar:4.1.108.Final]
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:715) ~[netty-transport-classes-epoll-4.1.108.Final.jar:4.1.108.Final]
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:692) ~[netty-transport-classes-epoll-4.1.108.Final.jar:4.1.108.Final]。
but when i change my docker-compose.yml, I use my localmachine ip: 192.168.1.82, to replace the
skywalking-oap-server config:
skywalking-oap:
image: apache/skywalking-oap-server:10.0.0
container_name: igavin-skywalking-oap
depends_on:
- opensearch
environment:
- TZ=Asia/Shanghai
- SW_STORAGE=elasticsearch
- SW_STORAGE_ES_CLUSTER_NODES=192.168.1.82:9200 # change opensearch to local ip
- SW_ES_USER=
- SW_ES_PASSWORD=
- SW_STORAGE_ES_PROTOCOL=http
- SW_CORE_REST_PORT=12800
- SW_CORE_GRPC_PORT=11800
- SW_SEARCH_ES_INDICES_SHARDS_NUMBER=1 # 设置分片数为1
- SW_SEARCH_ES_INDICES_REPLICAS_NUMBER=0 # 设置副本数为0
volumes:
- ./skywalking-oap-data:/skywalking/oap-data
ports:
- 11800:11800
- 12800:12800
networks:
- skywalking-net
I found it's run ok, when i log into the skywalking-oap-server, and curl opensearch:9200, it's also ok.
I feel very strange. Hope team to check this issue, Have a nice day!
### What you expected to happen
I wish skywalking-oap-server can use service name in docker container.
### How to reproduce
Use my docker compose yml
### Anything else
_No response_
### Are you willing to submit a pull request to fix on your own?
- [x] Yes I am willing to submit a pull request on my own!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] skywalking-oap-server cant use es service name as address in docker container [skywalking]
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng closed issue #13085: [Bug] skywalking-oap-server cant use es service name as address in docker container
URL: https://github.com/apache/skywalking/issues/13085
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org