Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

AWS Ec2 Deployement #598

Open
vmwsree opened this issue Jan 15, 2022 · 20 comments
Open

AWS Ec2 Deployement #598

vmwsree opened this issue Jan 15, 2022 · 20 comments

Comments

@vmwsree
Copy link

vmwsree commented Jan 15, 2022

I deployed the ion server on ec2. The security group allowed all traffic. I tried running the echo and other program.. i was receiving text messages at the remote end. but video stream was not coming in the remote end. i tried running the server on local everything worked perfectly

@jason-shen
Copy link

jason-shen commented Jan 16, 2022

you need to allow udp ports as well, as thats where the video stuff goes through, will close this as this is not an ion related issue, reopen it if you still have issues

@vmwsree
Copy link
Author

vmwsree commented Jan 16, 2022

@jason-shen I really respect your product. but as I mentioned when I allowed all traffic means both UDP and TCP, I even tried digital ocean servers without any gateway. Currently, the demo is hosted at https://startupsocial.app. Your deployment documentation is there but it's very unclear and short of words, and not a single video shows the current version being deployed.
Digital Ocean Deployment:
https://startupsocial.app
AWS Deployed
http://13.234.67.240/
http://13.234.67.240:5552 (ws running on 5552)
Security Group Conf
https://ibb.co/XVgVDxh

@jason-shen
Copy link

what errors you getting from digital ocean deploy ?

@jason-shen
Copy link

the aws won't work you need https to have video going

@jason-shen
Copy link

just for your ref i have written something here too here

@jason-shen
Copy link

also how did you deploy it? docker? or

@vmwsree
Copy link
Author

vmwsree commented Jan 16, 2022

Digital Ocean Deployment:
https://startupsocial.app is here you can check out the demo, I've used docker for both (ion server and ion web demo)deployments. I can see the chat messages and joining info, peer list, but not the video or audio stream

@vmwsree
Copy link
Author

vmwsree commented Jan 16, 2022

I'm using the following toml for sfu. please let me know if I have to change any parameters.Already the domain name SSL is handled by caddy (docker).

[global]
# data center id
dc = "dc1"

[nats]
url = "nats://127.0.0.1:4222"


[sfu]
# Ballast size in MiB, will allocate memory to reduce the GC trigger upto 2x the
# size of ballast. Be aware that the ballast should be less than the half of memory
# available.
ballast = 0
# enable prometheus sfu statistics
withstats = false

[router]
# Limit the remb bandwidth in kbps
# zero means no limits
maxbandwidth = 1500
# max number of video tracks packets the SFU will keep track
maxpackettrack = 500
# Sets the audio level volume threshold.
# Values from [0-127] where 0 is the loudest.
# Audio levels are read from rtp extension header according to:
# https://tools.ietf.org/html/rfc6464
audiolevelthreshold = 40
# Sets the interval in which the SFU will check the audio level
# in [ms]. If the active speaker has changed, the sfu will
# emit an event to clients.
audiolevelinterval=1000
# Sets minimum percentage of events required to fire an audio level
# according to the expected events from the audiolevelinterval,
# calculated as audiolevelinterval/packetization time (20ms for 8kHz)
# Values from [0-100]
audiolevelfilter = 20

[router.simulcast]
# Prefer best quality initially
bestqualityfirst = true
# EXPERIMENTAL enable temporal layer change is currently an experimental feature,
# enable only for testing.
enabletemporallayer = false

[webrtc]
# Single port, portrange will not work if you enable this
singleport = 5000

# Range of ports that ion accepts WebRTC traffic on
# Format: [min, max]   and max - min >= 100
#portrange = [5000, 5200]
# if sfu behind nat, set iceserver
# [[webrtc.iceserver]]
# urls = ["stun:stun.stunprotocol.org:3478"]
# [[webrtc.iceserver]]
# urls = ["turn:turn.awsome.org:3478"]
# username = "awsome"
# credential = "awsome"

# sdp semantics:
# "unified-plan"
# "plan-b"
# "unified-plan-with-fallback"
sdpsemantics = "unified-plan"
# toggle multicast dns support: https://tools.ietf.org/html/draft-mdns-ice-candidates-00
mdns = true

[webrtc.candidates]
# In case you're deploying ion-sfu on a server which is configured with
# a 1:1 NAT (e.g., Amazon EC2), you might want to also specify the public
# address of the machine using the setting below. This will result in
# all host candidates (which normally have a private IP address) to
# be rewritten with the public address provided in the settings. As
# such, use the option with caution and only if you know what you're doing.
# Multiple public IP addresses can be specified as a comma separated list
# if the sfu is deployed in a DMZ between two 1-1 NAT for internal and
# external users.
nat1to1 = ["64.227.170.116"]
icelite = true

[webrtc.timeouts]
# The duration in [sec] without network activity before a ICE Agent is considered disconnected
disconnected = 5
# The duration in [sec] without network activity before a ICE Agent is considered failed after disconnected
failed = 25
# How often in [sec] the ICE Agent sends extra traffic if there is no activity, if media is flowing no traffic will be sent
keepalive = 2

[turn]
# Enables embeded turn server
enabled = false
# Sets the realm for turn server
realm = "ion"
# The address the TURN server will listen on.
address = "0.0.0.0:3478"
# Certs path to config tls/dtls
# cert="path/to/cert.pem"
# key="path/to/key.pem"
# Port range that turn relays to SFU
# WARNING: It shouldn't overlap webrtc.portrange
# Format: [min, max]
# portrange = [5201, 5400]
[turn.auth]
# Use an auth secret to generate long-term credentials defined in RFC5389-10.2
# NOTE: This takes precedence over `credentials` if defined.
# secret = "secret"
# Sets the credentials pairs
credentials = "pion=ion,pion2=ion2"

[log]
# 0 - INFO 1 - DEBUG 2 - TRACE
v = 1

@jason-shen
Copy link

hash these 2 out
#nat1to1 = ["64.227.170.116"]
#icelite = true

and give it a try

@jason-shen jason-shen reopened this Jan 16, 2022
@vmwsree
Copy link
Author

vmwsree commented Jan 16, 2022

hash these 2 out #nat1to1 = ["64.227.170.116"] #icelite = true

and give it a try

Still, no video output, is there any particular log that I should be looking for to see the sfu video track

@vmwsree
Copy link
Author

vmwsree commented Jan 16, 2022

signal_1    | [2022-01-16 16:14:59.966]  INFO default: [signal.go:135] [signal.(*Signal).Director] fullMethodName: /room.RoomSignal/Signal, md map[:authority:[startupsocial.app] authorization:[token] content-type:[application/grpc+proto] x-grpc-web:[1]]
app-room_1  | [2022-01-16 16:14:59.969]  INFO default: [room_signal.go:55] [server.(*RoomSignalService).Signal] [C->S]=&{Join:peer:{sid:"ion" uid:"local-user" displayName:"new peer" destination:"webrtc://ion/peer1" protocol:WebRTC avatar:"string" vendor:"string"}}
app-room_1  | [2022-01-16 16:14:59.969]  INFO default: [room.go:336] [server.(*Room).broadcastPeerEvent] event=Peer:{sid:"ion" uid:"local-user" displayName:"new peer" destination:"webrtc://ion/peer1" protocol:WebRTC avatar:"string" vendor:"string"}
app-room_1  | [2022-01-16 16:14:59.973]  INFO default: [room_signal.go:243] [server.(*RoomSignalService).Join] Join OK: replay=&{Join:success:true room:{sid:"ion"}}
app-room_1  | [2022-01-16 16:14:59.974]  INFO default: [room_signal.go:63] [server.(*RoomSignalService).Signal] [S->C]=&{Join:success:true room:{sid:"ion"}}
sfu_1       | [2022-01-16 16:15:05.049] DEBUG default: [service.go:346] [sfu.(*SFUService).Signal] [C=>S] description: offer v=0
sfu_1       | o=- 1526614031556696516 3 IN IP4 127.0.0.1
sfu_1       | s=-
sfu_1       | t=0 0
sfu_1       | a=group:BUNDLE 0 1 2
sfu_1       | a=extmap-allow-mixed
sfu_1       | a=msid-semantic: WMS 7e884b15-1710-44d0-8e60-d1f8325a1b76
sfu_1       | m=application 51209 UDP/DTLS/SCTP webrtc-datachannel
sfu_1       | c=IN IP4 171.49.205.20
sfu_1       | a=candidate:4133636635 1 udp 2122262783 2401:4900:1f2a:84a:c111:b43f:eee5:b4e6 57595 typ host generation 0 network-id 2 network-cost 10
sfu_1       | a=candidate:505434299 1 udp 2122194687 192.168.1.6 51209 typ host generation 0 network-id 1 network-cost 10
sfu_1       | a=candidate:3078610798 1 udp 1685987071 171.49.205.20 51209 typ srflx raddr 192.168.1.6 rport 51209 generation 0 network-id 1 network-cost 10
sfu_1       | a=candidate:3101800171 1 tcp 1518283007 2401:4900:1f2a:84a:c111:b43f:eee5:b4e6 9 typ host tcptype active generation 0 network-id 2 network-cost 10
sfu_1       | a=candidate:1352903755 1 tcp 1518214911 192.168.1.6 9 typ host tcptype active generation 0 network-id 1 network-cost 10
sfu_1       | a=ice-ufrag:Qwzl
sfu_1       | a=ice-pwd:cCA1j/sjLv1D5K5yJS5Eiq7z
sfu_1       | a=ice-options:trickle
sfu_1       | a=fingerprint:sha-256 FD:B0:DE:8F:1E:1E:B6:60:31:FA:F5:4A:AA:F2:0F:A5:F8:D4:D1:C9:2E:49:B7:0C:AA:02:4D:53:24:50:0B:80
sfu_1       | a=setup:actpass
sfu_1       | a=mid:0
sfu_1       | a=sctp-port:5000
sfu_1       | a=max-message-size:262144
sfu_1       | m=audio 9 UDP/TLS/RTP/SAVPF 111
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=rtcp:9 IN IP4 0.0.0.0
sfu_1       | a=ice-ufrag:Qwzl
sfu_1       | a=ice-pwd:cCA1j/sjLv1D5K5yJS5Eiq7z
sfu_1       | a=ice-options:trickle
sfu_1       | a=fingerprint:sha-256 FD:B0:DE:8F:1E:1E:B6:60:31:FA:F5:4A:AA:F2:0F:A5:F8:D4:D1:C9:2E:49:B7:0C:AA:02:4D:53:24:50:0B:80
sfu_1       | a=setup:actpass
sfu_1       | a=mid:1
sfu_1       | a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
sfu_1       | a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
sfu_1       | a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
sfu_1       | a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
sfu_1       | a=sendonly
sfu_1       | a=msid:7e884b15-1710-44d0-8e60-d1f8325a1b76 4d712d53-e236-464d-b4cf-2b61ed743568
sfu_1       | a=rtcp-mux
sfu_1       | a=rtpmap:111 opus/48000/2
sfu_1       | a=rtcp-fb:111 transport-cc
sfu_1       | a=fmtp:111 minptime=10;useinbandfec=1
sfu_1       | a=ssrc:4185334186 cname:sObZcN4ys4eAPv2d
sfu_1       | a=ssrc:4185334186 msid:7e884b15-1710-44d0-8e60-d1f8325a1b76 4d712d53-e236-464d-b4cf-2b61ed743568
sfu_1       | a=ssrc:4185334186 mslabel:7e884b15-1710-44d0-8e60-d1f8325a1b76
sfu_1       | a=ssrc:4185334186 label:4d712d53-e236-464d-b4cf-2b61ed743568
sfu_1       | m=video 9 UDP/TLS/RTP/SAVPF 96
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=rtcp:9 IN IP4 0.0.0.0
sfu_1       | a=ice-ufrag:Qwzl
sfu_1       | a=ice-pwd:cCA1j/sjLv1D5K5yJS5Eiq7z
sfu_1       | a=ice-options:trickle
sfu_1       | a=fingerprint:sha-256 FD:B0:DE:8F:1E:1E:B6:60:31:FA:F5:4A:AA:F2:0F:A5:F8:D4:D1:C9:2E:49:B7:0C:AA:02:4D:53:24:50:0B:80
sfu_1       | a=setup:actpass
sfu_1       | a=mid:2
sfu_1       | a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
sfu_1       | a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
sfu_1       | a=extmap:13 urn:3gpp:video-orientation
sfu_1       | a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
sfu_1       | a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
sfu_1       | a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
sfu_1       | a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
sfu_1       | a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
sfu_1       | a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
sfu_1       | a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
sfu_1       | a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
sfu_1       | a=sendonly
sfu_1       | a=msid:7e884b15-1710-44d0-8e60-d1f8325a1b76 b039057f-f27f-41df-92aa-7107ce37ee74
sfu_1       | a=rtcp-mux
sfu_1       | a=rtcp-rsize
sfu_1       | a=rtpmap:96 VP8/90000
sfu_1       | a=rtcp-fb:96 goog-remb
sfu_1       | a=rtcp-fb:96 transport-cc
sfu_1       | a=rtcp-fb:96 ccm fir
sfu_1       | a=rtcp-fb:96 nack
sfu_1       | a=rtcp-fb:96 nack pli
sfu_1       | a=rid:f send
sfu_1       | a=rid:h send
sfu_1       | a=simulcast:send f;h
sfu_1       |
sfu_1       | [2022-01-16 16:15:05.049] [INFO] [peer.go:199] => PeerLocal got offer logger=ion-sfu-node/sfu peer_id=local-user v=0
sfu_1       | [2022-01-16 16:15:05.055] [INFO] [peer.go:210] => PeerLocal send answer logger=ion-sfu-node/sfu peer_id=local-user v=0
sfu_1       | [2022-01-16 16:15:05.056] DEBUG default: [service.go:354] [sfu.(*SFUService).Signal] [S=>C] description: answer v=0
sfu_1       | o=- 3992717384277872772 1642349693 IN IP4 0.0.0.0
sfu_1       | s=-
sfu_1       | t=0 0
sfu_1       | a=fingerprint:sha-256 9A:02:8E:E0:02:9E:B3:88:9F:FF:0E:91:F4:C6:8D:95:14:4B:38:7D:B8:EB:59:15:36:DF:82:1D:C1:93:51:DC
sfu_1       | a=ice-lite:ice-lite
sfu_1       | a=group:BUNDLE 0 1 2
sfu_1       | m=application 9 UDP/DTLS/SCTP webrtc-datachannel
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=setup:active
sfu_1       | a=mid:0
sfu_1       | a=sendrecv
sfu_1       | a=sctp-port:5000
sfu_1       | a=ice-ufrag:ZwzDtlvGjSRROnmK
sfu_1       | a=ice-pwd:OboENPOAJXuKlNpeVbbvAtMxvQCFxPRj
sfu_1       | a=candidate:2878742611 1 udp 2130706431 127.0.0.1 5000 typ host
sfu_1       | a=candidate:2878742611 2 udp 2130706431 127.0.0.1 5000 typ host
sfu_1       | a=end-of-candidates
sfu_1       | m=audio 9 UDP/TLS/RTP/SAVPF 111
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=setup:active
sfu_1       | a=mid:1
sfu_1       | a=ice-ufrag:ZwzDtlvGjSRROnmK
sfu_1       | a=ice-pwd:OboENPOAJXuKlNpeVbbvAtMxvQCFxPRj
sfu_1       | a=rtcp-mux
sfu_1       | a=rtcp-rsize
sfu_1       | a=rtpmap:111 opus/48000/2
sfu_1       | a=fmtp:111 minptime=10;useinbandfec=1
sfu_1       | a=rtcp-fb:111 transport-cc
sfu_1       | a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
sfu_1       | a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
sfu_1       | a=recvonly
sfu_1       | m=video 9 UDP/TLS/RTP/SAVPF 96
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=setup:active
sfu_1       | a=mid:2
sfu_1       | a=ice-ufrag:ZwzDtlvGjSRROnmK
sfu_1       | a=ice-pwd:OboENPOAJXuKlNpeVbbvAtMxvQCFxPRj
sfu_1       | a=rtcp-mux
sfu_1       | a=rtcp-rsize
sfu_1       | a=rtpmap:96 VP8/90000
sfu_1       | a=rtcp-fb:96 goog-remb
sfu_1       | a=rtcp-fb:96 transport-cc
sfu_1       | a=rtcp-fb:96 ccm fir
sfu_1       | a=rtcp-fb:96 nack
sfu_1       | a=rtcp-fb:96 nack pli
sfu_1       | a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
sfu_1       | a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
sfu_1       | a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
sfu_1       | a=rid:f recv
sfu_1       | a=rid:h recv
sfu_1       | a=simulcast:recv f;h
sfu_1       | a=recvonly
sfu_1       |
sfu_1       | [2022-01-16 16:15:07.505] DEBUG default: [service.go:346] [sfu.(*SFUService).Signal] [C=>S] description: offer v=0
sfu_1       | o=- 6657403920986606528 3 IN IP4 127.0.0.1
sfu_1       | s=-
sfu_1       | t=0 0
sfu_1       | a=group:BUNDLE 0
sfu_1       | a=extmap-allow-mixed
sfu_1       | a=msid-semantic: WMS
sfu_1       | m=application 9 UDP/DTLS/SCTP webrtc-datachannel
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=ice-ufrag:04Gd
sfu_1       | a=ice-pwd:peTu8Qx5tg/1x1Ptivf9Jum1
sfu_1       | a=ice-options:trickle
sfu_1       | a=fingerprint:sha-256 06:7B:D8:20:C4:75:BA:91:C5:8D:C0:32:3B:D9:06:10:DC:16:47:60:C6:D7:CB:0F:15:98:B6:A4:12:BF:E1:FD
sfu_1       | a=setup:actpass
sfu_1       | a=mid:0
sfu_1       | a=sctp-port:5000
sfu_1       | a=max-message-size:262144
sfu_1       |
sfu_1       | [2022-01-16 16:15:07.505] [INFO] [peer.go:199] => PeerLocal got offer logger=ion-sfu-node/sfu peer_id=remote-user v=0
sfu_1       | [2022-01-16 16:15:07.507] DEBUG default: [service.go:418] [sfu.(*SFUService).Signal] [C=>S] trickle: target 0, candidate candidate:4133636635 1 udp 2122262783 2401:4900:1f2a:84a:c111:b43f:eee5:b4e6 62889 typ host generation 1 ufrag 5L4o network-id 2 network-cost 10
sfu_1       | [2022-01-16 16:15:07.508] [INFO] [peer.go:243] => PeerLocal trickle logger=ion-sfu-node/sfu peer_id=local-user v=0
sfu_1       | [2022-01-16 16:15:07.508] DEBUG default: [service.go:346] [sfu.(*SFUService).Signal] [C=>S] description: offer v=0
sfu_1       | o=- 1526614031556696516 4 IN IP4 127.0.0.1
sfu_1       | s=-
sfu_1       | t=0 0
sfu_1       | a=group:BUNDLE 0 1 2
sfu_1       | a=extmap-allow-mixed
sfu_1       | a=msid-semantic: WMS 7e884b15-1710-44d0-8e60-d1f8325a1b76
sfu_1       | m=application 9 UDP/DTLS/SCTP webrtc-datachannel
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=ice-ufrag:5L4o
sfu_1       | a=ice-pwd:XbJMIN4e88CRfDPgZFfmKssC
sfu_1       | a=ice-options:trickle
sfu_1       | a=fingerprint:sha-256 FD:B0:DE:8F:1E:1E:B6:60:31:FA:F5:4A:AA:F2:0F:A5:F8:D4:D1:C9:2E:49:B7:0C:AA:02:4D:53:24:50:0B:80
sfu_1       | a=setup:actpass
sfu_1       | a=mid:0
sfu_1       | a=sctp-port:5000
sfu_1       | a=max-message-size:262144
sfu_1       | m=audio 9 UDP/TLS/RTP/SAVPF 111
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=rtcp:9 IN IP4 0.0.0.0
sfu_1       | a=ice-ufrag:5L4o
sfu_1       | a=ice-pwd:XbJMIN4e88CRfDPgZFfmKssC
sfu_1       | a=ice-options:trickle
sfu_1       | a=fingerprint:sha-256 FD:B0:DE:8F:1E:1E:B6:60:31:FA:F5:4A:AA:F2:0F:A5:F8:D4:D1:C9:2E:49:B7:0C:AA:02:4D:53:24:50:0B:80
sfu_1       | a=setup:actpass
sfu_1       | a=mid:1
sfu_1       | a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
sfu_1       | a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
sfu_1       | a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
sfu_1       | a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
sfu_1       | a=sendonly
sfu_1       | a=msid:7e884b15-1710-44d0-8e60-d1f8325a1b76 4d712d53-e236-464d-b4cf-2b61ed743568
sfu_1       | a=rtcp-mux
sfu_1       | a=rtpmap:111 opus/48000/2
sfu_1       | a=rtcp-fb:111 transport-cc
sfu_1       | a=fmtp:111 minptime=10;useinbandfec=1
sfu_1       | a=ssrc:4185334186 cname:sObZcN4ys4eAPv2d
sfu_1       | a=ssrc:4185334186 msid:7e884b15-1710-44d0-8e60-d1f8325a1b76 4d712d53-e236-464d-b4cf-2b61ed743568
sfu_1       | a=ssrc:4185334186 mslabel:7e884b15-1710-44d0-8e60-d1f8325a1b76
sfu_1       | a=ssrc:4185334186 label:4d712d53-e236-464d-b4cf-2b61ed743568
sfu_1       | m=video 9 UDP/TLS/RTP/SAVPF 96
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=rtcp:9 IN IP4 0.0.0.0
sfu_1       | a=ice-ufrag:5L4o
sfu_1       | a=ice-pwd:XbJMIN4e88CRfDPgZFfmKssC
sfu_1       | a=ice-options:trickle
sfu_1       | a=fingerprint:sha-256 FD:B0:DE:8F:1E:1E:B6:60:31:FA:F5:4A:AA:F2:0F:A5:F8:D4:D1:C9:2E:49:B7:0C:AA:02:4D:53:24:50:0B:80
sfu_1       | a=setup:actpass
sfu_1       | a=mid:2
sfu_1       | a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
sfu_1       | a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
sfu_1       | a=extmap:13 urn:3gpp:video-orientation
sfu_1       | a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
sfu_1       | a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
sfu_1       | a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
sfu_1       | a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
sfu_1       | a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
sfu_1       | a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
sfu_1       | a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
sfu_1       | a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
sfu_1       | a=sendonly
sfu_1       | a=msid:7e884b15-1710-44d0-8e60-d1f8325a1b76 b039057f-f27f-41df-92aa-7107ce37ee74
sfu_1       | a=rtcp-mux
sfu_1       | a=rtcp-rsize
sfu_1       | a=rtpmap:96 VP8/90000
sfu_1       | a=rtcp-fb:96 goog-remb
sfu_1       | a=rtcp-fb:96 transport-cc
sfu_1       | a=rtcp-fb:96 ccm fir
sfu_1       | a=rtcp-fb:96 nack
sfu_1       | a=rtcp-fb:96 nack pli
sfu_1       | a=rid:f send
sfu_1       | a=rid:h send
sfu_1       | a=simulcast:send f;h
sfu_1       |
sfu_1       | [2022-01-16 16:15:07.510] [INFO] [peer.go:199] => PeerLocal got offer logger=ion-sfu-node/sfu peer_id=local-user v=0
sfu_1       | [2022-01-16 16:15:07.511] [INFO] [peer.go:210] => PeerLocal send answer logger=ion-sfu-node/sfu peer_id=remote-user v=0
sfu_1       | [2022-01-16 16:15:07.516] DEBUG default: [service.go:354] [sfu.(*SFUService).Signal] [S=>C] description: answer v=0
sfu_1       | o=- 5618618232899454982 1642349693 IN IP4 0.0.0.0
sfu_1       | s=-
sfu_1       | t=0 0
sfu_1       | a=fingerprint:sha-256 5C:42:D6:2F:E3:5C:D9:65:B9:A7:C9:D5:AF:01:27:77:2D:68:01:F9:67:33:EC:E5:D9:2A:11:42:22:83:39:DB
sfu_1       | a=ice-lite:ice-lite
sfu_1       | a=group:BUNDLE 0
sfu_1       | m=application 9 UDP/DTLS/SCTP webrtc-datachannel
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=setup:active
sfu_1       | a=mid:0
sfu_1       | a=sendrecv
sfu_1       | a=sctp-port:5000
sfu_1       | a=ice-ufrag:AWqjqtkwwzfDbBEC
sfu_1       | a=ice-pwd:mXlckkNgsGDVbQKPqqhmgvgbeyamcllh
sfu_1       |
sfu_1       | [2022-01-16 16:15:07.516] DEBUG default: [service.go:418] [sfu.(*SFUService).Signal] [C=>S] trickle: target 0, candidate candidate:4133636635 1 udp 2122262783 2401:4900:1f2a:84a:c111:b43f:eee5:b4e6 57462 typ host generation 1 ufrag 04Gd network-id 2 network-cost 10
sfu_1       | [2022-01-16 16:15:07.517] [INFO] [peer.go:243] => PeerLocal trickle logger=ion-sfu-node/sfu peer_id=remote-user v=0
sfu_1       | [2022-01-16 16:15:07.512] [DEBUG] [peer.go:165] => on publisher ice candidate called for peer logger=ion-sfu-node/sfu peer_id=remote-user v=1
sfu_1       | [2022-01-16 16:15:07.517] DEBUG default: [service.go:145] [sfu.(*SFUService).Signal.func2] [S=>C] peer.OnIceCandidate: target = 0, candidate = candidate:2878742611 1 udp 2130706431 127.0.0.1 5000 typ host
sfu_1       | [2022-01-16 16:15:07.518] [DEBUG] [peer.go:165] => on publisher ice candidate called for peer logger=ion-sfu-node/sfu peer_id=remote-user v=1
sfu_1       | [2022-01-16 16:15:07.520] [INFO] [peer.go:210] => PeerLocal send answer logger=ion-sfu-node/sfu peer_id=local-user v=0
sfu_1       | [2022-01-16 16:15:07.521] [DEBUG] [peer.go:165] => on publisher ice candidate called for peer logger=ion-sfu-node/sfu peer_id=local-user v=1
sfu_1       | [2022-01-16 16:15:07.522] DEBUG default: [service.go:145] [sfu.(*SFUService).Signal.func2] [S=>C] peer.OnIceCandidate: target = 0, candidate = candidate:2878742611 1 udp 2130706431 127.0.0.1 5000 typ host
sfu_1       | [2022-01-16 16:15:07.523] [DEBUG] [peer.go:165] => on publisher ice candidate called for peer logger=ion-sfu-node/sfu peer_id=local-user v=1
sfu_1       | [2022-01-16 16:15:07.522] DEBUG default: [service.go:354] [sfu.(*SFUService).Signal] [S=>C] description: answer v=0
sfu_1       | o=- 3992717384277872772 1642349694 IN IP4 0.0.0.0
sfu_1       | s=-
sfu_1       | t=0 0
sfu_1       | a=fingerprint:sha-256 9A:02:8E:E0:02:9E:B3:88:9F:FF:0E:91:F4:C6:8D:95:14:4B:38:7D:B8:EB:59:15:36:DF:82:1D:C1:93:51:DC
sfu_1       | a=ice-lite:ice-lite
sfu_1       | a=group:BUNDLE 0 1 2
sfu_1       | m=application 9 UDP/DTLS/SCTP webrtc-datachannel
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=setup:active
sfu_1       | a=mid:0
sfu_1       | a=sendrecv
sfu_1       | a=sctp-port:5000
sfu_1       | a=ice-ufrag:jZsfroNtWdrEGGgF
sfu_1       | a=ice-pwd:PmpWMtJbVUFtfLwbwgpIDCtujRWNvFao
sfu_1       | m=audio 9 UDP/TLS/RTP/SAVPF 111
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=setup:active
sfu_1       | a=mid:1
sfu_1       | a=ice-ufrag:jZsfroNtWdrEGGgF
sfu_1       | a=ice-pwd:PmpWMtJbVUFtfLwbwgpIDCtujRWNvFao
sfu_1       | a=rtcp-mux
sfu_1       | a=rtcp-rsize
sfu_1       | a=rtpmap:111 opus/48000/2
sfu_1       | a=fmtp:111 minptime=10;useinbandfec=1
sfu_1       | a=rtcp-fb:111 transport-cc
sfu_1       | a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
sfu_1       | a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
sfu_1       | a=recvonly
sfu_1       | m=video 9 UDP/TLS/RTP/SAVPF 96
sfu_1       | c=IN IP4 0.0.0.0
sfu_1       | a=setup:active
sfu_1       | a=mid:2
sfu_1       | a=ice-ufrag:jZsfroNtWdrEGGgF
sfu_1       | a=ice-pwd:PmpWMtJbVUFtfLwbwgpIDCtujRWNvFao
sfu_1       | a=rtcp-mux
sfu_1       | a=rtcp-rsize
sfu_1       | a=rtpmap:96 VP8/90000
sfu_1       | a=rtcp-fb:96 goog-remb
sfu_1       | a=rtcp-fb:96 transport-cc
sfu_1       | a=rtcp-fb:96 ccm fir
sfu_1       | a=rtcp-fb:96 nack
sfu_1       | a=rtcp-fb:96 nack pli
sfu_1       | a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
sfu_1       | a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
sfu_1       | a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
sfu_1       | a=rid:f recv
sfu_1       | a=rid:h recv
sfu_1       | a=simulcast:recv f;h
sfu_1       | a=recvonly
sfu_1       |
sfu_1       | [2022-01-16 16:15:07.524] DEBUG default: [service.go:418] [sfu.(*SFUService).Signal] [C=>S] trickle: target 0, candidate candidate:505434299 1 udp 2122194687 192.168.1.6 50428 typ host generation 1 ufrag 04Gd network-id 1 network-cost 10
sfu_1       | [2022-01-16 16:15:07.525] [INFO] [peer.go:243] => PeerLocal trickle logger=ion-sfu-node/sfu peer_id=remote-user v=0
sfu_1       | [2022-01-16 16:15:07.524] DEBUG default: [service.go:418] [sfu.(*SFUService).Signal] [C=>S] trickle: target 0, candidate candidate:505434299 1 udp 2122194687 192.168.1.6 62136 typ host generation 1 ufrag 5L4o network-id 1 network-cost 10
sfu_1       | [2022-01-16 16:15:07.526] [INFO] [peer.go:243] => PeerLocal trickle logger=ion-sfu-node/sfu peer_id=local-user v=0
sfu_1       | [2022-01-16 16:15:07.550] DEBUG default: [service.go:418] [sfu.(*SFUService).Signal] [C=>S] trickle: target 0, candidate candidate:3078610798 1 udp 1685987071 171.49.205.20 62136 typ srflx raddr 192.168.1.6 rport 62136 generation 1 ufrag 5L4o network-id 1 network-cost 10
sfu_1       | [2022-01-16 16:15:07.551] [INFO] [peer.go:243] => PeerLocal trickle logger=ion-sfu-node/sfu peer_id=local-user v=0
sfu_1       | [2022-01-16 16:15:07.557] DEBUG default: [service.go:418] [sfu.(*SFUService).Signal] [C=>S] trickle: target 0, candidate candidate:3078610798 1 udp 1685987071 171.49.205.20 50428 typ srflx raddr 192.168.1.6 rport 50428 generation 1 ufrag 04Gd network-id 1 network-cost 10
sfu_1       | [2022-01-16 16:15:07.557] [INFO] [peer.go:243] => PeerLocal trickle logger=ion-sfu-node/sfu peer_id=remote-user v=0
sfu_1       | [2022-01-16 16:15:07.607] DEBUG default: [service.go:418] [sfu.(*SFUService).Signal] [C=>S] trickle: target 0, candidate candidate:1352903755 1 tcp 1518214911 192.168.1.6 9 typ host tcptype active generation 1 ufrag 5L4o network-id 1 network-cost 10
sfu_1       | [2022-01-16 16:15:07.607] [INFO] [peer.go:243] => PeerLocal trickle logger=ion-sfu-node/sfu peer_id=local-user v=0
sfu_1       | [2022-01-16 16:15:07.608] DEBUG default: [service.go:418] [sfu.(*SFUService).Signal] [C=>S] trickle: target 0, candidate candidate:3101800171 1 tcp 1518283007 2401:4900:1f2a:84a:c111:b43f:eee5:b4e6 9 typ host tcptype active generation 1 ufrag 5L4o network-id 2 network-cost 10
sfu_1       | [2022-01-16 16:15:07.608] DEBUG default: [service.go:418] [sfu.(*SFUService).Signal] [C=>S] trickle: target 0, candidate candidate:3101800171 1 tcp 1518283007 2401:4900:1f2a:84a:c111:b43f:eee5:b4e6 9 typ host tcptype active generation 1 ufrag 04Gd network-id 2 network-cost 10
sfu_1       | [2022-01-16 16:15:07.609] [INFO] [peer.go:243] => PeerLocal trickle logger=ion-sfu-node/sfu peer_id=remote-user v=0
sfu_1       | [2022-01-16 16:15:07.609] [INFO] [peer.go:243] => PeerLocal trickle logger=ion-sfu-node/sfu peer_id=local-user v=0
sfu_1       | [2022-01-16 16:15:07.613] DEBUG default: [service.go:418] [sfu.(*SFUService).Signal] [C=>S] trickle: target 0, candidate candidate:1352903755 1 tcp 1518214911 192.168.1.6 9 typ host tcptype active generation 1 ufrag 04Gd network-id 1 network-cost 10
sfu_1       | [2022-01-16 16:15:07.613] [INFO] [peer.go:243] => PeerLocal trickle logger=ion-sfu-node/sfu peer_id=remote-user v=0

@vmwsree
Copy link
Author

vmwsree commented Jan 16, 2022

I do see
WebSocket is already in CLOSING or CLOSED state.
WebSocket is already in CLOSING or CLOSED state.

error in console, I'm using caddy.

@vmwsree
Copy link
Author

vmwsree commented Jan 17, 2022

@jason-shen I m finally able to run. The final change in sfu.toml was
to uncomment

[[webrtc.iceserver]]
urls = ["stun:stun.stunprotocol.org:3478"]

and

nat1to1 = ["64.227.170.116"]
icelite = true

Should I uncomment turn server config also?

@jason-shen
Copy link

jason-shen commented Jan 17, 2022

you could for a more successful connection, as this is really due on networks, some network you will need turn, but its a small percentage of it though, but yeah it wouldn't hurt to have that as well.

and good to hear you have got it going, good stuff!

@jason-shen
Copy link

just a question, about your internet connection, normally you don't event need a stun to connect to the sfu, looks like you might have some kind of firewall with your internet

@vmwsree
Copy link
Author

vmwsree commented Jan 17, 2022

@jason-shen I did try connecting from my phone telecom provider and home wifi. both had issues in getting video stream. but text messages and everything was successful. It will be helpful if anyone here create a video deploying to major cloud provider. I will upload from my end, but a successful run using the default stun would be great.

@jason-shen
Copy link

i do have one you can check out here, but its for ion-sfu, but more less is the same here

@jason-shen
Copy link

@jason-shen I did try connecting from my phone telecom provider and home wifi. both had issues in getting video stream. but text messages and everything was successful. It will be helpful if anyone here create a video deploying to major cloud provider. I will upload from my end, but a successful run using the default stun would be great.

here is the issue, this is more of a webrtc thing that you just have to keep in mind, its not really a direct issue with ion it self, in some mobile provider/internet provider, ie, if your users are on a hotel wifi, 9/10 times you will need stun/turn. which is just an on going thing that you have to aware off, no matter what sfu, or even peer to peer. hope this clears up for you

@ahmed-adly-khalil
Copy link

@vmwsree just a question, was this a bare metal setup? didn't use kubernetes?

@luo199393
Copy link

这是 ws 不安全的问题,导致你的音视频连接被关闭了,问题再 signal.toml 配置,未启用安全的https导致的。
1、使用nginx代理5551端口流量,这里又存在一个问题是ws 没有ping pong后默认一分钟会关闭。
2、改为443端口或者配置证书

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

No branches or pull requests

4 participants