How to fix Discord Stuck on RTC Connecting?

RTC Connecting means that the platform is trying to start a voice call. Discord uses the Real-Time Chat protocol to facilitate concurrent communication. So the problem of sleeping on RTC Connecting is network-related.

Visit for this Link – rtc connecting discord

.

javascript – Web RTC: ICE candidate function not been called, hence remote video is not showing

I am trying to create web RTC peer connection on react native. I am using the react-native-webrtc module. When using two emulators and passing the same room id the video connection is not been created. While debugging I found the onIceCandidate funciton is not been called. I am using socket.io to create the room. Please help me with this.

import React, {useState, useEffect} from 'react';
import {View, SafeAreaView, Button, StyleSheet, Text} from 'react-native';
import {RTCPeerConnection, RTCView, mediaDevices} from 'react-native-webrtc';
import io from "socket.io-client";

export default function WEBRtc({roomNumber}) {
  const (localStream, setLocalStream) = useState();
  const (remoteStream, setRemoteStream) = useState();


  let isCaller, localST, peerConnection;
  const socket = io("http://192.168.0.102:3000", {transports: ('websocket')});

  const constraints = {
    audio: true,
    video:false
  };


/**
 * Getting ready for local stream 
 */
  const startLocalStream = () => {
      socket.emit('joinTheRoom', roomNumber);
  };

  socket.on('roomCreated', room=>{
    console.log('room created');

    mediaDevices.getUserMedia(constraints)
      .then(stream=>{
        setLocalStream(stream);
        localST = stream;
        isCaller = true;
      })
  });

  socket.on('roomJoined', room=>{
    console.log('room joined');
    mediaDevices.getUserMedia(constraints)
      .then(stream=>{
        setLocalStream(stream);
        socket.emit('ready', roomNumber)
      });
  });




  const configuration = {iceServers: (
    {'urls':'stun:stun.services.mozilla.com'},
    {'urls':'stun:stun.l.google.com:19302'}
  )};


  // const localPC = new RTCPeerConnection(configuration);
  // const remotePC = new RTCPeerConnection(configuration);

  // const peerConnection = new RTCPeerConnection(configuration);

    socket.on('ready', room=>{
      if(isCaller){
        console.log('ready');
        peerConnection = new RTCPeerConnection(configuration);
        peerConnection.onicecandidate = onIceCandidate;
        peerConnection.onaddstream = onAddStream;
        peerConnection.createOffer()
        .then(offer=>{
          return peerConnection.setLocalDescription(offer)
          .then(()=>{
            console.log('emit offer');
              socket.emit('offer',{
                type:'offer',
                sdp:offer,
                room: roomNumber
              });
            })
          })
      }
    });

    socket.on("offer",e=>{

      if(!isCaller){
        peerConnection = new RTCPeerConnection(configuration);
        console.log('offer');
        peerConnection.onicecandidate = onIceCandidate;
        peerConnection.onaddstream = onAddStream;

        console.log('about to create answer', e);

        //accept offer from here(ready)
        peerConnection.setRemoteDescription(e)
        .then(()=>{
          return peerConnection.createAnswer()
          .then(answer=>{
            return peerConnection.setLocalDescription(answer)
            .then(()=>{
              console.log('emit answer');
                socket.emit('answer',{
                  type:'answer',
                  sdp: answer,
                  room: roomNumber
              }); 
            })
          })
        });
      }

    });



    function onAddStream(e){
      console.log('remote stream', e);
      if (e.stream && remoteStream !== e.stream) {
        console.log('remote stream', e.stream);

        setRemoteStream(e.stream);
      }
  };


    function onIceCandidate(event){
      console.log('ice candidate');

      if(event.candidate){
          console.log('sending ice candidate', event.candidate);

          socket.emit('candidate',{
              type: 'candidate',
              label: event.candidate.sdpMLineIndex,
              id: event.candidate.sdpMid,
              candidate: event.candidate.candidate,
              room: roomNumber
          });
      }
  }


    socket.on('candidate', e=>{
      console.log('candidate', isCaller);
      peerConnection.addIceCandidate(e);
      peerConnection.addStream(localStream);
    });

    socket.on('answer', e=>{
      console.log('answer');
      peerConnection.setRemoteDescription(e);
    });




  return (
    <SafeAreaView style={styles.container}>
    <View style={styles.streamContainer}>
      <View style={styles.streamWrapper}>
          <View style={styles.localStream}>
            {localStream && <RTCView style={styles.rtc} streamURL={localStream.toURL()} />}
            {!localStream && <Button title="Tap to start" onPress={startLocalStream} />}
          </View>
          <View style={styles.rtcview}>
            {remoteStream && <RTCView style={styles.rtc} streamURL={remoteStream.toURL()} />}
          </View>
        </View>
        {/* {!!remoteStream ? <Button style={styles.toggleButtons} title="Click to stop call" onPress={closeStreams} disabled={!remoteStream} /> : localStream && <Button title="Click to start call" onPress={startCall}  />} */}
    </View>
</SafeAreaView>
  );
}

const styles = StyleSheet.create({
  container: {
    backgroundColor: '#313131',
    justifyContent: 'space-between',
    alignItems: 'center',
    height: '100%',
    width:'100%'
  },
  streamContainer:{
    backgroundColor: 'grey',
    // justifyContent: 'space-around',
    alignItems: 'center',
    height: '50%',
    width: '100%',
    flexDirection:'column'
  },
  streamWrapper:{
    backgroundColor: 'grey',
    justifyContent: 'space-around',
    alignItems: 'center',
    height: '100%',
    width: '100%',
    flexDirection:'row'
  },
  roomTitle:{
    fontSize:20,
    paddingTop:20
  },
  rtcview: {
    width: '45%',
    height: '60%',
    borderColor:'#ccc',
    borderWidth:3,

  },
  rtc: {
    width: '100%',
    height: '100%',
  },
  localStream:{
    width: '45%',
    height: '60%',
    borderColor:'#ccc',
    borderWidth:3,
    display:'flex',
    alignItems:'center',
    flexDirection:'row',
    justifyContent:'space-around',

  }
});

[DICHVUSOCKS.US] 22h15 PM UPDATE 24 / 24- good socks

IVE | 208.113.153.144:23099 | 0.32 | Unknown | Unknown | bath.dreamhost.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 64.118.86.54:52973 | 0.33 | Unknown | Unknown | | Unknown | Blacklist: No | Checked at https://dichvusocks.us
LIVE | 64.90.51.38:47683 | 0.76 | Unknown | Unknown | nyssa.dreamhost.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 75.119.217.119:32609 | 0.61 | Unknown | Unknown | | Unknown | Blacklist: No | Checked at https://dichvusocks.us
LIVE | 208.113.221.250:23099 | 0.34 | Unknown | Unknown | bath.dreamhost.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 75.119.217.119:61283 | 0.61 | Unknown | Unknown | | Unknown | Blacklist: No | Checked at https://dichvusocks.us
LIVE | 64.90.50.185:47683 | 0.6 | Unknown | Unknown | nyssa.dreamhost.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 66.33.213.194:26350 | 1.29 | Unknown | Unknown | charles-pickney.dreamhost.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 64.90.52.221:47683 | 0.57 | Unknown | Unknown | nyssa.dreamhost.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 64.90.52.180:47683 | 0.57 | Unknown | Unknown | nyssa.dreamhost.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 208.113.222.204:23099 | 0.31 | Unknown | Unknown | bath.dreamhost.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 184.168.146.10:56311 | 0.53 | Unknown | Unknown | ip-184-168-146-10.ip.secureserver.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 75.119.217.119:34534 | 0.6 | Unknown | Unknown | | Unknown | Blacklist: No | Checked at https://dichvusocks.us
LIVE | 50.62.61.96:59482 | 0.52 | Unknown | Unknown | ip-198.12-154-22.ip.secureserver.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 104.238.97.215:25485 | 0.54 | Unknown | Unknown | ip-104-238-97-215.ip.secureserver.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 97.74.6.64:13861 | 0.57 | Unknown | Unknown | ip-97-74-6-64.ip.secureserver.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 51.81.31.66:49878 | 0.37 | Virginia | 20110 | pool-173-79-205-230.washdc.fios.verizon.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 184.168.146.10:2002 | 0.55 | Unknown | Unknown | ip-184-168-146-10.ip.secureserver.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 142.93.51.220:45955 | 0.28 | Unknown | Unknown | | Unknown | Blacklist: No | Checked at https://dichvusocks.us
LIVE | 132.148.159.44:61575 | 0.52 | Unknown | Unknown | ip-132-148-159-44.ip.secureserver.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 97.74.6.64:34126 | 0.53 | Unknown | Unknown | ip-97-74-6-64.ip.secureserver.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 184.168.146.10:54738 | 0.53 | Unknown | Unknown | ip-184-168-146-10.ip.secureserver.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 184.168.146.10:14612 | 0.55 | Unknown | Unknown | ip-184-168-146-10.ip.secureserver.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 64.118.86.52:52973 | 0.3 | Unknown | Unknown | | Unknown | Blacklist: No | Checked at https://dichvusocks.us
LIVE | 142.93.51.220:36511 | 0.27 | Unknown | Unknown | | Unknown | Blacklist: No | Checked at https://dichvusocks.us
LIVE | 45.76.0.165:9053 | 0.69 | Unknown | Unknown | tor-exit.copernicus.vsif.ca | Unknown | Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 67.213.212.11:39753 | 0.43 | Colorado | 81226 | RTC Telecom | United States Blacklist: No | Checked at https://dichvusocks.us
LIVE | 184.168.146.10:38696 | 0.55 | Unknown | Unknown | ip-184-168-146-10.ip.secureserver.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 51.81.31.169:23900 | 0.43 | Colorado | 80031 | c-73-14-185-202.hsd1.co.comcast.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 184.168.146.10:13079 | 0.54 | Unknown | Unknown | ip-184-168-146-10.ip.secureserver.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 75.119.217.119:31759 | 0.56 | Unknown | Unknown | | Unknown | Blacklist: No | Checked at https://dichvusocks.us
LIVE | 51.81.31.171:25658 | 0.42 | Virginia | 23487 | 047-132-220-082.res.spectrum.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 64.90.48.88:47683 | 0.57 | Unknown | Unknown | nyssa.dreamhost.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 208.113.220.172:23099 | 0.33 | Unknown | Unknown | bath.dreamhost.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 184.168.146.10:26921 | 0.52 | Unknown | Unknown | ip-184-168-146-10.ip.secureserver.net | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 159.89.162.107:7280 | 0.73 | Karnataka | 560100 | www.reachingcriticalwill.org | India | Blacklist: Yes | Checked at https: // dichv

dichvusocks
Reviewed by dichvusocks on
.
[DICHVUSOCKS.US] 22h15 PM UPDATE 24 / 24- good socks
IVE | 208.113.153.144:23099 | 0.32 | Unknown | Unknown | bath.dreamhost.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 64.118.86.54:52973 | 0.33 | Unknown | Unknown | | Unknown | Blacklist: No | Checked at https://dichvusocks.us
LIVE | 64.90.51.38:47683 | 0.76 | Unknown | Unknown | nyssa.dreamhost.com | United States Blacklist: Yes | Checked at https://dichvusocks.us
LIVE | 75.119.217.119:32609 | 0.61 | Unknown | Unknown | | Unknown | Blacklist: No | Checked at

Rating: 5

Hyper-V Ubuntu Guest RTC grossly wrong

If I find some weird timing issues, I find that Ubuntu boots on a server at roughly the wrong times. The server is a Proliant server running Windows 2012 Datacenter, and the time is synchronized with the domain on the server. In addition, if I check the events set in the event log during the startup process of the HyperV server, the adjustments are made in fractions of a second. H., The Proliant seems to have the right time at the start and it stays that way.

On the Ubuntu HyperV, time synchronization in the integration services is disabled and NTP is synchronized with external clocks. The NTP synchronization works well and keeps the time pretty good BUT the initial start time is wrong – two starts today, once by 2 months, once by about 3 hours (both time forward). NTP catches it in 1-2 minutes, but a lot of damage is done during this time.

So I tried the following:

# hwclock -w
# timedatectl
                      Local time: Mon 2019-10-14 20:30:22 CDT
                  Universal time: Tue 2019-10-15 01:30:22 UTC
                        RTC time: Tue 2019-10-15 01:30:30
                       Time zone: America/Chicago (CDT, -0500)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no
#  #### Wait about 90 minutes
# timedatectl
                      Local time: Mon 2019-10-14 21:55:28 CDT
                  Universal time: Tue 2019-10-15 02:55:28 UTC
                        RTC time: Tue 2019-10-15 04:11:32
                       Time zone: America/Chicago (CDT, -0500)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

Note that the initial setting came without about 8 seconds, but a concern close. Only about 90 minutes later, the RTC is now 76 minutes faster. The times (maintained by NTP) are just right.

I understand that the RTC at boot time comes from the operating system clock of the hypervisor and this clock is correct. I have not found any details about how the RTC waits while the guest is running, but it seems that something about the RTC emulation is not working.

Other servers with similar Linux versions and software (though mostly HyperV 2016 and a Windows 10) work properly.

Because this HyperV server is a production server, it is difficult to cause downtime to check the BIOS clock. The scheduled downtime for Windows updates was discovered much later today.

Some questions that would help me:

What is the retention of the emulated RTC in a (Linux) guest VM while the guest is running? (When it matters, while NTP is used)

If you reboot in a DL380p program (for example, Windows updates) but without powering off and on, is the RTC used to set the Windows operating system clock, or is there some persistence in the UEFI boot process? That is, if the hardware RTC is wrong, does it appear on reboot? Or related question: Is there a way to display it with the window open? I've reviewed the ILO and Agent ads without success, and it's difficult to get downtime on this server.

Again, guest and host stay in order while running. And the host will restart at the right time (at least twice today – in the sense that the event logs have negligible time adjustments). In addition, the Windows VM guests have booted with the right time today, BUT WITH the time synchronization for the integration services.

And some other suggestion, how the Ubuntu RTC can drift so badly so fast?

18.04 – How does Ubuntu determine the date / time when there is no NTP server and a broken RTC clock?

I'm trying to determine how Ubuntu 18.04 determines how to set the system clock for a computer that has a broken RTC clock and no access to an NTP server and systemd-timesyncd is disabled. When booting, the time is always 2018-01-28 10:58:48 EST. This seems to be very similar

Prevents the clock from advancing to a system time after the Ubuntu Server build time

Specification of time as 2018-01-28 15:58. The only advice he got was to turn off timesyncd, which I already disabled and did not solve his problem.

Normally an application starts, receives a GPS signal, sets the clock and starts to run. But it does not take GPS to run. What it takes is that the clock does not go back in time. I thought I might be able to fix that if I knew how Ubuntu sets the time to 2018-01-28 10:58:48 EST.

I tried activating systemd-timesyncd. While the computer is usually not connected to the Internet, I can connect it as a maintenance procedure. Then I get the correct time and touch a file under / var / lib / private / systemd / timesync / clock. If I break the connection to the Internet and touch the file manually, the next start will use that time. But even this approach, though better, can put the clock backwards, effectively remembering the last time the computer was connected to the Internet.

Apart from that, it seems puzzling that Ubuntu uses the same time at boot time when it can not time and that time is not January 1 of a year. If I knew what Linux does, I might be able to find a solution. So far, apart from the above URL, I find a lot of "how to use NTP" and "using NTP is a good idea" etc. I would, if I could, but no internet except in maintenance mode.