Git Product home page Git Product logo

Comments (9)

paullouisageneau avatar paullouisageneau commented on June 16, 2024

Could you please provide a description of the failing setup (clients, network topology, Internet connectivity type, etc)? In addition, any sequence of events, logs, or errors messages would be useful (you can run violet with the --verbose flag).

from violet.

norayrmamulyan53 avatar norayrmamulyan53 commented on June 16, 2024

Could you please provide a description of the failing setup (clients, network topology, Internet connectivity type, etc)? In addition, any sequence of events, logs, or errors messages would be useful (you can run violet with the --debug flag).

I am connecting to STUN server using Javascript and using simple-peer library.
This is configuration.

const DEFAULT_PEER_OPTIONS = {
  initiator: location.hash === '#init',
  trickle: false,
  config: {
    'iceServers': [
      { url: 'stun:91.195.255.172:3478' },
    ]
  }

And this is the error.

WebRTC: ICE failed, add a TURN server and see about:webrtc for more details
Uncaught Error: Ice connection failed.
    _onIceStateChange index.js:720
    oniceconnectionstatechange index.js:112
index.js:720
Uncaught (in promise) DOMException: The fetching process for the media resource was aborted by the user agent at the user's request.
Uncaught (in promise) DOMException: The fetching process for the media resource was aborted by the user agent at the user's request.

from violet.

paullouisageneau avatar paullouisageneau commented on June 16, 2024

Thanks for the elements. What is the Internet connectivity type of the two peers? Are they behind large-scale NAT?

Are the srflx candidates properly generated on both sides? (you can see that on about:webrtc in Firefox, or about:webrtc-internals in Chrome ). If the srflx candidates are there with the proper IPv4 public addresses, you may be in a situation where each peer is behind a problematic endpoint-dependant (aka symmetric) NAT. In that case, the only way to connect the peers in through a TURN server.

from violet.

norayrmamulyan53 avatar norayrmamulyan53 commented on June 16, 2024

Thanks for the elements. What is the Internet connectivity type of the two peers? Are they behind large-scale NAT?

Are the srflx candidates properly generated on both sides? (you can see that on about:webrtc in Firefox, or about:webrtc-internals in Chrome ). If the srflx candidates are there with the proper IPv4 public addresses, you may be in a situation where each peer is behind a problematic endpoint-dependant (aka symmetric) NAT. In that case, the only way to connect the peers in through a TURN server.

  • Yes i assume they are behind CGNAT, so can i get around somehow ??

  • I gather srflx candidates using either STUN/TURN servers. But i can't make connection even using TURN server - i've set up the violet in the Raspberry PI and have made port mapping (to be seen outside the NAT) . What could be the problem ?

I can make connections only when they behind the same NAT, using the host candidate. When it comes to STUN/TURN it gives an ICE error (the description is above, plus the TURN server).

Thanks.

from violet.

paullouisageneau avatar paullouisageneau commented on June 16, 2024

Yes i assume they are behind CGNAT, so can i get around somehow ??

In that case you need a TURN server.

I gather srflx candidates using either STUN/TURN servers. But i can't make connection even using TURN server - i've set up the violet in the Raspberry PI and have made port mapping (to be seen outside the NAT) . What could be the problem ?

A TURN server should give you a relay candidate in addition to a srflx one. If there is no relay candidate, then the TURN server is not set up correctly.

The TURN server should ideally be deployed on a machine with open Internet access. Behind a NAT, it could work, but it's a bit tricky: in addition to the server port, you have to redirect the entire UDP relay port range, and set the public IP address in the options (the corresponding option for Violet is --external).

Is your TURN server deployed on the same NAT as one of the peers? If you can do port mapping, it's probably not a CGNAT and STUN should actually work.

from violet.

paullouisageneau avatar paullouisageneau commented on June 16, 2024

Any update on this?

from violet.

saroamirkhanyan avatar saroamirkhanyan commented on June 16, 2024

We could not connect computers outside the LAN

from violet.

saroamirkhanyan avatar saroamirkhanyan commented on June 16, 2024

We have tried many options but no one has worked, So we have stopped working in that way.

from violet.

paullouisageneau avatar paullouisageneau commented on June 16, 2024

Well in the last message you were trying a very non-conventional setup with a TURN server behind a NAT, I would definitely need more information than "there is an ICE error" to be able to help. I'm closing this then, please re-open if needed.

from violet.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.