Hi everyone,
I’m encountering an issue with my Janus WebRTC setup and would appreciate any guidance or suggestions.
Setup Details:
- Server: Running on Ubuntu
- Network Configuration:
- Nginx is configured as a reverse proxy for Janus.
- Ports 40000-65535/udp are open.
Nginx config:
server {
server_name mydomen;
location / {
root /usr/share/nginx/html;
index index.html;
}
location /janus {
proxy_pass http://127.0.0.1:8088;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /ws {
proxy_pass http://127.0.0.1:8188;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 86400;
proxy_send_timeout 86400;
proxy_connect_timeout 86400;
proxy_buffering off;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /; # managed by Certbot
ssl_certificate_key /; # managed by Certbot
include /; # managed by Certbot
ssl_dhparam /; # managed by Certbot
}
server {
if ($host = mydomen) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80 default_server;
listen [::]:80 default_server;
server_name mydomen;
return 404; # managed by Certbot
}
ERROR I’m getting:
[WARN] [3366251788654231] ICE failed for component 1 in stream 1, but we're still waiting for some info so we don't care... (trickle pending, answer received, alert not set)
[ERR] [ice.c:janus_ice_check_failed:2080] [3366251788654231] ICE failed for component 1 in stream 1...
This happens when i’m starting to publish:
const startPublishing = () => {
Janus.log("Starting publishing...");
pluginHandleRef.createOffer({
media: {audioRecv: false, videoRecv: false, audioSend: true, videoSend: true, data: true},
success: function (jsep) {
Janus.log("Got publisher SDP!", jsep);
const publishRequest = {
request: "publish",
jsep: jsep
};
pluginHandleRef.send({
message: publishRequest,
jsep: jsep,
success: (result) => {
Janus.log("Successfully sent message: ", result);
},
error: (cause) => {
Janus.error("Error sending publish request: ", cause);
}
});
},
error: function (error) {
Janus.log("Error creating offer: ", error);
}
});
};
What did i try to fix this issue:
- Tried to configure STUN servers (didn’t work)
- Configured `nat_1_1_mapping = “my public ip” (also didn’t work)