xpra icon
Bug tracker and wiki

Opened 2 months ago

Closed 2 months ago

#1518 closed defect (fixed)

Ports opening and session start

Reported by: Denis01 Owned by: Denis01
Priority: major Milestone:
Component: server Version: trunk
Keywords: Cc:

Description

Hello,
finally i got the reason!!!!!
It could be because of some specifics of Centos or virtual server or something specific else with my server.
But then the user is completely deleted from the system after the session usage

userdel -r "username"

and then is created again - the session starts and port is open!!!
Tested several (many) times:

  • user created, session started (from Terminal), session closed (with --exit-with-clildren), trying to start the session again from Terminal -> port is closed. Doesn't work
  • user created, session started from Terminal, session closed (--exit-with-children), user deleted, user created ->> works at 100%

I've checked and the folder "/run/user/" is deleted after then the session ends.

Could you please help and say what other files or settings in Centos are linked with the user profile (and which are not closed/deleted after the session)? What else can be checked to understand better the situation?

Thanks a lot in advance!

Attachments (1)

test.py (341 bytes) - added by Denis01 2 months ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 2 months ago by Antoine Martin

Owner: changed from Antoine Martin to Denis01

Please provide clear steps to reproduce the problem you are describing.

comment:2 Changed 2 months ago by Denis01

So
1) user creation

adduser CCC
passwd CCC
usermod -a -G xpra CCC

2) from Putty (login under user) session start

xpra start --bind-tcp=XXX.XXX.XXX.XXX:10000 --start-child=/bin/libreoffice5.2 --exit-with-children --attach=no --auth=allow

3) Close Putty
4) Enter with HTML client
5) some actions inside the application (text typing, screen size adjustment)
6) Close the application inside HTML browser (by clicking on the cross in right-top)

comment:3 Changed 2 months ago by Antoine Martin

Those steps are very well tested, on all supported platforms, including centos.
I don't see what the problem is, works fine every time here.

Maybe you're not describing your problem very well. What is "from Terminal"?
(a terminal? a specific terminal application called "Terminal"? is this running from an X11 server, or via ssh? does it matter?)
Does "--exit-with-children" make any difference? Does the bug also occur if you run "xpra stop" instead?
Does "libreoffice" matter? Can you reproduce with an xterm instead?

port is closed. Doesn't work

I am certain that this is not the message that you saw.
Copy that message, don't make one up.

Anyway, you're also not reporting: exact version used, centos version, etc..

comment:4 Changed 2 months ago by Denis01

Hello,
xpra X11 version 2.1-r15785 64-bit
Centos 7.3
Sorry, will be more precise. Terminal = Putty which connects to the server via SSH.
Tried with/without "--exit-with-children" with gedit and libreoffice5.2 - the same result
"xpra stop" doesn't change the situation.

I think that it may happen after the start of xpra from py script.
So if a new user created and commands to start xpra are executed only with Putty (xpra start..... or xpra start ssh/.....) i've never seen problem with ports and sessions.
But if the session even ONCE is started from simple *.py script asking the server to create session -> prb can appear.
Script like

cmd = xpra start ssh/user:pass@XXX.XXX.XXX.XXX:22 --bind-tcp=XXX.XXX.XXX.XXX:10000 --start=/bin/libreoffice5.2 --attach=no
PIPE = subprocess.PIPE
p = subprocess.Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=subprocess.STDOUT, close_fds=True)
s = p.stdout.read()

or the call for session via Paramico and command

xpra start --bind-tcp=XXX.XXX.XXX.XXX:10000 --start=/bin/libreoffice5.2 --attach=no

And just to have a look on this situation from other hand (probably it will give smth) what i noticed is:
then xpra is started from command line in Putty (doesn't matter "xpra start" or "xpra start ssh" HTML client perfectly and properly manages the "desktop−scaling" but then session is called from *.py script -> there is no reaction on "desktop−scaling" option: on, off, desktop−size. Doesn't matter- all the time the same result:
session is open (and in the case of libreoffice) but with very very very wide screen (in the attach) so it needs to pull the screen with mouse pointer till the right end and click on screen resize icon and just then application screen fits properly in browser screen.
So could it be that in such case X screen just doesn't understand smth with screen settings (then called from script), open the application then saved somewhere in user's setting something and upon the next start is frozen because of such settings?
P.S. Apologize in advance if have not been clear somewhere in the description of situation

Last edited 2 months ago by Denis01 (previous) (diff)

comment:5 Changed 2 months ago by Denis01

some additional details.
So if there are the following files in User's folder (Login under user by Putty via SSH and command "ls -a")

.  ..  .bash_logout  .bash_profile  .bashrc  .mozilla

xpra starts from *.py script.
Normally such situation then user is just created.
Then after the first start from script and then the close of the application (with --exit-with-children option activated)
There are the following files

.  ..  .Xauthority  .bash_history  .bash_logout  .bash_profile  .bashrc  .cache  .config  .esd_auth  .mozilla  .xpra

xpra doesn't start (session is started but port is not open) neither from Putty command nor from script.

And then just deleted by "rm -rf" command from Putty the following files and folders

.Xauthority
.bash_history
.cache
.config
.xpra

(without deleting a user completely). Session starts with port opened

P.S. should i create for the situation with "desktop−scaling" another ticket?

P.P.S Test script file is in the attach file.
XXX.XXX.XXX.XXX should be remplaced with IP address
Script to be put in /Home/ folder.
And then start of script (commands in Putty)
{{
cd ..
python test.py
}}

Last edited 2 months ago by Denis01 (previous) (diff)

Changed 2 months ago by Denis01

Attachment: test.py added

comment:6 Changed 2 months ago by Denis01

And another point.
It seems that only ".cache" has to be deleted.
So if this folder is deleted from script then Session can be started correctly from script.py without any problem.
And in this case it seems that "desktop−size" problem disappears as well

comment:7 Changed 2 months ago by Antoine Martin

Component: coreserver
Type: taskdefect

The .cache folder is not used or created by xpra.
It is very likely that the problem is with your client application, it probably exits which makes xpra exit since you specified --exit-with-children.
You should try running an xterm instead and launch the application from there to simplify things. You may even get some useful log messages there.
I am likely to close this ticket as notabug.

comment:8 Changed 2 months ago by Denis01

Resolution: fixed
Status: newclosed

Yep, let's close it.
Tested with some other applications (but just "open-close" -> works perfectly!
And if the prb appears again it will be easy to unblock the situation.
P.s almost happy :-)

Note: See TracTickets for help on using tickets.