NX clients not visible in Epoptes

Asked by Charles Howardandsware

HI all.

I'm trying to setup a linux terminal server.
I'm currently trialing Edubuntu 12.04.

In my scenario some students need to connect over the web and because of bandwidth restrictions we have to use the NX protocol.

I've installed FreenNX as per this web page:

http://www.humans-enabled.com/2012/0...untu-1204.html

It seemed to work fine and I can connect with pxe and nx clients.
However, whilst testing I've found that the nx clients aren't appearing in Epoptes.

pxe clients work fine.

I've tried several nx clients and tried changing some connection options.
However, I'm completely new to ltsp, NX and epoptes and have no idea what I'm doing.

Any suggestions gratefully recieved.

Question information

Language:
English Edit question
Status:
Solved
For:
Epoptes Edit question
Assignee:
No assignee Edit question
Solved by:
Alkis Georgopoulos
Solved:
Last query:
Last reply:
Revision history for this message
Alkis Georgopoulos (alkisg) said :
#1

Hi,

freenx isn't actively maintained, so you'd better switch to using x2go, it works fine with epoptes here.

With freenx, can you run `epoptes` from the command line and paste the output?

Revision history for this message
Charles Howardandsware (charlie101) said :
#2

Hi Alkis

Thanks for replying.

I am happy to use another tool if it gets the job done.
As I said, I'm new to ltsp and the whole protocol stack.

I hadn't come across x2go but I will certainly look at it now.

Do you still want me to post the epoptes output given that I might be switching to x2go?

If so which 'shell' do you want me to execute it from ie a server console shell or a nx client server side shell?

Thanks again

Revision history for this message
Alkis Georgopoulos (alkisg) said :
#3

Sure, since you already have freenx installed, let's try to troubleshoot it.
Try first to run `epoptes` on a gnome-terminal on the server, and then connect a freenx client and paste the output of the server terminal.

Revision history for this message
Charles Howardandsware (charlie101) said :
#4

Hello Alkis

Sorry I didn't get back to you last night but it was gone 4am here so I went to bed somewhat tired of all the reading and experimenting. Before retiring I did managed to install X2GO. However, I'm running the server and clients in virtual machines and in order not to confuse issues I restored a snapshot of the fresh 'edubuntu install' before starting the x2go installation. Hence I've lost the NX build.

Not to worry though as the same problem seems to have arisen with the x2go connetions.
Seem it might be something to do with my server build?
I ran the epoptes command as you requested and added a few more permutations and commands:-

I have three users on the server that I might use

Root
charlie (the sudo user named at install)
user1 (a test user)

If I login at the server console as charlie and run the command: 'ps axu|grep -i epoptes' in a terminal
I get the following:

---------------------------------

root /usr/bin/python /usr/bin/twistd --pidfile /var/run/epoptes.pid --logfile /var/log/epoptes.log epoptes

------------------------------------

If I then su to root (sudo su - ) and run the epoptes command I get:

---------------------------------

"user root must be a member of group epoptes to run epoptes".

------------------------------------

If the run the epoptes command as charlie the Epoptes gui pops up, Theres is no message in the terminal window.

A 'ps axu' shows the addition of:

-----------------------------

charlie /usr/bin/python /usr/bin/epoptes

-----------------------------

If I issue a (xhost +) and (su - user1) followed by the 'epoptes' command.
The epoptes gui again pops up and a 'ps axu' shows:

-----------------------------------------------

root /usr/bin/python /usr/bin/twistd --pidfile /var/run/epoptes.pid --logfile /var/log/epoptes.log epoptes
charlie /usr/bin/python /usr/bin/epoptes
user1 /usr/bin/python /usr/bin/epoptes

------------------------------------------------

So I now have two epoptes gui's running on my console's desktop.

I now start a thin client connecting via edubuntu/ltsp/pxe.
The thin client shows up in the epoptes gui started under user 'charlie' but not in the one started under user 'user1'.

Each of the terminals from which epoptes gui's were stared shows a correspondingly different message.

Charlie terminal message:-
-------------------------------------------------
New connection from 127.0.0.1:45698
addClient's been called for 127.0.0:45698
Continuing inside addClient...
* This client is a new one, creating an instance
* I am a user client, will add user1 in my list
-------------------------------------------------

user1 terminal message:-
-------------------------------------------------
New connection from 127.0.0.1:45698
addClient's been called for 127.0.0:45698
* Won't add this client to my lists
-------------------------------------------------

ps axu now shows:
--------------------------------------------
root /usr/bin/python /usr/bin/twistd --pidfile /var/run/epoptes.pid --logfile /var/log/epoptes.log epoptes
charlie /usr/bin/python /usr/bin/epoptes
user1 /usr/bin/python /usr/bin/epoptes
user1 epoptes-client
user1 socat openssl-connect:localhost:789,cafile=/etc/epoptes/server.crt,interval=60,forever EXEC:bash -c \"exec -a epoptes-client sh\"

--------------------------------------------

If I now connect from a different client using x2go it doens't show up in either of the epoptes gui's.
and the output from 'ps axu|grep epoptes' is unchanged.

If I open a terminal on the x2go desktop and run the 'epoptes' command the epoptes gui pops.
The message in the terminal windows says:

---------------------------------------
Got clients: 127.0.0.1:46300
----
**addClient's been called for 127.0.0.1:46300
* Won't add this client to my lists
----------------------------------------

Any advice gratefully received.

Revision history for this message
Charles Howardandsware (charlie101) said :
#5

Hi Alkis

I thought it might be a good idea to compare the processes running in each of the client sessions ie the working thin client and the x2go session which isn't registering with Epoptes.

These are the processes running in the working session which were missing from the x2go session:-
--------------------------------------------------
sshd: user2@pts/6

/bin/sh -

/usr/lib/openssh/sftp-server

bash -c LTSP_CLIENT=192.168.0.20 LTSP_CLIENT_HOSTNAME=ltsp20 LC_ALL=C LANGUAGE=C LANG=C

/usr/bin/ck-launch-session /usr/bin/dbus-launch --exit-with-session /usr/bin/startlubuntu

/usr/lib/notification-daemon/notification-daemon

/usr/bin/gnome-keyring-daemon --start --components=ssh

socat openssl-connect:localhost:789,cafile=/etc/epoptes/server.crt,interval=60,forever EXEC:bash -c \"exec -a epoptes-client

epoptes-client

---------------------------------------------------

The process/command that leapted out at me was the 'epoptes-client' command.
So I ran this command in a terminal on the x2go desktop and this was the output:-

---------------------------------------

$ epoptes-client
* Epoptes-client connecting to server:789...
2012/11/12 00:59:47 socat[11051] E getaddrinfo("server", "(null)", {1,0,1,6}, {} ): Name or service not known

-------------------------------

I hope this throws some light on the issue?

Revision history for this message
Charles Howardandsware (charlie101) said :
#6

Update
----------

Focusing on the epoptes-client command not working; I could see from the error message that 'socat' was being called by 'epoptes-client' and 'socat' wasn't happy with it's parameters.

I have no idea how 'epoptes-client' is calling 'socat' or how to find out.
So I looked where I could.
I inspected the environement variables on each client.
There were differences but nothing stood out.

So I decided to run the 'epoptes-client' command again on each client desktop to see if comparing the socat message with the output from the working session gave any info'.

I noticed that the working session said:-
* Epoptes-client connecting to localhost:789

Whereas the x2go session said:-
* Epoptes-client connecting to server:789

Given that 'locahost' is a valid address and 'server' isn't unless it's been set somewhere. Given also that 'server not known' appears in the error message. I decided to try passing in 'localhost' as a parameter to the 'epoptes-client' call.

It turned out to be straight forward enough:-

$ epoptes-client localhost

And it worked.

The question now is: how to fix the 'epoptes-client' call to socat when a x2go session logs in?

What exactly needs fixing and where?

Does this problem lie within my epoptes installation? or x2go? or somewhere in the Edubuntu installation?

Any suggestions gratefully received.

Revision history for this message
Charles Howardandsware (charlie101) said :
#7

Tomorrow I'll try posting the problem on x2go and edubuntu sites.

Revision history for this message
Best Alkis Georgopoulos (alkisg) said :
#8

Hi Charles,

the problem is that you didn't tell epoptes-client which server to connect to. That's described in the http://www.epoptes.org installation page:

"The client package settings are stored in /etc/default/epoptes-client. A useful variable in that file is SERVER, which is the DNS name or IP address of the server that the clients will be connecting to:"

Epoptes-client is clever enough to autodetect LTSP clients and connect to localhost then, but it cannot (yet?) autodetect NX clients.

In short, just add "127.0.0.1 server" in your server's /etc/hosts.

Revision history for this message
Charles Howardandsware (charlie101) said :
#9

Hi Alkis

I updated the /etc/default/epoptes-client and set SERVER=localhost.
Is that OK? Or should I leave SERVER=server in the epoptes-clients file and update the 'hosts' file instead?

Thanks very much for your help.

Revision history for this message
Charles Howardandsware (charlie101) said :
#10

Thanks Alkis Georgopoulos, that solved my question.

Revision history for this message
Alkis Georgopoulos (alkisg) said :
#11

> Is that OK? Or should I leave SERVER=server in the epoptes-clients file and update the 'hosts' file instead?

Both methods are OK in your use case.