xrdp fails to bind to localhost

Bug #1966048 reported by Daniel Richard G.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xrdp (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

This concerns xrdp 0.9.17-2ubuntu2 in Ubuntu jammy.

I want to have xrdp listen on a localhost port. When I configure the server to use

    [Globals]
    ...
    port=tcp://.:3389

in /etc/xrdp/xrdp.ini, and I attempt to start the server, I get an error:

    # /etc/init.d/xrdp start
    Starting xrdp (via systemctl): xrdp.serviceJob for xrdp.service failed because the control
    process exited with error code.
    See "systemctl status xrdp.service" and "journalctl -xeu xrdp.service" for details.
     failed!

In /var/log/xrdp.log, I see

    [20220323-05:02:00] [INFO ] address [127.0.0.1] port [3389] mode 4
    [20220323-05:02:00] [INFO ] listening to port 3389 on 127.0.0.1
    [20220323-05:02:00] [ERROR] trans_listen_address failed
    [20220323-05:02:00] [ERROR] Failed to start xrdp daemon, possibly address already in use.

The port is free. Nothing is using it:

    $ telnet localhost 3389
    Trying ::1...
    Trying 127.0.0.1...
    telnet: Unable to connect to remote host: Connection refused

I tried building the latest upstream release of xrdp (v0.9.19 as of this writing) with the same build configuration as the Ubuntu package. It starts without error.

Please update the package to v0.9.19.

Tags: jammy
tags: added: jammy
Revision history for this message
Daniel Richard G. (skunk) wrote :

On further digging, I've found that this issue is due to an AppArmor rule, which for some reason was treating localhost differently (as IPv6) than a regular network address (IPv4). Closing.

Changed in xrdp (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.