无法启动 xrdp 守护进程,可能地址已在使用中

San*_*iri 5 xrdp 20.04

需要帮助来解决此问题。

操作系统:Ubuntu 20.04 LTS

错误:无法启动 xrdp 守护程序,可能地址已在使用中。

日志ctl-xe

    -- A start job for unit xrdp.service has begun execution.
--
-- The job identifier is 1785.
okt 23 12:01:29 Ubutu20 xrdp-sesman[3636]: (3636)(140566295258688)[INFO ] listening to port 3350 on 127.0.0.1
okt 23 12:01:29 Ubutu20 xrdp[3650]: (3650)(140065546684224)[INFO ] address [0.0.0.0] port [3389] mode 3
okt 23 12:01:29 Ubutu20 xrdp[3650]: (3650)(140065546684224)[INFO ] listening to port 3389 on 0.0.0.0
okt 23 12:01:29 Ubutu20 xrdp[3650]: (3650)(140065546684224)[ERROR] trans_listen_address failed
okt 23 12:01:29 Ubutu20 xrdp[3650]: (3650)(140065546684224)[DEBUG] Closed socket 7 (AF_VSOCK cid -1 port -1)
okt 23 12:01:29 Ubutu20 xrdp[3650]: (3650)(140065546684224)[ERROR] Failed to start xrdp daemon, possibly address already in use.
okt 23 12:01:29 Ubutu20 systemd[1]: xrdp.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit xrdp.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
okt 23 12:01:29 Ubutu20 systemd[1]: xrdp.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit xrdp.service has entered the 'failed' state with result 'exit-code'.
okt 23 12:01:29 Ubutu20 systemd[1]: Failed to start xrdp daemon.
-- Subject: A start job for unit xrdp.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/suppor
Run Code Online (Sandbox Code Playgroud)

netstat -epl

sudo netstat -epl | grep 3389
sandesh@Ubutu20:~$
Run Code Online (Sandbox Code Playgroud)

Mas*_*d R 1

编辑文件

/etc/xrdp/xrdp.ini

修改参数如下:

port = tcp: //: 3389

use_vsock = false
Run Code Online (Sandbox Code Playgroud)

然后重启xrdp服务:sudo systemctl restart xrdp

问题说明

金属

use_vsock=yes 不再是首选,但 MS 工具仍在使用此开关。向该工具的作者报告并要求他们修复它。

PS vsock 功能是由 MS 人员开发的。我们 xrdp 团队合并了它,但如果 MS 人员不维护 vsock,它可能会在将来被删除。欢迎MS小伙伴们持续贡献!