Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 25/26 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 15th June 2017, 11:55 AM
Huwmungous Offline
Registered User
 
Join Date: Feb 2011
Posts: 8
windows_7chrome
Angry xrdp " Listening socket is in wrong state, terminating listener"

At some point my working xrdp stopped working. I have been Googling the issue but have no up to date information to work on.

The symptoms are: when the user logs in (from a Windows host)
  1. first attempt the client reports "some error"
  2. Second attempt shows a black screen for a second or two which then closes

xrdp log shows the following

Code:
[20170615-11:14:27] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20170615-11:14:28] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20170615-11:14:28] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20170615-11:14:28] [DEBUG] return value from xrdp_mm_connect 0
[20170615-11:14:29] [INFO ] xrdp_wm_log_msg: login successful for display 19
[20170615-11:14:29] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20170615-11:14:29] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5919
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC tcp connected
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC security level is 2 (1 = none, 2 = standard)
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC password ok
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC sending share flag
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC receiving server init
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC receiving pixel format
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC receiving name length
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC receiving name
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC sending pixel format
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC sending encodings
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC sending framebuffer update request
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC sending cursor
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: VNC connection complete, connected ok
[20170615-11:14:31] [INFO ] The following channel is allowed: rdpdr (0)
[20170615-11:14:31] [INFO ] The following channel is allowed: rdpsnd (1)
[20170615-11:14:31] [INFO ] The following channel is allowed: cliprdr (2)
[20170615-11:14:31] [INFO ] The following channel is allowed: drdynvc (3)
[20170615-11:14:31] [DEBUG] The allow channel list now initialized for this session
[20170615-11:14:31] [DEBUG] xrdp_wm_log_msg: connected ok
[20170615-11:14:31] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20170615-11:14:32] [DEBUG] Closed socket 18 (AF_INET 127.0.0.1:38414)
[20170615-11:14:32] [DEBUG] VNC got clip data
[20170615-11:14:32] [DEBUG] Closed socket 12 (AF_INET 10.9.8.10:3389)
[20170615-11:14:32] [DEBUG] xrdp_mm_module_cleanup
[20170615-11:14:32] [DEBUG] VNC mod_exit
[20170615-11:14:32] [DEBUG] Closed socket 19 (AF_INET 127.0.0.1:40824)
[20170615-11:14:32] [DEBUG] Closed socket 20 (AF_UNIX)
[20170615-11:14:32] [ERROR] Listening socket is in wrong state, terminating listener
[20170615-11:14:32] [CORE ] shutting down log subsystem...
This behaviour is reported as a bug, now fixed, on Ubuntu in various places and there are suggestions it relates to ssh certs, but nothing I have tried so far seems to make a difference.

My requirement is that users should be able to login to the Fedora box via RDP (don't care which desktop), but also to be able to run a Gnome session from the console itself.

What is my next step?
Reply With Quote
  #2  
Old 15th June 2017, 04:40 PM
tryfedoraa Offline
Registered User
 
Join Date: May 2017
Location: www
Posts: 110
windows_98_nt_2000chrome
Re: xrdp " Listening socket is in wrong state, terminating listener"

Quote:
Second attempt shows a black screen for a second or two which then closes
have you tried adding:

Code:
delay_ms=2000
Reply With Quote
  #3  
Old 15th June 2017, 04:41 PM
Huwmungous Offline
Registered User
 
Join Date: Feb 2011
Posts: 8
windows_7chrome
Re: xrdp " Listening socket is in wrong state, terminating listener"

to xrdp.ini?

I tried that - but to no effect

Last edited by Huwmungous; 15th June 2017 at 05:09 PM.
Reply With Quote
  #4  
Old 16th June 2017, 10:14 AM
tryfedoraa Offline
Registered User
 
Join Date: May 2017
Location: www
Posts: 110
windows_98_nt_2000chrome
Re: xrdp " Listening socket is in wrong state, terminating listener"

Check the files in /etc/xrdp and create them if they don't exist or are empty:
  • cert.pem
  • key.pem


Code:
openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 365
  • rsakeys.ini

Code:
sudo xrdp-keygen xrdp auto 2048

Restart the xrdp service

Code:
service xrdp restart
Reply With Quote
  #5  
Old 19th June 2017, 10:41 AM
Huwmungous Offline
Registered User
 
Join Date: Feb 2011
Posts: 8
windows_7chrome
Smile Re: xrdp " Listening socket is in wrong state, terminating listener"

Fab - sorted.

I had guessed that my certs had expired but was missing the second of the 2 commands you suggested.

All up and running.
Reply With Quote
  #6  
Old 4th July 2017, 05:35 PM
armonica Offline
Registered User
 
Join Date: Jan 2017
Location: Huntingtown MD
Posts: 6
linuxfedorafirefox
Re: xrdp " Listening socket is in wrong state, terminating listener"

Anyone get this working? I use xrdp a LOT. I set up test machines as VMs so I can snap, test and restore while developing code. ESXI is great that way. Recently it broke, I think about the same time this thread started. I can't get it to work anymore. I've rebuilt the VM, I've updated, I've tried everything I can get my hands on. Here's what I'm doing:

New built vm host. Has xrdp, tigervnc, desktop. F25.

[robert@firefox ~]$ rdesktop -g 2460x1340 192.168.2.13 &
[1] 5914
[robert@firefox ~]$ Autoselected keyboard map en-us
Connection established using SSL.
NOT IMPLEMENTED: RDPDR pakid 0x554c of component 0x4472

This pops up the screen, I can see the desktop for about 1/10 second then it's blown away. Nothing in the local user files.

In /var/log,
xrdp-sesman.log:
20170704-12:25:59] [INFO ] Socket 12: AF_INET connection received from 192.168.2.2 port 34632
[20170704-12:25:59] [DEBUG] Closed socket 12 (AF_INET 192.168.2.13:3389)
[20170704-12:25:59] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:3389)
[20170704-12:25:59] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20170704-12:25:59] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20170704-12:25:59] [DEBUG] TLSv1.2 enabled
[20170704-12:25:59] [DEBUG] TLSv1.1 enabled
[20170704-12:25:59] [DEBUG] TLSv1 enabled
[20170704-12:25:59] [DEBUG] Security layer: requested 1, selected 1
[20170704-12:25:59] [INFO ] connected client computer name: firefox
[20170704-12:25:59] [INFO ] TLS connection established from 192.168.2.2 port 34632: TLSv1 with cipher AES256-SHA
[20170704-12:25:59] [DEBUG] xrdp_0000444e_wm_login_mode_event_00000001
[20170704-12:26:00] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20170704-12:26:00] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file
[20170704-12:26:02] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20170704-12:26:02] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20170704-12:26:02] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20170704-12:26:02] [DEBUG] return value from xrdp_mm_connect 0
[20170704-12:26:02] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20170704-12:26:02] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20170704-12:26:02] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5910
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC tcp connected
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC security level is 2 (1 = none, 2 = standard)
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC password ok
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC sending share flag
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC receiving server init
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC receiving pixel format
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC receiving name length
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC receiving name
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC sending pixel format
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC sending encodings
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC sending framebuffer update request
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC sending cursor
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC connection complete, connected ok
[20170704-12:26:03] [INFO ] The following channel is allowed: cliprdr (0)
[20170704-12:26:03] [INFO ] The following channel is allowed: rdpsnd (1)
[20170704-12:26:03] [INFO ] This channel is disabled (not in List): snddbg
[20170704-12:26:03] [INFO ] The following channel is not allowed: snddbg (2)
[20170704-12:26:03] [INFO ] The following channel is allowed: rdpdr (3)
[20170704-12:26:03] [DEBUG] The allow channel list now initialized for this session
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: connected ok
[20170704-12:26:03] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20170704-12:26:03] [DEBUG] Closed socket 18 (AF_INET 127.0.0.1:51866)
[20170704-12:26:03] [DEBUG] VNC got clip data
[20170704-12:26:03] [DEBUG] Closed socket 12 (AF_INET 192.168.2.13:3389)
[20170704-12:26:03] [DEBUG] xrdp_mm_module_cleanup
[20170704-12:26:03] [DEBUG] VNC mod_exit
[20170704-12:26:03] [DEBUG] Closed socket 19 (AF_INET 127.0.0.1:42128)
[20170704-12:26:03] [DEBUG] Closed socket 20 (AF_UNIX)
[20170704-12:26:03] [ERROR] Listening socket is in wrong state, terminating listener
[20170704-12:26:03] [CORE ] shutting down log subsystem...


xrdp.log:
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC password ok
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC sending share flag
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC receiving server init
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC receiving pixel format
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC receiving name length
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC receiving name
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC sending pixel format
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC sending encodings
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC sending framebuffer update request
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC sending cursor
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: VNC connection complete, connected ok
[20170704-12:26:03] [INFO ] The following channel is allowed: cliprdr (0)
[20170704-12:26:03] [INFO ] The following channel is allowed: rdpsnd (1)
[20170704-12:26:03] [INFO ] This channel is disabled (not in List): snddbg
[20170704-12:26:03] [INFO ] The following channel is not allowed: snddbg (2)
[20170704-12:26:03] [INFO ] The following channel is allowed: rdpdr (3)
[20170704-12:26:03] [DEBUG] The allow channel list now initialized for this session
[20170704-12:26:03] [DEBUG] xrdp_wm_log_msg: connected ok
[20170704-12:26:03] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20170704-12:26:03] [DEBUG] Closed socket 18 (AF_INET 127.0.0.1:51866)
[20170704-12:26:03] [DEBUG] VNC got clip data
[20170704-12:26:03] [DEBUG] Closed socket 12 (AF_INET 192.168.2.13:3389)
[20170704-12:26:03] [DEBUG] xrdp_mm_module_cleanup
[20170704-12:26:03] [DEBUG] VNC mod_exit
[20170704-12:26:03] [DEBUG] Closed socket 19 (AF_INET 127.0.0.1:42128)
[20170704-12:26:03] [DEBUG] Closed socket 20 (AF_UNIX)
[20170704-12:26:03] [ERROR] Listening socket is in wrong state, terminating listener
[20170704-12:26:03] [CORE ] shutting down log subsystem...


I'm very surprised the recent update didn't fix this. I was hopeful it would work. Maybe I'm just overlooking something?
Reply With Quote
  #7  
Old 5th July 2017, 04:26 PM
Huwmungous Offline
Registered User
 
Join Date: Feb 2011
Posts: 8
windows_7chrome
Re: xrdp " Listening socket is in wrong state, terminating listener"

I said the problem was sorted in a previous reply, but the fix was only temporary.

I am not 100% certain the problem I now have is the exact same issue as I have not had a chance to check the logs. I will post back as soon as possible.
Reply With Quote
  #8  
Old 5th July 2017, 04:47 PM
Huwmungous Offline
Registered User
 
Join Date: Feb 2011
Posts: 8
windows_7chrome
Re: xrdp " Listening socket is in wrong state, terminating listener"

Quote:
Originally Posted by Huwmungous View Post
I am not 100% certain the problem I now have is the exact same issue as I have not had a chance to check the logs. I will post back as soon as possible.
I have just checked and the error message is the same.


[20170705-16:39:00] [DEBUG] xrdp_wm_log_msg: connected ok
[20170705-16:39:00] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20170705-16:39:00] [DEBUG] Closed socket 18 (AF_INET 127.0.0.1:34824)
[20170705-16:39:02] [DEBUG] VNC got clip data
[20170705-16:39:02] [DEBUG] Closed socket 12 (AF_INET 10.9.8.10:3389)
[20170705-16:39:02] [DEBUG] xrdp_mm_module_cleanup
[20170705-16:39:02] [DEBUG] VNC mod_exit
[20170705-16:39:02] [DEBUG] Closed socket 19 (AF_INET 127.0.0.1:33534)
[20170705-16:39:02] [DEBUG] Closed socket 20 (AF_UNIX)
[20170705-16:39:02] [ERROR] Listening socket is in wrong state, terminating listener
[20170705-16:39:02] [CORE ] shutting down log subsystem...


Interestingly I did briefly get a desktop with an authentication dialog - entering the password caused the session to close.

Last edited by Huwmungous; 5th July 2017 at 04:51 PM. Reason: Further information
Reply With Quote
  #9  
Old 6th July 2017, 10:30 AM
Huwmungous Offline
Registered User
 
Join Date: Feb 2011
Posts: 8
windows_7chrome
Re: xrdp " Listening socket is in wrong state, terminating listener"

The plot thickens!

Yesterday evening I witnessed my partner's 12 year old daughter logging in to an RDP session from her laptop! I had forgotten that I had shown her how to do this.

She is running Windows 10, I am running Windows 7, so I made a few experiments.

I can RDP to my Raspberry Pi from my workstation.

The Pi can RDP to the target host.

A virtual windows 7 running on the target host can RDP to the target host (although I had problems ending that session)

A virtual Windows 7 on my workstation fails.

A Virtual Ubuntu 15.04 on my workstation is successful.

So it would appear that there is some issue with Windows 7 remotely connecting to xrdp.

Any suggestions anyone?
Reply With Quote
  #10  
Old 7th July 2017, 04:09 AM
armonica Offline
Registered User
 
Join Date: Jan 2017
Location: Huntingtown MD
Posts: 6
linuxfedorafirefox
Re: xrdp " Listening socket is in wrong state, terminating listener"

I fired up Win 10, used mstsc. It looked like it might actually work for a while, then Poof! Gone. At least we can be fairly sure it's not rdesktop.
Reply With Quote
  #11  
Old 8th July 2017, 06:16 PM
Huwmungous Offline
Registered User
 
Join Date: Feb 2011
Posts: 8
windows_7chrome
Re: xrdp " Listening socket is in wrong state, terminating listener"

I think I may have cracked the problem.

I have made quite a few changes over the course of the past week or so but I think the salient points are:

i) Set/uncomment the delay_ms=2000 in the relevant section of xrdp.ini ([Xvnc]) (thanks to askfedoraa for that)

ii) Edit ~/.Xclients to contain ONLY the line 'gnome-session' (or whichever desktop you wish to run)
Reply With Quote
  #12  
Old 8th July 2017, 06:46 PM
armonica Offline
Registered User
 
Join Date: Jan 2017
Location: Huntingtown MD
Posts: 6
linuxfedorafirefox
Re: xrdp " Listening socket is in wrong state, terminating listener"

I saw those before and tried them. For fun I changed the delay_ms to 5000. Still blows away. So now I can see it started up kde and I have a desktop. I just can't touch the mouse or it'll go away or if I wait it goes away.

What I can tell you is whatever happened happened around June 11 and no later than June 20th. I think probably the 15th is when I started having trouble. The only way I know this is I happened to have downloaded a file using the gui on the 11th. By June 20th I was trying to downgrade, install other packages, and generally having a tough time.

HTH
Reply With Quote
  #13  
Old 21st July 2017, 12:41 AM
lavie Offline
Registered User
 
Join Date: Dec 2005
Posts: 48
windows_98_nt_2000chrome
Re: xrdp " Listening socket is in wrong state, terminating listener"

Did you get this to work?? How?
Reply With Quote
  #14  
Old 21st July 2017, 01:51 AM
armonica Offline
Registered User
 
Join Date: Jan 2017
Location: Huntingtown MD
Posts: 6
linuxfedorafirefox
Re: xrdp " Listening socket is in wrong state, terminating listener"

Still broken. I updated my machine to F26, updated the test server to F26, no dice. I think it was a bit better than the F25 version. I've completely rebuilt the test box, tried connecting from a Windows 10 machine. Still blows it away.

So I loaded Ubuntu, I think one a revision or two old, the server version, install xrdp, the KDE desktop and such, works fine. So I'm using Ubuntu and kali until it's fixed.

I think it's safe to say whatever the problem is, it's in xrdp. My guess is it was a change made certainly before June 20th. Probably before June 15th.
Reply With Quote
  #15  
Old 21st July 2017, 09:31 AM
lavie Offline
Registered User
 
Join Date: Dec 2005
Posts: 48
windows_98_nt_2000chrome
Re: xrdp " Listening socket is in wrong state, terminating listener"

Quote:
Originally Posted by armonica View Post
Still broken. I updated my machine to F26, updated the test server to F26, no dice. I think it was a bit better than the F25 version. I've completely rebuilt the test box, tried connecting from a Windows 10 machine. Still blows it away.

So I loaded Ubuntu, I think one a revision or two old, the server version, install xrdp, the KDE desktop and such, works fine. So I'm using Ubuntu and kali until it's fixed.

I think it's safe to say whatever the problem is, it's in xrdp. My guess is it was a change made certainly before June 20th. Probably before June 15th.
Thanks for the quick response!

I don't use RDP frequently. I last used it about 3-4 months ago to access my F25, and it worked fine. I access it from Window 10.

Yesterday, after upgrading one of my F25s to F26, I decided to try to RDP from my Windows. After logon, I got a light blue screen, then a black screen, and then a disconnect. I then tried RDP-ing from Windows 10 to an F25 - and that failed too. I dnf update frequently, so that if an xrdp update was issued in the last few months, it would have been on updated on my F25.

I still have an original Fedora 25 installation medium. I am considering installing it on a virtual machine, to see if that works.

BYW, using a vinagre client, I van RDP from one Fedora to the other.

To whom do I complain? Where can I register a bug?

TIA,
Lavie
Reply With Quote
Reply

Tags
fedora 25, gnome, vnc, windows 7, xrdp

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Milter-Greylist failing to create socket / "unsafe" PolywogSys Guides & Solutions (Not For Questions) 0 22nd February 2012 02:43 AM
differences between "struct sock" and "struct socket" ahm_irf Programming & Packaging 0 30th March 2009 05:24 AM
System Hangs Gives "kernel: Bad page state in process 'pdflush'" - Any thoughts? Jay Rhine Using Fedora 0 26th September 2007 05:51 PM
are new solid state drives equivalent to "swapon /dev/sdc1" icthy Using Fedora 8 4th January 2007 04:49 PM
Error:visibility arg must be one of "default", "hidden", "protected" or "internal" wangfeng Using Fedora 0 23rd May 2005 04:59 AM


Current GMT-time: 03:56 (Thursday, 17-08-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat