libp2p / js-libp2p-webrtc-star

libp2p WebRTC transport that includes a discovery mechanism provided by the signalling-star
https://libp2p.io
Other
320 stars 96 forks source link

wrtc-star1.par.dwebops.pub pubsub stopped working #258

Open StationedInTheField opened 3 years ago

StationedInTheField commented 3 years ago

Hey, we're using wrtc-star1.par.dwebops.pub for pubsub in our example and it broke yesterday. The other address works but on this address peers listening to the same topic can't see each other

vasco-santos commented 3 years ago

Hey @StationedInTheField Do peers connect via it, or they fail to connect?

vasco-santos commented 3 years ago

I just tried out the wrtc-star1.par.dwebops.pub and the connectivity seems fine. Can you give me more details?

StationedInTheField commented 3 years ago

They connect, 10 swarm peers listed and Swarm listening on /dns4/wrtc-star1.par.dwebops.pub/tcp/443/wss/p2p-webrtc-star/p2p/QmXNudapyb5pxgEC9WALkaeohb8gC8pmKw9Nr4HApgpCDV but the peers can't see each other on the same topic. If I go and change it to the address here: https://github.com/QuestNetwork/qDesk/blob/0.9.4/src/app/swarm.json it works again.

vasco-santos commented 3 years ago

Maybe it was some availability issue. Have you tried again? I don't see any reason for only one of the public star servers to work. Just to be clear, are you connection all the peers to that single star server for trying it? One last observation, you should run your own star server at some point and do not rely on the public ones as there availability is not guaranteed and are shared by a lot of people experimenting.

StationedInTheField commented 3 years ago

It's really strange and it still isn't working while on the other address it works.

Yeah of course. We are running our own star node and recommend every business that uses it to run their own that's why we have the editable list in Settings > IPFS. But this is our example app, so developers can test it. I'm implementing some additional peering, so the app always has or at least can request a list of working star nodes.

vasco-santos commented 3 years ago

It's really strange and it still isn't working while on the other address it works.

What I was trying to understand is if both pubsub subscriber peers are using the same star server. I will make some experiments meanwhile

StationedInTheField commented 3 years ago

yes, they're the same app with the same configuration, just different repo names and user data - and like i said works fine with the sjc address

vasco-santos commented 3 years ago

I could not replicate this. If you can get any extra information, or a replication test, it would be super helpful

vasco-santos commented 3 years ago

I am closing this issue! Feel free to re-open if this is still an issue

StationedInTheField commented 3 years ago

Well you can test it with the Web Demo, it also happen with the sjc star configured now:

https://gateway.pinata.cloud/ipfs/QmZNvMbTPCEW1vebsEc5L2dx18PeYCKgwP5oMCVREkmr3p/

On chat in the left bar via the context menu on the + icon you can create a channel, then on the right bar in settings, you can create an invite, in a second browser window you can then paste the invite via "join channel" in the context menu on the + icon on the left.

The console logs are very verbose and whenever a message in a channel is received there's output from pubsub.subscribe and with both of those windows you can see that messages sent in window a (sayHi would be the one to ask to join) are not received in window b. If I however use one of our stars, it works with no issues just like it did on the par initially, and then on the sjc for a while.

Relevant code for the pubsub is in: https://github.com/QuestNetwork/quest-pubsub-js - But it's just simple subscribe and publish.

vasco-santos commented 3 years ago

I could replicate now via the libp2p in the browser example that the peers do not get discovered+connected using /dns4/wrtc-star1.par.dwebops.pub/tcp/443/wss/p2p-webrtc-star. The peers are able to connect to the signal server, and emit the ss-join message. However, it seems that the server is not getting it correctly. The other star server is working perfectly.

@mburns Can you provide us logs from that server?

cc @jacobheun

mburns commented 3 years ago

Looks like an old image got deployed (libp2p/websocket-star-rendezvous:v0.3.0).

I've stopped that and got libp2p/js-libp2p-webrtc-star running again, which matches wrtc-star2.

vasco-santos commented 3 years ago

Thanks @mburns this is now working on the example. @StationedInTheField can you let me know if this is sorted out on your end?