Skip to content
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

documentation questions #5

Open
streaps opened this issue Aug 13, 2020 · 14 comments
Open

documentation questions #5

streaps opened this issue Aug 13, 2020 · 14 comments

Comments

@streaps
Copy link

streaps commented Aug 13, 2020

I have some questions that are not covered by the documentation:

Is port 9000 used for anything? (it shows up in netstat)

Do I need coturn or does kraken also work without a turnserver?
https://github.com/MixinNetwork/kraken#quick-start doesn't mention a turnserver,
but https://vec.io/posts/deploy-a-group-audio-conferencing-service does.

I'm running kraken inside a container with a local IP and and a reverse proxy on the public IP. Do I have to configure any additional port forwards? (UDP ports?)

@cedricfung
Copy link
Contributor

9000 is for the default pprof endpoint for profiling. I should make it disabled by default and add an option to enable it.

TURN is not a requirement, but recommended for better connection.

I'm not familiar with container configurations, sorry.

@streaps
Copy link
Author

streaps commented Aug 13, 2020

I'm not familiar with container configurations, sorry.

I guess kraken is listening on some UDP port for the webrtc connection or how is the audio transmitted?

@cedricfung
Copy link
Contributor

If you don't use turn, then you should open as many UDP ports as possible

@cedricfung
Copy link
Contributor

I use turn server so that I could only open one port to the public, the the turn server connect with kraken via vpc

@streaps
Copy link
Author

streaps commented Aug 14, 2020

If you don't use turn, then you should open as many UDP ports as possible

I cannot forward all 65535 UDP ports to kraken. With other voip software you usually can configure a range of UDP ports. It's not clear which port range is used by kraken.

@cedricfung
Copy link
Contributor

I will try to add some configurations for port range.

@streaps
Copy link
Author

streaps commented Aug 21, 2020

Thanks for the port range configuration commit. I'm still not sure how to use kraken and kraken.fm without a turn server.

I'm running kraken in an LXC container on a local IP, ports are forwarded from the public IP to the local IP. What should I put in TURNSERVER in kraken.fm/index.js or should I comment out iceServers and iceTransportPolicy?

I also don't know what the error message means:

$ ./kraken -c engine.toml 
2020/08/21 08:17:00 Setup(engine.toml)
2020/08/21 08:17:00 BuildEngine(IP: 10.0.2.3, Interface: eth0, Ports: 24000-24999)
2020/08/21 08:17:00 ServeRPC(:7000)
2020/08/21 08:17:00 RPC.handle(id: 75488318-0bdc-473f-97a0-31c4f4cc5001, method: subscribe, params: [time 9aa33dd5-6164-4c7f-81fb-26004e5c619d%3AaGhnZ2c%3D 213019e5-7ac9-4842-9ac8-ec4796841253])
2020/08/21 08:17:00 RPC.handle(id: 75488318-0bdc-473f-97a0-31c4f4cc5001, time: 0.001388s) ERROR {"status":202,"code":5002001,"description":"peer 9aa33dd5-6164-4c7f-81fb-26004e5c619d%3AaGhnZ2c%3D not found in time"}

@dhyaniarun1993
Copy link

Hi,

I am facing same issue while running the server and client on local.

2020/09/02 19:55:47 RPC.handle(id: 6a742ea7-cebb-4f03-952b-a6fb6ec84d34, time: 0.000050s) OK 2020/09/02 19:55:50 RPC.handle(id: d487636e-e619-4b3c-bbec-9a5bb2f33e37, method: subscribe, params: [96d1f1a8-2d1a-4f2e-ac3c-950f78278742 6314d731-8052-4456-8183-cea0791ddadb%3AQXJ1biBEaHlhbmk%3D 535d3bf6-edb8-4115-93d4-0a005185cd11]) 2020/09/02 19:55:50 RPC.handle(id: d487636e-e619-4b3c-bbec-9a5bb2f33e37, time: 0.000051s) OK 2020/09/02 19:55:51 HandlePeer(96d1f1a8-2d1a-4f2e-ac3c-950f78278742:6314d731-8052-4456-8183-cea0791ddadb%3AQXJ1biBEaHlhbmk%3D:535d3bf6-edb8-4115-93d4-0a005185cd11) OnTrackTimeout() 2020/09/02 19:55:51 PeerClose(96d1f1a8-2d1a-4f2e-ac3c-950f78278742:6314d731-8052-4456-8183-cea0791ddadb%3AQXJ1biBEaHlhbmk%3D:535d3bf6-edb8-4115-93d4-0a005185cd11) now 2020/09/02 19:55:51 PeerClose(96d1f1a8-2d1a-4f2e-ac3c-950f78278742:6314d731-8052-4456-8183-cea0791ddadb%3AQXJ1biBEaHlhbmk%3D:CLOSED) with <nil> 2020/09/02 19:55:51 HandlePeer(96d1f1a8-2d1a-4f2e-ac3c-950f78278742:6314d731-8052-4456-8183-cea0791ddadb%3AQXJ1biBEaHlhbmk%3D:CLOSED) OnConnectionStateChange(closed) 2020/09/02 19:55:51 HandlePeer(96d1f1a8-2d1a-4f2e-ac3c-950f78278742:6314d731-8052-4456-8183-cea0791ddadb%3AQXJ1biBEaHlhbmk%3D:CLOSED) OnICEConnectionStateChange(closed) 2020/09/02 19:55:53 RPC.handle(id: be9d782a-c188-4e80-9f69-fd3eb0ef66bb, method: subscribe, params: [96d1f1a8-2d1a-4f2e-ac3c-950f78278742 6314d731-8052-4456-8183-cea0791ddadb%3AQXJ1biBEaHlhbmk%3D 535d3bf6-edb8-4115-93d4-0a005185cd11]) 2020/09/02 19:55:53 RPC.handle(id: be9d782a-c188-4e80-9f69-fd3eb0ef66bb, time: 0.000053s) ERROR {"status":202,"code":5002002,"description":"peer 6314d731-8052-4456-8183-cea0791ddadb%3AQXJ1biBEaHlhbmk%3D closed in 96d1f1a8-2d1a-4f2e-ac3c-950f78278742"} 2020/09/02 19:55:56 RPC.handle(id: 86a81ba2-dd12-4d1a-a873-8086b8f42652, method: subscribe, params: [96d1f1a8-2d1a-4f2e-ac3c-950f78278742 6314d731-8052-4456-8183-cea0791ddadb%3AQXJ1biBEaHlhbmk%3D 535d3bf6-edb8-4115-93d4-0a005185cd11]) 2020/09/02 19:55:56 RPC.handle(id: 86a81ba2-dd12-4d1a-a873-8086b8f42652, time: 0.000049s) ERROR {"status":202,"code":5002002,"description":"peer 6314d731-8052-4456-8183-cea0791ddadb%3AQXJ1biBEaHlhbmk%3D closed in 96d1f1a8-2d1a-4f2e-ac3c-950f78278742"}

Were you able to solve the issue?

@cedricfung
Copy link
Contributor

To run the client and server in local, please do this modification in index.js

   const configuration = {
-    iceServers: [{
-      urls: TURNSERVER,
-      username: "webrtc",
-      credential: "turnpassword"
-    }],
-    iceTransportPolicy: 'relay',
+    iceTransportPolicy: 'all',

@streaps
Copy link
Author

streaps commented Sep 3, 2020

it's still not working for me.

I wonder if it has to do with the non-public IP that kraken is using. Is there a way to configure/set the public IP?

@cedricfung
Copy link
Contributor

Maybe change the interface name in the configuration? I'm not familiar with container, maybe you could try something without container at first?

@streaps
Copy link
Author

streaps commented Sep 3, 2020

The interface name is correct (eth0). I just tested it without a container and it seems to work fine. I guess all it needs to work inside a container is a configuration option to set the IP address.

I'm running a webrtc proxy for Mumble and it works fine insider a container with NAT.
https://github.com/Johni0702/mumble-web-proxy#firewalls-or-nat

@cedricfung
Copy link
Contributor

Please try the new configuration.

@streaps
Copy link
Author

streaps commented Sep 3, 2020

looks good :). no errors in the log and audio works between mobile and desktop browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants