Bug 298642 - KDM unable to connect to localhost IPV6 started through Xvnc, vncviewer
Summary: KDM unable to connect to localhost IPV6 started through Xvnc, vncviewer
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdm
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: kdm bugs tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-23 07:30 UTC by vikram goyal
Modified: 2018-04-16 20:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vikram goyal 2012-04-23 07:30:14 UTC
I needed linux terminal services so I created services under xinetd for Xvnc to connect through vncviewer from remote. I was using KDM, switched through /etc/sysconfig/desktop settings file.

When connecting through vncviewer I got black screen with cursor but no KDM login screen.
/var/log/messages were:
Apr 23 11:32:14 mail2 kdm: fe80::21f:d0ff:fe44:6332:1[4820]: Cannot connect to fe80::21f:d0ff:fe44:6332:1, giving up
Apr 23 11:32:14 mail2 kdm[1350]: Display fe80::21f:d0ff:fe44:6332:1 cannot be opened

I searched net & found the problem resolved in one thread, namely:
http://forums.opensuse.org/network-internet/411572-opensuse-11-1-vnc-black-white-x-cursor.html
On comment 3 the the solution was given.

I deleted IPV6 entry for localhost from /etc/hosts file & KDM could then it could connect to the
remote viewer.
The problem is that, reboot adds back the IPV6 localhost entry to /etc/hosts file & it has to be deleted everytime. Also if one is not able to find the solution then one is stuck forever or use GDM.

Reproducible: Always

Steps to Reproduce:
1.See Details section
2.
3.



Installed Packages Versions:
kde-settings-kdm.noarch             4.6-10.fc15
kdm.x86_64                          4.6.5-8.fc15
tigervnc-server-minimal-1.1.0-1.fc15.x86_64
Comment 1 Petr Pisar 2013-04-07 13:54:19 UTC
Still true with kdm-4.10.2. Simple reproducer:

Enable XDMCP, start kdm, and run "X -query ::1 :1". You get some convesation on XDMCP UDP IPv6 port, but no X11 connection from the kdm to the X server. If I run "X -query 127.0.01 :1", everything is good.
Comment 2 Petr Pisar 2013-04-07 14:13:00 UTC
The problem is XDMCP server receives connection from ::1, but it askes greeter to connect to link scope address to the X server which if course is wrong. In addition, the greeter tries to connect via wrong interface (loopback instead of ethernet in this case):

connect(3, {sa_family=AF_INET6, sin6_port=htons(6002), inet_pton(AF_INET6, "fe80::5246:5dff:fe8e:a186", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EINVAL (Invalid argument)

XDMCP should pass XDMCP client address to the greeter process ([::1]:6002 in this case).
Comment 3 Petr Pisar 2013-04-07 14:13:31 UTC
s/XDMCP should/XDMCP server should/
Comment 4 Petr Pisar 2013-04-07 14:31:45 UTC
This is core log when connecting XDMCP client from ::1 listing on [::1]:6002:

Apr  7 16:28:14 album kdm[19941]: select returns 1
Apr  7 16:28:14 album kdm[19941]: processRequestSocket
Apr  7 16:28:14 album kdm[19941]: header: 1 2 1
Apr  7 16:28:14 album kdm[19941]: <query> respond 1
Apr  7 16:28:14 album kdm[19941]: convertAddr returning 6 for family 10
Apr  7 16:28:14 album kdm[19941]: all_query_respond: conntype=6, addr=16: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01
Apr  7 16:28:14 album kdm[19941]: checkIndirectChoice
Apr  7 16:28:14 album kdm[19941]:   host not registered
Apr  7 16:28:14 album kdm[19941]: scanAccessDatabase
Apr  7 16:28:14 album kdm[19941]: send <willing> (null) 2 users, load: 0,03, 0,03, 0,06
Apr  7 16:28:14 album kdm[19941]: select returns 1
Apr  7 16:28:14 album kdm[19941]: select returns 1
Apr  7 16:28:14 album kdm[19941]: processRequestSocket
Apr  7 16:28:14 album kdm[19941]: header: 1 7 111
Apr  7 16:28:14 album kdm[19941]: <request> respond 111
Apr  7 16:28:14 album kdm[19941]: findProtoDisplay
Apr  7 16:28:14 album kdm[19941]: newProtoDisplay
Apr  7 16:28:14 album kdm[19941]: newProtoDisplay 0x00000000015f0a50
Apr  7 16:28:14 album kdm[19941]: got 0x00000000015f3c80 (18 MIT-MAGIC-COOKIE-1)
Apr  7 16:28:14 album kdm[19941]: <accept> session ID 9600001
Apr  7 16:28:14 album kdm[19941]: select returns 1
Apr  7 16:28:14 album kdm[19941]: processRequestSocket
Apr  7 16:28:14 album kdm[19941]: header: 1 10 23
Apr  7 16:28:14 album kdm[19941]: <manage> 23
Apr  7 16:28:14 album kdm[19941]: findProtoDisplay
Apr  7 16:28:14 album kdm[19941]: <manage> session ID 9600001, pdpy 0x00000000015f0a50
Apr  7 16:28:14 album kdm[19941]: computed display name: fe80::5246:5dff:fe8e:a186:2
Apr  7 16:28:14 album kdm[19941]: created new display fe80::5246:5dff:fe8e:a186:2
Apr  7 16:28:14 album kdm[19941]: convertAddr returning 6 for family 10
Apr  7 16:28:14 album kdm[19941]: checkIndirectChoice
Apr  7 16:28:14 album kdm[19941]:   host not registered
Apr  7 16:28:14 album kdm[19982]: execute: /usr/lib64/kde4/libexec/kdm_config  ; CONINFO=14 14
Apr  7 16:28:14 album kdm[19941]: started config reader ("/usr/lib64/kde4/libexec/kdm_config"), pid 19982
Apr  7 16:28:14 album kdm[19941]: getter now ready
Apr  7 16:28:14 album kdm[19941]: closed config reader
Apr  7 16:28:14 album kdm[19941]: getter now closed
Apr  7 16:28:14 album kdm[19941]: startDisplay fe80::5246:5dff:fe8e:a186:2, try 1
Apr  7 16:28:14 album kdm[19941]: file: /var/run/xauth/Afe80::5246:5dff:fe8e:a186:2-6lLMSb  auth: 0x00000000015f05c0
Apr  7 16:28:14 album kdm[19941]: forking session
Apr  7 16:28:14 album kdm[19941]: forked session, pid 19983
Apr  7 16:28:14 album kdm[19941]: select returns 1
Apr  7 16:28:14 album kdm: fe80::5246:5dff:fe8e:a186:2[19983]: before XOpenDisplay(fe80::5246:5dff:fe8e:a186:2)
Apr  7 16:28:14 album kdm: fe80::5246:5dff:fe8e:a186:2[19983]: after XOpenDisplay(fe80::5246:5dff:fe8e:a186:2)
Apr  7 16:28:14 album kdm: fe80::5246:5dff:fe8e:a186:2[19983]: OpenDisplay(fe80::5246:5dff:fe8e:a186:2) attempt 1 failed: Invalid argument

Obviously the bug is "computed display name: fe80::5246:5dff:fe8e:a186:2".
Comment 5 Petr Pisar 2013-04-07 16:51:39 UTC
I think I understand the problem. My X server listens on [::]:6002, it connects to kdm using ::1, kdm accepts the query and X server returns request packet with list of connection addresses. kdm selects a connection address and send back authenticated reponse.

The problem is my X server puts link-local addesses into the connection addresses list which is wrong because link-local adress is not enough to make a connection. One need to specify interface in addition. However XDMCP does have place for interface identifier (at least I think).

When selectConnectionTypeIndex() called from request_respond() in kdm selects address to send a reply, it picks up first available one which is unfortuntelly the link-scope addess.

If correct display manager sees link-scope address, it should reuse the interface identifier from XDMCP `connection' because only this way is possible to use XDMCP with link-local addresses. kdm puts `0' in my case which is loop-back number in my case coincidently, so I don't know whether this was done on a purpose or it was just an unitialized variable.

Of course hyper correct XDMCP server should skip link-scope addresses if XDMCP request comes from host-scope address.

And of course correct XDMCP client should not advertize link scope addresses if it talks to XDMCP on the same host.
Comment 6 Nate Graham 2018-04-16 20:20:56 UTC
KDM is unmaintained and not used in KDE Plasma 5.

SDDM is the login manager used in KDE Plasma 5. If you still have this same issue with SDDM, please file an issue on the SDDM bugtracker (after doing a search for existing issues first!): https://github.com/sddm/sddm/issues/