danielguerra69 / ubuntu-xrdp

Docker fully implemented Multi User xrdp with xorgxrdp and pulseaudio on Ubuntu 16.04/18.04
MIT License
251 stars 141 forks source link

Can't see anything on initial connection #17

Closed InnovativeInventor closed 5 years ago

InnovativeInventor commented 5 years ago

It looks like this when I connect using Microsoft Remote Desktop on a Mac. Clicking the blank button doesn't help much either. The same error occured when I used the compose file and the Dockerfile.

image

danielguerra69 commented 5 years ago

I use a mac too and it should work. It looks like a wrong login, or absent user. Try to add a new user with docker-compose exec terminalserver adduser testuser , then login with those credentials.

antonioantunes commented 5 years ago

Having exactly the same issue, it's before the login process. However, clicking on the blank button, will open the Xorgrdp (I think) screen, with all labels blank. Just input username in the first input box, and password in the second, and press the button, should work.

@danielguerra69 which RDP client are you using? The Microsoft official one get exactly this issue

danielguerra69 commented 5 years ago

On my Mac I use "Microsoft Remote Desktop 10" from the mac app store. They recently changed from 8 to 10

SteveParson commented 5 years ago

Try changing the color depth in the terminal client software to 24bpp. This solved a related problem for me.

antonioantunes commented 5 years ago

No luck. Only 16bit and 32bit available in the client, tried with both, tried changing resolution to many, tried checking "Optimize for Retina displays", no luck too. It don't bother me too much, I can get through it, but would be good to know why it happens

danielguerra69 commented 5 years ago

Could you provide some logging. The logs are at /var/log/supervisor and maybe /var/log/syslog

antonioantunes commented 5 years ago

I don't think this is server-related because it works fine in Windows RDP client, but anyway there are some logs from a newly created container:

root@terminalserver:/var/log/supervisor# ls -la
total 16
drwxr-xr-x 1 root root 4096 Apr  3 03:38 .
drwxr-xr-x 1 root root 4096 Apr  3 03:29 ..
-rw------- 1 root root  110 Apr  3 03:38 sshd-stderr---supervisor-jmuRru.log
-rw------- 1 root root    0 Apr  3 03:38 sshd-stdout---supervisor-jFldKX.log
-rw-r--r-- 1 root root 1337 Apr  3 03:38 supervisord.log
-rw------- 1 root root    0 Apr  3 03:38 xrdp-sesman-stderr---supervisor-vuqDIL.log
-rw------- 1 root root    0 Apr  3 03:38 xrdp-sesman-stdout---supervisor-bC1VhK.log
-rw------- 1 root root    0 Apr  3 03:38 xrdp-stderr---supervisor-PN2vSa.log
-rw------- 1 root root    0 Apr  3 03:38 xrdp-stdout---supervisor-_jxUx3.log

root@terminalserver:/var/log/supervisor# cat sshd-stderr---supervisor-jmuRru.log
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key

root@terminalserver:/var/log/supervisor# cat supervisord.log
2019-04-03 03:38:38,311 CRIT Supervisor running as root (no user in config file)
2019-04-03 03:38:38,311 INFO Included extra file "/etc/supervisor/conf.d/sshd.conf" during parsing
2019-04-03 03:38:38,311 INFO Included extra file "/etc/supervisor/conf.d/xrdp-sesman.conf" during parsing
2019-04-03 03:38:38,311 INFO Included extra file "/etc/supervisor/conf.d/xrdp.conf" during parsing
2019-04-03 03:38:38,333 INFO RPC interface 'supervisor' initialized
2019-04-03 03:38:38,333 CRIT Server 'inet_http_server' running without any HTTP authentication checking
2019-04-03 03:38:38,333 INFO RPC interface 'supervisor' initialized
2019-04-03 03:38:38,334 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2019-04-03 03:38:38,334 INFO supervisord started with pid 1
2019-04-03 03:38:39,336 INFO spawned: 'xrdp-sesman' with pid 33
2019-04-03 03:38:39,338 INFO spawned: 'sshd' with pid 34
2019-04-03 03:38:39,340 INFO spawned: 'xrdp' with pid 35
2019-04-03 03:38:40,495 INFO success: xrdp-sesman entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-04-03 03:38:40,495 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-04-03 03:38:40,495 INFO success: xrdp entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

root@terminalserver:/var/log# cat xrdp.log
[20190403-03:38:39] [INFO ] starting xrdp with pid 35
[20190403-03:38:39] [INFO ] listening to port 3389 on 0.0.0.0
[20190403-03:38:54] [INFO ] Socket 11: AF_INET6 connection received from ::ffff:151.16.98.233 port 58088
[20190403-03:38:55] [DEBUG] Closed socket 11 (AF_INET6 ::ffff:172.17.0.2 port 3389)
[20190403-03:38:55] [DEBUG] Closed socket 10 (AF_INET6 :: port 3389)
[20190403-03:38:55] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20190403-03:38:55] [ERROR] Cannot read certificate file /etc/xrdp/cert.pem: No such file or directory
[20190403-03:38:55] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20190403-03:38:55] [ERROR] Cannot read private key file /etc/xrdp/key.pem: No such file or directory
[20190403-03:38:55] [DEBUG] TLSv1.2 enabled
[20190403-03:38:55] [DEBUG] TLSv1.1 enabled
[20190403-03:38:55] [DEBUG] TLSv1 enabled
[20190403-03:38:55] [DEBUG] Security layer: requested 11, selected 0
[20190403-03:38:56] [DEBUG] Closed socket 11 (AF_INET6 ::ffff:172.17.0.2 port 3389)
[20190403-03:38:56] [INFO ] Socket 11: AF_INET6 connection received from ::ffff:151.16.98.233 port 58090
[20190403-03:38:56] [DEBUG] Closed socket 11 (AF_INET6 ::ffff:172.17.0.2 port 3389)
[20190403-03:38:56] [DEBUG] Closed socket 10 (AF_INET6 :: port 3389)
[20190403-03:38:56] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20190403-03:38:56] [ERROR] Cannot read certificate file /etc/xrdp/cert.pem: No such file or directory
[20190403-03:38:57] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20190403-03:38:57] [ERROR] Cannot read private key file /etc/xrdp/key.pem: No such file or directory
[20190403-03:38:57] [DEBUG] TLSv1.2 enabled
[20190403-03:38:57] [DEBUG] TLSv1.1 enabled
[20190403-03:38:57] [DEBUG] TLSv1 enabled
[20190403-03:38:57] [DEBUG] Security layer: requested 0, selected 0
[20190403-03:38:57] [INFO ] connected client computer name: MacBook-Pro-de-
[20190403-03:38:58] [INFO ] Non-TLS connection established from ::ffff:151.16.98.233 port 58090: encrypted with standard RDP security
[20190403-03:38:58] [DEBUG] xrdp_00000025_wm_login_mode_event_00000001
[20190403-03:38:58] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20190403-03:38:58] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file
[20190403-03:38:58] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20190403-03:38:59] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20190403-03:38:59] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20190403-03:38:59] [DEBUG] return value from xrdp_mm_connect 0
[20190403-03:39:02] [INFO ] xrdp_wm_log_msg: login failed for display 0
[20190403-03:39:02] [DEBUG] xrdp_mm_module_cleanup
[20190403-03:39:02] [DEBUG] Closed socket 15 (AF_INET6 ::ffff:127.0.0.1 port 32910)

root@terminalserver:/var/log# cat xrdp-sesman.log
[20190403-03:38:39] [DEBUG] libscp initialized
[20190403-03:38:39] [INFO ] starting xrdp-sesman with pid 33
[20190403-03:38:39] [INFO ] listening to port 3350 on 127.0.0.1
[20190403-03:38:58] [INFO ] A connection received from ::ffff:127.0.0.1 port 32910
[20190403-03:39:02] [DEBUG] Closed socket 7 (AF_INET6 ::ffff:127.0.0.1 port 3350)

Would you like to try accessing it? I can give you the IP and credentials if wanted

psychemedia commented 5 years ago

The login works fine for me on a Mac with Microsoft RDP client with a simple start command, eg

docker run --name tm129 --hostname terminalserver2 --shm-size 1g -p 3391:3389 ousefulcoursecontainers/tm129rdp

But I get a black screen when I login if:

I also get a black screen if in a container built FROM danielguerra/ubuntu-xrdp:

If I try to add a new user via a Dockerfile built FROM danielguerra/ubuntu-xrdp :

RUN useradd -ms /bin/bash myuser -p "$(openssl passwd -1 mypass)"

when I connect with username and no password I get the empty dialog as in the screenshot at the top of this issue; if I log in with the new user/password combination I just get a black screen;

If I try to docker commit any container (even just a literal one) based on FROM danielguerra/ubuntu-xrdp and then try to connect to a container launched from the new image I just get a black screen. Which suggests a shutdown/startup issue?

danielguerra69 commented 5 years ago

What client does have problems ? RDP is a microsoft protocol. So this is a client issue ?

antonioantunes commented 5 years ago

I'm using "Microsoft Remote Desktop - Version 10.2.10 (1582)" for Mac, on a retina-display MacBook (I think it might be related to Hi-Dpi screen too.

Exactly the same container image, when connecting from Windows, works perfect. When connecting from Mac client exhibits the exactly same screen as the screenshot from first post of this issue.

danielguerra69 commented 5 years ago

I used the same client so that shouldn't be the issue. There is a newer version 10.2.11. My display settings.

Screenshot 2019-04-08 at 21 07 16
antonioantunes commented 5 years ago

Hello,

Upgraded to 10.2.11 here, tried with your settings (mine were already like yours), same thing.

If you want to try to connect to my container to see if it works, it's available at 91.121.0.50 port 63389 (Port isn't the issue, was happening in 3389 before too), as the issue is before auth you won't need any credential.

danielguerra69 commented 5 years ago

When I login with ubuntu ubuntu I get a blank like you. When I login in my own with an unknown account I get a blank too. Make sure user ubuntu, or the user you want, is there. docker exec myrdp passwd mygreatuser. After this try to login with mygreatuser ...

antonioantunes commented 5 years ago

I'm not using any credential set up in the client (I think the name for it is "Network Level Authentication" but not sure), I'm connecting only with ip/port to afterwards auth inside the session.

Will try specifying user/password before to see it if then works.

antonioantunes commented 5 years ago

Yeah, that's it. If "Network Level Authentication" isn't used, or wrong credentials are provided to it, the blank screen appers. If used with valid credentials, then session is logged in directly.

danielguerra69 commented 5 years ago

Great