-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Inaccessible externally due to container ip registration when deploying with Docker #318
Comments
Hi @haishui126,
Fixed services:
coordinator-server:
image: fluss/fluss:0.5.0
command: coordinatorServer
depends_on:
- zookeeper
environment:
- |
FLUSS_PROPERTIES=
zookeeper.address: zookeeper:2181
coordinator.host: coordinator-server
remote.data.dir: /tmp/fluss/remote-data
tablet-server:
image: fluss/fluss
command: tabletServer # << LINE TO BE FIXED
depends_on:
- coordinator-server
environment:
- |
FLUSS_PROPERTIES=
zookeeper.address: zookeeper:2181
tablet-server.host: tablet-server
tablet-server.id: 0
kv.snapshot.interval: 0s
data.dir: /tmp/fluss/data
remote.data.dir: /tmp/fluss/remote-data
volumes:
- shared-tmpfs:/tmp/fluss
zookeeper:
restart: always
image: zookeeper:3.9.2
volumes:
shared-tmpfs:
driver: local
driver_opts:
type: "tmpfs"
device: "tmpfs" Run
and this
can you explain in more detail what you are trying to achieve? does this guide solve your problem? |
Hi @michaelkoepf. My server's external IP address is 10.xx.xx.xx, but the host address registered to zk is 192.168.xx.xx, which is the container ip. This guide works well, beceuse flink and fluss is in the same docker service. They can communicate with each other using their container IP. |
ok. this means you run fluss with the docker compose manifest and flink and the sql client somewhere outside (on the same or even a different host), right? how do you create the fluss catalog in the sql client? have you adapted the
|
right. the following is my code, the connection timed out when creating the database StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
StreamTableEnvironment tableEnv = StreamTableEnvironment.create(env);
tableEnv.executeSql("CREATE CATALOG fluss_catalog WITH (\n" +
" 'type' = 'fluss',\n" +
" 'bootstrap.servers' = '10.xxx.xxx.xxx:9123'\n" +
");\n");
tableEnv.executeSql("USE CATALOG `fluss_catalog`;");
tableEnv.executeSql("CREATE DATABASE `db_test`;"); these are packets I captured with Wireshark, and you can see that the IP of CS and TS is obtained in 2491 and then tries to establish a new connection with CS 192.168.0.3. I debugged the process of creating the database, and found that the IP obtained in MetadataUpdater is not 10.xxx.xxx.xxx, and finally I can locate the hostname obtained from InetSocketAddress in NettyServer cannot be accessed externally. I've also tried modifying 'coordinator.host', setting it to 10.xxx.xxx.xxx will cause the service to fail to start. I also tried Deploying Local Cluster. Whether |
@haishui126 Thanks for reporting... Yes, you can't access Fluss from an extern network.. Fluss will need to support |
Search before asking
Fluss version
0.5.0
Minimal reproduce step
ports: - "9123:9123"
for coordinator-server and deploy to serverWhat doesn't meet your expectations?
coordinator-server log:
2025-01-09 03:12:19,633 INFO com.alibaba.fluss.rpc.netty.server.NettyServer [] - Successfully start Netty server (took 96 ms). Listening on SocketAddress /192.168.0.3:9123.
2025-01-09 03:12:19,734 INFO com.alibaba.fluss.server.zk.ZooKeeperClient [] - Registered leader CoordinatorAddress{id='0d145c86-9a97-41c2-9341-79b6db9206e4', host='192.168.0.3', port=9123} at path /coordinators/active.
sql-client error log:
Caused by: com.alibaba.fluss.exception.NetworkException: Disconnected from node 192.168.0.3:9123 (id: cs--1)
192.168.0.3
is the container IP, not the server IP.Anything else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: