Jump to content

[Solved] Node/npm WebRTC/Webtorrent not working


Recommended Posts

Posted

Hi guys,
does anyone have an experience with running webtorrent-hybrid or webtorren-cli  (https://www.npmjs.com/package/webtorrent-cli) on Olinuxino MICRO or similar?
I have installed npm package,  started seeding, but instant.io doesn detect my  peer. The same example works on desktop without an issue. 
Can anyone try and confirm if it is working or not on A20 boards?

Posted

Hi everyone, 
does webtorrent-cli work on A20 boards? Olinuxino Micro specifically. I have installed node, webtorrent-cli, no errors while installing or running,  but peers do not get discovered by instant.io. The same example works fine on desktop PC, in a same network.  Any idea what is missing, or is it doable at all?

Posted

@Alexey,

 

Please do not multi-post the same issue in different sub-forums.

 

I merged both your posts together here, and moved the new combined thread to Common Issues subforum as I suspect it is going to be general software related rather than board or Armbian specific. If that proves not to be the case after further diagnosis, we can always move it back, later.

 

Back to the issue at hand, are you sure the appropriate ports are open/forwarded on your firewall, etc.?

Posted
20 minutes ago, TRS-80 said:

 

Please do not multi-post the same issue in different sub-forums.
I merged both your posts together here

thanks a lot for pointing the right place!

Threre are three machines behind the same NAT, running the same (?) webtorrent-cli. 2 of them work fine, one does not.  Decided to start with platform specifics.  I  suspect 2 possible reasons - WebRTC  does not work  and i dont know how to diagnose it,  that's why I'm asking if  somewone can cofirm that it's working, or something is blocking peer connections on the OS. Does the OS have SELinux enabled in restriction mode? 

Posted
3 minutes ago, Alexey said:

Does the OS have SELinux enabled in restriction mode?

 

I do not know the answer to this. Maybe someone will come along who does. My suspicion is "no" however.

 

In general, I think you are on the right track. Look at what else is common with problem device, that is not in common with other 2 that are working, etc...

 

Good luck with your problem, sorry I could not help more as I have no experience with this.

 

Do remember to post solution if/when you find one, to help others in future! :)

Posted

Hi there, 
after days of researching I have finally found what caused the issue. 
Checked if STUN is working with my NAT - works fine  (stunclient --mode=full stun.stunprotocol.org reports success).
Checked if arm7 version of webrtc library is installed ("export TARGET_ARCH=arm" before npm install).
Compared the debug output of webtorrent (DEBUG=bittorrent-tracker:client webtorrent) of working and non-working setups. Bingo! WebSocketTracker output was missing on malfunctioning system. After analyzing the source code, realized that the only reason why it may happen is different behavior of API functions. Yes, outdated Node.js.
Solution is upgrade to Node.js 10.0+ as shown here:
https://joshtronic.com/2018/05/08/how-to-install-nodejs-10-on-ubuntu-1804-lts/

After upgrade i can seed files with streaming webtorrent, works as a charm. 
 

  • TRS-80 changed the title to [Solved] Node/npm WebRTC/Webtorrent not working
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines