anyproto / any-sync-dockercompose

docker-compose for testing any-sync
MIT License
234 stars 29 forks source link

a simple question about yamux and quic ports #55

Closed TaoRone closed 1 month ago

TaoRone commented 1 month ago

Have you read a contributing guide?

Current Behavior

I'm sorry, my knowledge of computer networks is not solid enough, but after my search, I would like to ask a simple question: Can't yamux and quic ports be the same In theory, one is TCP and the other is UDP, should it be possible to set them to the same port simultaneously? However, during actual deployment, the required configuration files cannot be generated.

Actually, my current network conditions only have 15 ports available for me to use, so I will try to use the fewest ports to achieve this great project~

Expected Behavior

Successfully on the basis of the same port (such as yamux and Quic uses 10000 at the same time)

Steps To Reproduce

I tried running this project on different ports first, and it worked fine. Then make stop make clean and make start Project tip: Container any sync dockercompose any sync coordinator bootstrap service 'any sync coordinator bootstrap' did not complete successfully: exit 139.4s coordinator

Environment

- OS:debian
- Version:12

Anything else?

No response

fb929 commented 1 month ago

Yes, it is possible. And after these changes, it even works. https://github.com/anyproto/any-sync-dockercompose/commit/ea4bd985ae57c7b6793e5a3850cc1356196afe62 https://github.com/anyproto/any-sync-dockercompose/commit/be138faf23b96310429b83d02d9b85f270070320

Execute the following commands:

cat <<EOF >> .env.override
ANY_SYNC_NODE_1_QUIC_PORT=1001
ANY_SYNC_NODE_2_QUIC_PORT=1002
ANY_SYNC_NODE_3_QUIC_PORT=1003
ANY_SYNC_COORDINATOR_QUIC_PORT=1004
ANY_SYNC_FILENODE_QUIC_PORT=1005
ANY_SYNC_CONSENSUSNODE_QUIC_PORT=1006
EOF

make restart
fb929 commented 1 month ago

@TaoRone Is your problem solved?