apache / apache/incubator-seata

start seata with -h option, seata registered two instance in eureka, one with docker virtual ip, one with -h specified ip

Open
#1,840 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

- [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.

### Ⅰ. Issue Description
deploy eureka and seata at the same server
start seata with -h option, seata registered two instance in eureka, one with docker virtual ip, one with -h specified ip.
RM client keep register with the instance with docker virtual ip.
![image](https://user-images.githubusercontent.com/11673316/67825654-fe83c400-fb04-11e9-8e4e-c4c3ed72b197.png)

### Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

```
2019-10-30 11:03:06.782 INFO [business,,,] 10840 --- [imeoutChecker_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 172.17.0.1:8091
2019-10-30 11:03:06.782 INFO [business,,,] 10840 --- [imeoutChecker_1] io.seata.core.rpc.netty.RmRpcClient : RM will register :jdbc:mysql://localhost:3306/business
2019-10-30 11:03:06.782 INFO [business,,,] 10840 --- [imeoutChecker_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:RMROLE,address:172.17.0.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://localhost:3306/business', applicationId='business', transactionServiceGroup='my_test_tx_group'} >
2019-10-30 11:03:06.783 INFO [business,,,] 10840 --- [lector_TMROLE_1] i.s.core.rpc.netty.AbstractRpcRemoting : ChannelHandlerContext(TmRpcClient#0, [id: 0xad2e7f81]) will closed
2019-10-30 11:03:06.783 ERROR [business,,,] 10840 --- [imeoutChecker_1] i.s.c.r.netty.NettyClientChannelManager : 0304

io.seata.common.exception.FrameworkException: can not connect to services-server.
at io.seata.core.rpc.netty.RpcClientBootstrap.getNewChannel(RpcClientBootstrap.java:195) ~[seata-all-0.7.1.jar:0.7.1]
at io.seata.core.rpc.netty.NettyPoolableFactory.makeObject(NettyPoolableFactory.java:60) ~[seata-all-0.7.1.jar:0.7.1]
at io.seata.core.rpc.netty.NettyPoolableFactory.makeObject(NettyPoolableFactory.java:35) ~[seata-all-0.7.1.jar:0.7.1]
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220) ~[commons-pool-1.6.jar:1.6]
at io.seata.core.rpc.netty.NettyClientChannelManager.doConnect(NettyClientChannelManager.java:203) [seata-all-0.7.1.jar:0.7.1]
at io.seata.core.rpc.netty.NettyClientChannelManager.acquireChannel(NettyClientChannelManager.java:102) [seata-all-0.7.1.jar:0.7.1]
at io.seata.core.rpc.netty.NettyClientChannelManager.reconnect(NettyClientChannelManager.java:171) [seata-all-0.7.1.jar:0.7.1]
at io.seata.core.rpc.netty.AbstractRpcRemotingClient$1.run(AbstractRpcRemotingClient.java:115) [seata-all-0.7.1.jar:0.7.1]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_201]
at java.util.concurrent.FutureTask.runAndReset$$$capture(FutureTask.java:308) [na:1.8.0_201]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java) [na:1.8.0_201]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_201]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_201]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-all-4.1.42.Final.jar:4.1.42.Final]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_201]
Caused by: io.seata.common.exception.FrameworkException: connect failed, can not connect to services-server.
at io.seata.core.rpc.netty.RpcClientBootstrap.getNewChannel(RpcClientBootstrap.java:190) ~[seata-all-0.7.1.jar:0.7.1]
... 16 common frames omitted

```

### Ⅲ. Describe what you expected to happen

i wish just register one instance with -h specified ip

### Ⅳ. How to reproduce it (as minimally and precisely as possible)

1. xxx
2. xxx
3. xxx

### Ⅴ. Anything else we need to know?

### Ⅵ. Environment:

- JDK version : 1.8
- OS : ubantu
- Others:

Contributor guide

Open the contributing guide

Research direction

Start with the RpcClientBootstrap and NettyClientChannelManager locations named in the stack trace, then inspect how the server registers with Eureka when started with -h in the Docker setup. Reproduce the deployment with Eureka and Seata on the same host; done means only the specified IP is registered and RM clients connect to it.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.