Score:0

gnome-remote-desktop Failed to start RDP server: Error binding to address [::]:3389: Address already in use

dz flag

I'm trying to find an answer but I haven't so far. I installed Ubuntu 22.0.4 and Gnome Desktop didn't work so i went ahead to upgrade to 23.0.4 hoping it will resolve the following issue but it didn't. It doesn't work from Windows 11 and Mac. Gnome Desktop is showing the following error:

yigal@yigal-desktop:~$ systemctl --user status gnome-remote-desktop.service
● gnome-remote-desktop.service - GNOME Remote Desktop
     Loaded: loaded (/usr/lib/systemd/user/gnome-remote-desktop.service; enabled; preset: enabled)
     Active: active (running) since Sun 2023-05-07 23:49:36 CDT; 23min ago
   Main PID: 9559 (gnome-remote-de)
      Tasks: 8 (limit: 9187)
     Memory: 14.2M
        CPU: 424ms
     CGroup: /user.slice/user-1000.slice/[email protected]/app.slice/gnome-remote-desktop.service
             └─9559 /usr/libexec/gnome-remote-desktop-daemon

May 07 23:49:36 yigal-desktop systemd[1033]: Starting gnome-remote-desktop.service - GNOME Remote Desktop...
May 07 23:49:36 yigal-desktop systemd[1033]: Started gnome-remote-desktop.service - GNOME Remote Desktop.
May 07 23:49:37 yigal-desktop gnome-remote-desktop-daemon[9559]: Cannot load libnvidia-encode.so.1
May 07 23:49:37 yigal-desktop gnome-remote-de[9559]: Failed to start RDP server: Error binding to address [::]:3389: Address already in use
yigal@yigal-desktop:~$ 

When the RDP client starts it hangs and remains black screen. Restarting gnome-remote-desktop and rebooting Ubuntu doesn't.

I'm not proficient with Linux but I'm suspecting it is related to libnvidia-encode given:

May 07 23:49:37 yigal-desktop gnome-remote-desktop-daemon[9559]: Cannot load libnvidia-encode.so.1

Can someone help me fix that please?

yigal@yigal-desktop:~$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 23.04
Release:        23.04
Codename:       lunar

yigal@yigal-desktop:~$ !652
netstat -lntp
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:5900          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.54:53           0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -                   
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      -                   
tcp6       0      0 ::1:631                 :::*                    LISTEN      -                   
tcp6       0      0 :::22                   :::*                    LISTEN      -                   
tcp6       0      0 :::3389                 :::*                    LISTEN      -                   
tcp6       0      0 ::1:3350                :::*                    LISTEN      -                   
yigal@yigal-desktop:~$ lscpu 
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         36 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  2
  On-line CPU(s) list:   0,1
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Celeron(R) CPU G540T @ 2.10GHz
    CPU family:          6
    Model:               42
    Thread(s) per core:  1
    Core(s) per socket:  2
    Socket(s):           1
    Stepping:            7
    CPU(s) scaling MHz:  79%

Thanks in advanced

waltinator avatar
it flag
The `netstat` output line "`tcp6 0 0 :::3389`" shows that some process has IPv6 port 3389 open. Use `sudo lsof -i:3389` to see which process.
waltinator avatar
it flag
The IP Address in the error message ("`[::]`") is an IPv6 address. Unless you (and your upstream (and theirs ...)) fully support IPv6, you'll be better off disabling IPv6 in the networks settings panel.
Score:0
wf flag

Cannot load libnvidia-encode.so.1

That is unrelated. gnome-remote-desktop has support for NVENC and CUDA. If they are not available (due to e.g. not using an NVIDIA card), then that is not a problem, since there is a fallback for software encoding.


Your issue is that some other process already bound to the RDP port (3389). A TCP port can only be bound to once.
So, what needs to be done is to close the program or process, that occupies the 3389 port.

You can see, which process occupied the port with ss -ntlp. Then kill the process, that is running on the 3389 port (you can check via ss -ntlp whether that was successful after killing it), then restart gnome-remote-desktop via systemctl --user restart gnome-remote-desktop.

It should be noted though, that the process, that already occupied the 3389 port, might ran automatically, e.g. via another systemd unit.
Depending on what process it is, you may want to disable it completely. Otherwise, you run into the same issue again, whenever you restart your system.

Yigal avatar
dz flag
consolidating all comments, it seems like it was xrdp which I suppose should listen to 3389(v4&6). I killed it and now the RDP doesn't even start:
Pascal Nowack avatar
wf flag
Looks like according your log from, you get the `Session creation inhibited` message. When gnome-remote-desktop tries to record a screen and it gets that message from gnome-shell, it usually means your screen on the server side is locked (since gnome-remote-desktop is intended to used for remote assistance).
Pascal Nowack avatar
wf flag
You can avoid this situation by installing the https://extensions.gnome.org/extension/4338/allow-locked-remote-desktop/ gnome-shell extension. Then you can also connect, while the screen on the server side is locked.
Score:0
dz flag

Here is what I got:

State               Recv-Q              Send-Q                             Local Address:Port                             Peer Address:Port              Process              
LISTEN              0                   4096                                   127.0.0.1:5900                                  0.0.0.0:*                                      
LISTEN              0                   4096                                  127.0.0.54:53                                    0.0.0.0:*                                      
LISTEN              0                   128                                    127.0.0.1:631                                   0.0.0.0:*                                      
LISTEN              0                   4096                               127.0.0.53%lo:53                                    0.0.0.0:*                                      
LISTEN              0                   32                                 192.168.122.1:53                                    0.0.0.0:*                                      
LISTEN              0                   128                                        [::1]:631                                      [::]:*                                      
LISTEN              0                   4096                                           *:22                                          *:*                                      
LISTEN              0                   2                                              *:3389                                        *:*                                      
LISTEN              0                   2                                          [::1]:3350                                     [::]:*                                      
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ sudo lsof -i:3389
[sudo] password for yigal: 
COMMAND PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
xrdp    836 xrdp   11u  IPv6  23855      0t0  TCP *:ms-wbt-server (LISTEN)
yigal@yigal-desktop:~$ systemctl --user status gnome-remote-desktop.service
● gnome-remote-desktop.service - GNOME Remote Desktop
     Loaded: loaded (/usr/lib/systemd/user/gnome-remote-desktop.service; enabled; preset: enabled)
     Active: active (running) since Sun 2023-05-07 23:49:36 CDT; 8h ago
   Main PID: 9559 (gnome-remote-de)
      Tasks: 8 (limit: 9187)
     Memory: 14.2M
        CPU: 424ms
     CGroup: /user.slice/user-1000.slice/[email protected]/app.slice/gnome-remote-desktop.service
             └─9559 /usr/libexec/gnome-remote-desktop-daemon

May 07 23:49:36 yigal-desktop systemd[1033]: Starting gnome-remote-desktop.service - GNOME Remote Desktop...
May 07 23:49:36 yigal-desktop systemd[1033]: Started gnome-remote-desktop.service - GNOME Remote Desktop.
May 07 23:49:37 yigal-desktop gnome-remote-desktop-daemon[9559]: Cannot load libnvidia-encode.so.1
May 07 23:49:37 yigal-desktop gnome-remote-de[9559]: Failed to start RDP server: Error binding to address [::]:3389: Address already in use
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ sudo killall xrdp
yigal@yigal-desktop:~$ sudo lsof -i:3389
yigal@yigal-desktop:~$ systemctl --user restart gnome-remote-desktop.service
yigal@yigal-desktop:~$ systemctl --user status gnome-remote-desktop.service
● gnome-remote-desktop.service - GNOME Remote Desktop
     Loaded: loaded (/usr/lib/systemd/user/gnome-remote-desktop.service; enabled; preset: enabled)
     Active: active (running) since Mon 2023-05-08 08:09:17 CDT; 4s ago
   Main PID: 18987 (gnome-remote-de)
      Tasks: 9 (limit: 9187)
     Memory: 14.4M
        CPU: 436ms
     CGroup: /user.slice/user-1000.slice/[email protected]/app.slice/gnome-remote-desktop.service
             └─18987 /usr/libexec/gnome-remote-desktop-daemon

May 08 08:09:17 yigal-desktop systemd[1033]: Starting gnome-remote-desktop.service - GNOME Remote Desktop...
May 08 08:09:17 yigal-desktop systemd[1033]: Started gnome-remote-desktop.service - GNOME Remote Desktop.
May 08 08:09:18 yigal-desktop gnome-remote-desktop-daemon[18987]: Cannot load libnvidia-encode.so.1
May 08 08:09:18 yigal-desktop gnome-remote-de[18987]: RDP server started```

That is what I got after killing xrdp:
```May 08 08:09:18 yigal-desktop gnome-remote-de[18987]: RDP server started
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ 
yigal@yigal-desktop:~$ systemctl --user status gnome-remote-desktop.service
● gnome-remote-desktop.service - GNOME Remote Desktop
     Loaded: loaded (/usr/lib/systemd/user/gnome-remote-desktop.service; enabled; preset: enabled)
     Active: active (running) since Mon 2023-05-08 08:09:17 CDT; 8min ago
   Main PID: 18987 (gnome-remote-de)
      Tasks: 8 (limit: 9187)
     Memory: 22.0M
        CPU: 591ms
     CGroup: /user.slice/user-1000.slice/[email protected]/app.slice/gnome-remote-desktop.service
             └─18987 /usr/libexec/gnome-remote-desktop-daemon

May 08 08:10:03 yigal-desktop gnome-remote-desktop-daemon[18987]: [08:10:03:267] [18987:19008] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_CONTINUE_NEED>May 08 08:10:03 yigal-desktop gnome-remote-desktop-daemon[18987]: [08:10:03:275] [18987:19008] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_COMPLETE_NEED>May 08 08:10:03 yigal-desktop gnome-remote-desktop-daemon[18987]: [08:10:03:301] [18987:19008] [ERROR][com.freerdp.core.gcc] - Unknown GCC client data block: 0xC00C
May 08 08:10:03 yigal-desktop gnome-remote-de[18987]: Failed to start remote desktop session: GDBus.Error:org.freedesktop.DBus.Error.Failed: Session creation inhibited
May 08 08:10:03 yigal-desktop gnome-remote-desktop-daemon[18987]: [08:10:03:401] [18987:18987] [ERROR][com.freerdp.core] - rdp_set_error_info:freerdp_set_last_error_ex ERRIN>May 08 08:17:15 yigal-desktop gnome-remote-desktop-daemon[18987]: [08:17:15:929] [18987:19196] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_CONTINUE_NEED>May 08 08:17:15 yigal-desktop gnome-remote-desktop-daemon[18987]: [08:17:15:935] [18987:19196] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_COMPLETE_NEED>May 08 08:17:15 yigal-desktop gnome-remote-desktop-daemon[18987]: [08:17:15:945] [18987:19196] [ERROR][com.freerdp.core.gcc] - Unknown GCC client data block: 0xC00C
May 08 08:17:15 yigal-desktop gnome-remote-de[18987]: Failed to start remote desktop session: GDBus.Error:org.freedesktop.DBus.Error.Failed: Session creation inhibited
May 08 08:17:15 yigal-desktop gnome-remote-desktop-daemon[18987]: [08:17:15:033] [18987:18987] [ERROR][com.freerdp.core] - rdp_set_error_info:freerdp_set_last_error_ex ERRIN>
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.