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

failed to run custom build command for mediasoup-sys v0.3.1 #17

Closed
Cocam123 opened this issue Feb 3, 2022 · 20 comments
Closed

failed to run custom build command for mediasoup-sys v0.3.1 #17

Cocam123 opened this issue Feb 3, 2022 · 20 comments

Comments

@Cocam123
Copy link

Cocam123 commented Feb 3, 2022

Hello,

For several days (since I installed Revolt on my server) I can't install vortex because the following error occurs:

I send a txt file below with the error

My server is under Debian and I can't find the resolution to this problem

Thanks to everyone who will help me

@Cocam123
Copy link
Author

Cocam123 commented Feb 3, 2022

error.txt

@scottoss
Copy link

scottoss commented Feb 5, 2022

@Ikun886-cxk
Copy link

@Cocam123 @scottoss Modify Cargo.toml and add a line of mediasoup-sys = "0.3.2 "at the end.

@Ikun886-cxk
Copy link

Ikun886-cxk commented Feb 7, 2022

error.txt

@Cocam123 If you are using Ubuntu, run it
sudo apt-get install python3-pip

@Cocam123
Copy link
Author

Hello, thanks for the help (I'm coming back now because my pc had problems)

Now, Vortex is installed but does not seem to start

Error:
thread 'main' panicked at 'Missing WS_URL environment variable.: NotPresent', src/util/variables.rs:16:28

however I can't find the line corresponding to Vortex's ws (after that I don't know if it is well configured. I confess I'm a little bit lost regarding the configuration of Vortex on my server)

@ghost
Copy link

ghost commented Feb 11, 2022

@Cocam123 i had to do some hunting around for it
VOSO_PUBLIC_URL=https://vortex.revolt.chat
VOSO_WS_HOST=wss://vortex.revolt.chat
WS_URL=wss://vortex.revolt.chat

if u get it working please inform me as i have vortex running but no audio for some odd reason

@Ikun886-cxk
Copy link

@Cocam123 @DisListMe You must configure it in. env

@ghost
Copy link

ghost commented Feb 12, 2022

@SurpriseLon no no i know this thank you tho

i even setup my env for vortex as well BUT i cant actually hear audio is my issue like the connection takes place it works

{"revolt":"0.5.3-alpha.16","features":{"captcha":{"enabled":false,"key":"10000000-ffff-ffff-ffff-000000000001"},"email":false,"invite_only":false,"autumn":{"enabled":true,"url":"https://cdn.chatnet.me"},"january":{"enabled":true,"url":"https://january.chatnet.me"},"voso":{"enabled":true,"url":"https://vortex.chatnet.me","ws":"wss://vortex.chatnet.me"}},"ws":"wss://ws.chatnet.me","app":"https://backup.chatnet.me","vapid":"removed for well of obvious reasons"}

currently vortex is down on my server as i still dont know how to keep alive cargo run scripts can it be done with pm2 or forever

but it just dosnt take audio

users can join the voice channel fine just nothing exchanged idk if im setting up the env in my vortex directory right with the ip setup but if i wasnt it would connect or maybe its my caddy file im not 100% on this one

@Cocam123
Copy link
Author

@DisListMe you can try with tmux (I use it and it works well)

on the other hand, I have configured Vortex with the following settings:
VOSO_PUBLIC_URL=https://vortex.revolt.chat
MANAGE_TOKEN=(my token)
HTTP_HOST=0.0.0.0:8080
VOSO_WS_HOST=wss://vortex.revolt.chat
WS_URL=wss://vortex.revolt.chat
RTC_MIN_PORT=10000
RTC_MAX_PORT=11000
DISABLE_RTP=0
RTC_IPS=(server ip)

Vortex starts but cannot join a voice channel (as if Vortex was not installed)

@ghost
Copy link

ghost commented Feb 12, 2022

you need to set your ws (websocket) to your own domain m8 @Cocam123

@ghost
Copy link

ghost commented Feb 12, 2022

Or

Short version
To SSL or not SSL

You may have a SSL certificate issue. The connection point rule can be summarized as:

wss connects on https only
ws connects on http
and vice-versa:

https accepts wss only
http accepts ws only

@ghost
Copy link

ghost commented Feb 18, 2022

i'm still having issues myself getting vortex to work right i could really use some assistance someone please. Again i can connect to a voice channel BUT can not hear anything from any users who join.?? @insertish.

@scottoss
Copy link

@SurpriseLon no no i know this thank you tho

i even setup my env for vortex as well BUT i cant actually hear audio is my issue like the connection takes place it works

{"revolt":"0.5.3-alpha.16","features":{"captcha":{"enabled":false,"key":"10000000-ffff-ffff-ffff-000000000001"},"email":false,"invite_only":false,"autumn":{"enabled":true,"url":"https://cdn.chatnet.me"},"january":{"enabled":true,"url":"https://january.chatnet.me"},"voso":{"enabled":true,"url":"https://vortex.chatnet.me","ws":"wss://vortex.chatnet.me"}},"ws":"wss://ws.chatnet.me","app":"https://backup.chatnet.me","vapid":"removed for well of obvious reasons"}

currently vortex is down on my server as i still dont know how to keep alive cargo run scripts can it be done with pm2 or forever

but it just dosnt take audio

users can join the voice channel fine just nothing exchanged idk if im setting up the env in my vortex directory right with the ip setup but if i wasnt it would connect or maybe its my caddy file im not 100% on this one

i use it with pm2 and it works just fine

just need to create a start script in a package.json

@ghost
Copy link

ghost commented Feb 18, 2022

again @scottoss thank you for that i will keep in mind but again my main issue is i can connect via my own instance and api and ws but once im in voice with another user we can not actually hear one another, ive set up everything as needed from what i can tell but i will attempt again and if nothing still changes i will re-create on new vps or dedi and list my steps one by one to see if maybe its in my process or something else cause im utterly dumbstruck

@scottoss
Copy link

i dont know what u might have done wrong

i also have a own instance wich works fine

but if u post ur steps here i may be able to help

@ghost
Copy link

ghost commented Feb 19, 2022

  1. whip up a vps over on digitalocean or vultr ether or and use ubuntu 20.04 / 2 GB Memory / 2 AMD vCPUs / 60 GB Disk
  2. clone repos over | setup and install all needed requirements for build + running of docker-compose up -d of the self-hosted docker-compose.yml file + needed files for vortex
  3. setup caddy and ports (but tbh im still newish to caddy i usally run just about everything and everything from a plesk dedicated server using docker and plesk docker proxy i may have something wrong here but feel i dont but probably do as im not 100% about this part here below)

RTC_IPS Semicolon separated list of IPs to use for WebRTC. Hostnames are not supported yet. Either combined or split listen and announce IPs. <combined>;<listen>,<announce>

I'm not understanding how a setup of the above would look like can you show me a example please of

<combined>;<listen>,<announce> as this may be my issue here

  1. all ports are setup for inbound and outbound traffic (more or less striping ufw for testing of vortex once working rebuilding server from scratch to setup again more securely)
  2. setup the .env | run docker compose up -d | slide on over to my vortex directory and run build + cargo run there | i then go to my testing instance everything works 10000000% but the vortex instance part there is something not allowing communication as again like i said a user can join and see they joined and see other joins and i get no errors what so ever in my console logs ether in my browser which is even odder, just no one can hear each other... again it may have todo with the whole issue under # 3 as i dont understand that and need a example as im a visual learner and im not sure what they mean by this <combined>;<listen>,<announce>

I was told my insert themself that i should be able to run selfhosted + vortex no issue with out needing to run the full stack cli which seems right but again im having this VOIP problem

@Odeioikr
Copy link

Odeioikr commented Apr 1, 2022

Hello, thanks for the help (I'm coming back now because my pc had problems)

Now, Vortex is installed but does not seem to start

Error: thread 'main' panicked at 'Missing WS_URL environment variable.: NotPresent', src/util/variables.rs:16:28

however I can't find the line corresponding to Vortex's ws (after that I don't know if it is well configured. I confess I'm a little bit lost regarding the configuration of Vortex on my server)

hello,I got a seam problem when I am ready to run Vortex,I use the command cargo build and ./vortex(have moved vortec to the root library) but programe always return
2022-04-01T00:13:28Z INFO vortex] Starting Revolt Vortex voice server thread 'main' panicked at 'Missing WS_URL environment variable.: NotPresent', src/util/variables.rs:16:47 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

I'm not very familiar with how to configure the environment for "rusy" language programs, so I tried to modify the /src/util/variables.rs file based on the error message, and I'm wondering if the reason for the error is that I configured the wrong file. Here is the content of my /variables.rs
`use std::convert::TryFrom;
use std::env;
use std::net::{IpAddr, SocketAddr};
use std::str::FromStr;

use mediasoup::data_structures::TransportListenIp;
use mediasoup::prelude::TransportListenIps;

lazy_static! {
// HTTP API
pub static ref HTTP_HOST: SocketAddr = env::var("https://vortex.domain.top")
.unwrap_or_else(|_| "0.0.0.0:8080".to_string())
.parse()
.expect("HTTP_HOST environment variable is not a valid IP:port");
pub static ref WS_URL: String =
env::var("wss://vortex.domain.top").expect("Missing WS_URL environment variable.");
pub static ref MANAGE_TOKEN: String =
env::var("tokenkwdapk").expect("Missing MANAGE_TOKEN environment variable.");

// RTC
pub static ref RTC_IPS: TransportListenIps = {
    let ip_list = env::var("0.0.0.0,host_ipv4").expect("Missing RTC_IPS environment variable.");
    let ip_list = ip_list.split(';');
    let mut ip_vec = Vec::new();
    for ip_pair in ip_list {
        let mut iter = ip_pair.split(',');
        if let Some(ip) = iter.next() {
            let ip = IpAddr::from_str(&ip).expect("Not a valid listen IP");
            let announced_ip = iter.next().map(|ip| IpAddr::from_str(&ip).expect("Not a valid announcement IP"));
            if ip.is_unspecified() && announced_ip.is_none() {
                panic!("RTC announcement IP must be specified when listen IP is 0.0.0.0");
            }

            if let Some(announced_ip) = announced_ip {
                if announced_ip.is_unspecified() {
                    panic!("RTC announcement IP must not be 0.0.0.0");
                }
            }

            ip_vec.push(TransportListenIp {
                ip, announced_ip,
            });
        }
    }

    TransportListenIps::try_from(ip_vec).unwrap()
};

pub static ref RTC_MIN_PORT: u16 = env::var("10000")
    .unwrap_or_else(|_| "10000".to_string())
    .parse()
    .expect("RTC_MIN_PORT is not a valid 16-bit number");
pub static ref RTC_MAX_PORT: u16 = env::var("11000")
    .unwrap_or_else(|_| "11000".to_string())
    .parse()
    .expect("RTC_MAX_PORT is not a valid 16-bit number");
pub static ref DISABLE_RTP: bool = env::var("o").map_or(false, |v| v == "1");

}

pub fn preflight_checks() {
format!("{}", *WS_URL);
format!("{}", *MANAGE_TOKEN);

format!("{}", RTC_IPS.len());

}
`
Finally, I apologize for my less than proficient English XD

@Cocam123
Copy link
Author

Cocam123 commented Apr 1, 2022

Hello everyone. First of all, sorry for the delay I took. I just wanted to say that my problem concerning Vortex is still not solved. Indeed, when I try to start Vortex, I have the following error that appears:

thread 'main' panicked at 'Missing WS_URL environment variable.: NotPresent', src/util/variables.rs:16:43
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

I searched for several hours to solve this problem but could not find a solution. If you need any particular information (like API link, .env file information or anything else, please let me know)

I thank you in advance for your answer

@Cocam123 Cocam123 closed this as completed Apr 9, 2022
@Cocam123 Cocam123 moved this to Done in Revolt Project Apr 9, 2022
@sivert-io
Copy link

sivert-io commented Apr 12, 2022

thread 'main' panicked at '>>>Missing WS_URL environment variable<<<.: NotPresent', src/util/variables.rs:16:43 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

You're missing the variable WS_URL in your .env file. You can see the variables needed in the README.md file

I don't know how detailed you want this explained, but you have to add this to your .env file
WS_URL=wss://your.host.url

@Cocam123
Copy link
Author

Hello, WS_URL has been added in the .env file under vortex configuration but it still does not work

By the way, I have created a new issue just to talk about this particular problem
#24

thread 'main' panicked at '>>>Missing WS_URL environment variable<<<.: NotPresent', src/util/variables.rs:16:43 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

You're missing the variable WS_URL in your .env file. You can see the variables needed in the README.md file

I don't know how detailed you want this explained, but you have to add this to your .env file WS_URL=wss://your.host.url

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

5 participants