[X2Go-Dev] upgrade to Fedora 33 breaks X2Go again, no free display number available, cannot start new session
Robert Kudyba
rkudyba at fordham.edu
Tue Jan 26 16:00:30 CET 2021
Just to follow up, after uninstalling, rebooting, then reinstalling, X2Go
worked. So you are correct that a port must be in use, but not sure why the
lsof command did not return any results.
Some process(es) must lock on to these ports after an upgrade. Not sure if
a simple nice-ing, i.e., increasing the priority of the process would help?
Hope it helps anyone who might stumble on to this thread.
On Mon, Jan 25, 2021 at 8:37 PM Robert Kudyba <rkudyba at fordham.edu> wrote:
> Well it's not firewalld.
>
> lsof -i :6050 returns nothing.
>
> from bash x:
>
> bash -x /usr/lib64/x2go/x2gogetfreeport $(hostname) "$(which ss)" display
> 50
>
> + typeset current_host_name=ourdomain.edu
>
> + typeset ss=/usr/sbin/ss
>
> + typeset type=display
>
> + typeset start=50
>
> + typeset end=65535
>
> + typeset 'empty_regex=^[[:space:]]*$'
>
> + [[ -z ourdomain.edu ]]
>
> + [[ ourdomain.edu =~ ^[[:space:]]*$ ]]
>
> + [[ ourdomain.edu = \(\n\o\n\e\) ]]
>
> + [[ ourdomain.edu = \l\o\c\a\l\h\o\s\t ]]
>
> + [[ -z /usr/sbin/ss ]]
>
> + [[ /usr/sbin/ss =~ ^[[:space:]]*$ ]]
>
> + typeset -i start_i=50
>
> + typeset -i end_i=65535
>
> + [[ -z 50 ]]
>
> + [[ 50 != \5\0 ]]
>
> + [[ 50 -ne 50 ]]
>
> + [[ 50 -lt 0 ]]
>
> + [[ 50 -gt 65535 ]]
>
> + [[ -z 65535 ]]
>
> + [[ 65535 != \6\5\5\3\5 ]]
>
> + [[ 65535 -ne 65535 ]]
>
> + [[ 65535 -lt 50 ]]
>
> + [[ 65535 -gt 65535 ]]
>
> + [[ display != \l\o\w\l\e\v\e\l ]]
>
> + [[ display != \d\i\s\p\l\a\y ]]
>
> ++ x2gopath libexec
>
> + typeset x2go_lib_path=/usr/lib64/x2go
>
> + typeset X2GO_INTERNAL_SOURCE=1
>
> + : 1
>
> + . /usr/lib64/x2go/x2gocheckport
>
> ++ [[ -z 1 ]]
>
> ++ typeset -a used_x2go_ports
>
> ++ typeset -a used_system_ports
>
> ++ typeset -a used_display_ports
>
> ++ used_x2go_ports=()
>
> ++ used_system_ports=()
>
> ++ used_display_ports=()
>
> + unset X2GO_INTERNAL_SOURCE
>
> + typeset -i ret_port=50
>
> + typeset -i ret=1
>
> + typeset -i work_port=0
>
> + typeset -i stop_port=65535
>
> + [[ display = \d\i\s\p\l\a\y ]]
>
> + stop_port=59535
>
> + (( work_port = start ))
>
> + (( i <= stop_port ))
>
> + typeset -i i=0
>
> + typeset -i value_found=0
>
> + [[ display = \d\i\s\p\l\a\y ]]
>
> + check_display_port ourdomain.edu /usr/sbin/ss 50
>
> + typeset current_host_name=ourdomain.edu
>
> + typeset ss=/usr/sbin/ss
>
> + typeset port=50
>
> + typeset 'empty_regex=^[[:space:]]*$'
>
> + [[ -z ourdomain.edu ]]
>
> + [[ ourdomain.edu =~ ^[[:space:]]*$ ]]
>
> + [[ ourdomain.edu = \(\n\o\n\e\) ]]
>
> + [[ ourdomain.edu = \l\o\c\a\l\h\o\s\t ]]
>
> + [[ -z /usr/sbin/ss ]]
>
> + [[ /usr/sbin/ss =~ ^[[:space:]]*$ ]]
>
> + typeset -i port_i=50
>
> + [[ -z 50 ]]
>
> + [[ 50 != \5\0 ]]
>
> + [[ 50 -ne 50 ]]
>
> + [[ 50 -lt 0 ]]
>
> + [[ 50 -gt 59535 ]]
>
> + typeset -i ret=0
>
> + [[ 0 -eq 0 ]]
>
> + initialize_display_ports ourdomain.edu
>
> + typeset current_host_name=ourdomain.edu
>
> + typeset 'empty_regex=^[[:space:]]*$'
>
> + [[ -z ourdomain.edu ]]
>
> + [[ ourdomain.edu =~ ^[[:space:]]*$ ]]
>
> + [[ ourdomain.edu = \(\n\o\n\e\) ]]
>
> + [[ ourdomain.edu = \l\o\c\a\l\h\o\s\t ]]
>
> + typeset -a used_display_ports_work
>
> + used_display_ports_work=()
>
> + IFS='
>
> |'
>
> + read -r -d '' -a used_display_ports_work
>
> ++ /usr/lib64/x2go/x2gogetdisplays ourdomain.edu
>
> + typeset -i item_i=0
>
> + typeset item=
>
> + for item in "${used_display_ports_work[@]}"
>
> + item_i=DBI
>
> + [[ -n DBI ]]
>
> + [[ DBI -eq 0 ]]
>
> + [[ DBI = \0 ]]
>
> + for item in "${used_display_ports_work[@]}"
>
> + item_i='connect('\''dbname=/var/lib/x2go/x2go_sessions'\'','\'''\'',...)'
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> + printf '%d\n' 50
>
> 50
>
> + exit 1
>
> Here's some debug from X2Go Mac Client:
>
> x2go-INFO-1> "Starting X2Go Client 4.1.2.2..."
>
> x2go-WARNING-1> English language requested, not loading translator.
>
> x2go-WARNING-1> English language requested, not loading translator.
>
> x2go-INFO-3> "Started X2Go Client."
>
> x2go-DEBUG-../src/onmainwindow.cpp:575> "$HOME=/Users/rkudyba"
>
> x2go-DEBUG-../src/onmainwindow.cpp:2266> Reading 2 sessions from config
> file.
>
> x2go-DEBUG-../src/sessionbutton.cpp:361> Creating QPixmap with session
> icon: ":/img/icons/128x128/x2gosession.png".
>
> x2go-DEBUG-../src/sessionbutton.cpp:361> Creating QPixmap with session
> icon: ":/img/icons/128x128/x2gosession.png".
>
> x2go-DEBUG-../src/onmainwindow.cpp:13290> libssh not initialized yet.
> Initializing.
>
> x2go-DEBUG-../src/x2goutils.cpp:219> path value at beginning:
> "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware
> Fusion.app/Contents/Public:/opt/X11/bin"
>
> x2go-DEBUG-../src/x2goutils.cpp:242> tmp_clean_add: ("/usr/local/bin")
>
> x2go-DEBUG-../src/x2goutils.cpp:270> clean_add: ("/usr/local/bin")
>
> x2go-DEBUG-../src/x2goutils.cpp:291> found entry i (0) in orig_path_list
> ("/usr/local/bin"): true
>
> x2go-DEBUG-../src/x2goutils.cpp:309> return value at end:
> "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware
> Fusion.app/Contents/Public:/opt/X11/bin"
>
> x2go-DEBUG-../src/x2goutils.cpp:219> path value at beginning:
> "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware
> Fusion.app/Contents/Public:/opt/X11/bin"
>
> x2go-DEBUG-../src/x2goutils.cpp:242> tmp_clean_add: ("/opt/local//bin")
>
> x2go-DEBUG-../src/x2goutils.cpp:270> clean_add: ("/opt/local//bin")
>
> x2go-DEBUG-../src/x2goutils.cpp:291> found entry i (0) in orig_path_list
> ("/opt/local//bin"): false
>
> x2go-DEBUG-../src/x2goutils.cpp:309> return value at end:
> "/opt/local//bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware
> Fusion.app/Contents/Public:/opt/X11/bin"
>
> x2go-DEBUG-../src/pulsemanager.cpp:131> Found PA binary as
> "/Applications/x2goclient.app/Contents/exe/pulseaudio"
>
> x2go-DEBUG-../src/pulsemanager.cpp:132> Corresponding working dir:
> "/Applications/x2goclient.app/Contents/exe"
>
> x2go-DEBUG-../src/pulsemanager.cpp:369> pulseaudio --version
> returned:"pulseaudio 13.0-rebootstrapped
>
> "
>
>
> x2go-DEBUG-../src/pulsemanager.cpp:227> pulse started with arguments
> ("--exit-idle-time=-1", "-n", "-F", "/Users/rkudyba/.x2go/pulse/config.pa",
> "-p",
> "/Applications/x2goclient.app/Contents/Frameworks/pulse-13.0/modules",
> "--high-priority", "--log-level=debug", "--verbose",
> "--log-target=file:/Users/rkudyba/.x2go/pulse/pulse.log") - waiting for it
> to finish...
>
> x2go-DEBUG-../src/onmainwindow.cpp:2752> Creating QPixmap with session
> icon: '":/img/icons/128x128/x2gosession.png"'.
>
> x2go-DEBUG-../src/onmainwindow.cpp:6771> Setting focus.
>
>
> x2go-INFO-8> "Starting connection to server: ourdomain.edu:22"
>
> x2go-DEBUG-../src/onmainwindow.cpp:2853> Starting new ssh connection to
> server:"ourdomain.edu":"22" krbLogin: false
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:168> SshMasterConnection, host "
> ourdomain.edu"; port 22; user "localguy"; useproxy false; proxyserver "";
> proxyport 22
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:248> Starting SSH connection
> without Kerberos authentication.
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:250> SshMasterConnection,
> instance SshMasterConnection(0x7fe92e5bcd00) created.
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:495> SshMasterConnection,
> instance SshMasterConnection(0x7fe92e5bcd00) entering thread.
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:797> Session port before config
> file parse: 22
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:807> Session port after config
> file parse: 22
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:870> Session port before config
> file parse (part 2): 22
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:880> Session port after config
> file parse (part 2): 22
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:904> cserverAuth
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:943> state: 1
>
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1218> Trying password mechanism
> if available.
>
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1222> Password mechanism
> available. Continuing.
>
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:687> User authentication OK.
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1708> LOGIN CHECK:"LOGIN OK
>
> "
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1711> don't have interaction
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1744> LOOP FINISHED
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1748> No interaction needed,
> continue session
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:702> Login Check - OK
>
> x2go-DEBUG-../src/onmainwindow.cpp:2947> SSH connection established.
>
> x2go-DEBUG-../src/onmainwindow.cpp:3374> Continue normal X2Go session
>
> x2go-DEBUG-../src/sshprocess.cpp:199> Executing remote command via
> SshProcess object 0: "x2golistsessions"
>
> x2go-DEBUG-../src/sshprocess.cpp:213> this=SshProcess(0x7fe92e6c1450) Running
> masterCon->addChannelConnection(this, '
> "8c7a9bb9-2997-40cc-95d8-fd196ab46804" ', ' "bash -l -c 'echo
> "X2GODATABEGIN:8c7a9bb9-2997-40cc-95d8-fd196ab46804"; export
> PATH="/usr/local/bin:/usr/bin:/bin";export TERM="dumb"; x2golistsessions;
> echo "X2GODATAEND:8c7a9bb9-2997-40cc-95d8-fd196a" ');
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1810> Locking SSH channel
> connection MUTEX.
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1812> Passing new channel
> connection object to channelConnections.
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1814> Unlocking SSH channel
> connection MUTEX.
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1977> Creating new channel.
>
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1990> New channel:0x7fe92e5da590
>
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:2065> Executing remote: "bash -l
> -c 'echo "X2GODATABEGIN:8c7a9bb9-2997-40cc-95d8-fd196ab46804"; export
> PATH="/usr/local/bin:/usr/bin:/bin";export TERM="dumb"; x2golistsessions;
> echo "X2GODATAEND:8c7a9bb9-2997-40cc-95d8-fd196ab46804";'"
>
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:2082> New exec channel created.
>
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:2165> EOF on channel
> 0x7fe92e5da590; SshProcess object: 0
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:2222> EOF sent.
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:2224> Channel closed.
>
> x2go-DEBUG-../src/sshprocess.cpp:532> SSH finished: raw output (stdout):
> "X2GODATABEGIN:8c7a9bb9-2997-40cc-95d8-fd196ab46804
>
>
> DBIconnect('dbname=/var/lib/x2go/x2go_sessions','',...)failed:unabletoopendatabasefileat/usr/share/perl5/vendor_perl/X2Go/Server/DB/SQLite3.pmline66.
>
> X2GODATAEND:8c7a9bb9-2997-40cc-95d8-fd196ab46804
>
> "
>
> x2go-DEBUG-../src/sshprocess.cpp:543> SSH finished: true -
> "DBIconnect('dbname=/var/lib/x2go/x2go_sessions','',...)failed:unabletoopendatabasefileat/usr/share/perl5/vendor_perl/X2Go/Server/DB/SQLite3.pmline66.
>
> " (0).
>
> x2go-DEBUG-../src/onmainwindow.cpp:3861>
> "DBIconnect('dbname=/var/lib/x2go/x2go_sessions','',...)failed:unabletoopendatabasefileat/usr/share/perl5/vendor_perl/X2Go/Server/DB/SQLite3.pmline66.
>
> "
>
> x2go-DEBUG-../src/onmainwindow.cpp:4521> Executing remote command:
> "X2GODPI=72 X2GO_XINERAMA=no x2gostartagent 800x600 adsl 16m-jpeg-9
> unix-kde-depth_32 us query 0 D MATE both"
>
> x2go-DEBUG-../src/sshprocess.cpp:199> Executing remote command via
> SshProcess object 1: "X2GODPI=72 X2GO_XINERAMA=no x2gostartagent 800x600
> adsl 16m-jpeg-9 unix-kde-depth_32 us query 0 D MATE both"
>
> x2go-DEBUG-../src/sshprocess.cpp:213> this=SshProcess(0x7fe92e5f7ef0) Running
> masterCon->addChannelConnection(this, '
> "563c9735-72a3-44ce-a284-7519be6288bc" ', ' "bash -l -c 'echo
> "X2GODATABEGIN:563c9735-72a3-44ce-a284-7519be6288bc"; export
> PATH="/usr/local/bin:/usr/bin:/bin";export TERM="dumb"; X2GODPI=72
> X2GO_XINERAMA=no x2gostartagent 800x600 adsl 16m-jpeg-9" ');
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1810> Locking SSH channel
> connection MUTEX.
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1812> Passing new channel
> connection object to channelConnections.
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1814> Unlocking SSH channel
> connection MUTEX.
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1977> Creating new channel.
>
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1990> New channel:0x7fe92e66ac60
>
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:2065> Executing remote: "bash -l
> -c 'echo "X2GODATABEGIN:563c9735-72a3-44ce-a284-7519be6288bc"; export
> PATH="/usr/local/bin:/usr/bin:/bin";export TERM="dumb"; X2GODPI=72
> X2GO_XINERAMA=no x2gostartagent 800x600 adsl 16m-jpeg-9 unix-kde-depth_32
> us query 0 D MATE both; echo
> "X2GODATAEND:563c9735-72a3-44ce-a284-7519be6288bc";'"
>
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:2082> New exec channel created.
>
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:2165> EOF on channel
> 0x7fe92e66ac60; SshProcess object: 1
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:2222> EOF sent.
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:2224> Channel closed.
>
> x2go-DEBUG-../src/sshprocess.cpp:532> SSH finished: raw output (stdout):
> "X2GODATABEGIN:563c9735-72a3-44ce-a284-7519be6288bc
>
> X2GODATAEND:563c9735-72a3-44ce-a284-7519be6288bc
>
> "
>
> x2go-DEBUG-../src/sshprocess.cpp:538> Have stderr only, something must be
> wrong.
>
> x2go-DEBUG-../src/sshprocess.cpp:543> SSH finished: false -
> "/usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> Unable to find free display port or insert new session into database;
> parameters: port (50), hostname (ourdomain.edu) and session name ().
>
> " (1).
>
> x2go-DEBUG-../src/onmainwindow.cpp:5425> Agent output:
> "/usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> /usr/lib64/x2go/x2gocheckport: line 131:
> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>
> Unable to find free display port or insert new session into database;
> parameters: port (50), hostname (ourserver.edu) and session name ().
>
> "
>
> 2021-01-25 20:31:36.264 x2goclient[4934:264698] modalSession has been
> exited prematurely - check for a reentrant call to endModalSession:
>
> x2go-DEBUG-../src/onmainwindow.cpp:6771> Setting focus.
>
>
>
>
>
> On Mon, Jan 25, 2021 at 5:49 PM Ulrich Sibiller <ulrich.sibiller at gmail.com>
> wrote:
>
>> Well, here's the code producing that output:
>>
>> typeset -i retry='0'
>> typeset -i max_retry='10'
>> typeset output=''
>> for ((retry = 0; retry < max_retry; ++retry)); do
>> typeset -i free_port="${X2GO_PORT}"
>> if free_port="$("${X2GO_LIB_PATH}/x2gogetfreeport"
>> "${current_host_name}" "${ss}" 'display' "${X2GO_PORT}")"; then
>> X2GO_PORT="${free_port}"
>>
>> if [[ -n "${SHADREQ_USER}" ]]; then
>>
>> SESSION_NAME="${SHADREQ_USER}-${X2GO_PORT}-$(date '+%s')"
>> else
>> SESSION_NAME="${USER}-${X2GO_PORT}-$(date '+%s')"
>> fi
>> if [[ -n "${COLORDEPTH}" ]]; then
>>
>>
>> SESSION_NAME="${SESSION_NAME}_st${SESSION_TYPE}${X2GO_CMD}_dp${COLORDEPTH}"
>> SESSION_NAME="${SESSION_NAME//:/PP}"
>> fi
>>
>> # sanitize session name
>> SESSION_NAME="$(perl -pe 's/[^a-zA-Z0-9\.\_\-\@]//g'
>> <<< "${SESSION_NAME}")"
>>
>> if [[ -n "${SHADREQ_USER}" ]]; then
>> "${X2GO_LIB_PATH}/x2gosyslog" "${0}" 'debug'
>> "initializing new shadow session with ID ${SESSION_NAME}"
>>
>> output="$("${X2GO_LIB_PATH}/x2goinsertshadowsession" "${X2GO_PORT}"
>> "${current_host_name}" "${SESSION_NAME}" "${SHADREQ_USER}")"
>> else
>> "${X2GO_LIB_PATH}/x2gosyslog" "${0}" 'debug'
>> "initializing new session with ID ${SESSION_NAME}"
>> output="$("${X2GO_LIB_PATH}/x2goinsertsession"
>> "${X2GO_PORT}" "${current_host_name}" "${SESSION_NAME}")"
>> fi
>>
>> if [[ "${output}" = 'inserted' ]]; then
>> break
>> else
>> "${X2GO_LIB_PATH}/x2gosyslog" "${0}" 'warning'
>> "unable to insert display port into database. Retrying (run $((retry +
>> 1)))."
>> fi
>> else
>> "${X2GO_LIB_PATH}/x2gosyslog" "${0}" 'warning' "no
>> free display number available, cannot start new session. Retrying (run
>> $((retry + 1)))."
>> fi
>> done
>>
>> if [[ "${output}" != 'inserted' ]]; then
>> typeset msg="Unable to find free display port or insert new
>> session into database; parameters: port (${X2GO_PORT}), hostname
>> (${current_host_name}) and session name (${SESSION_NAME})."
>> "${X2GO_LIB_PATH}/x2gosyslog" "${0}" 'err' "${msg}"
>>
>> # Make x2goclient fail.
>> echo "${msg}" >&2
>> exit '10'
>> fi
>>
>>
>> This boils down to
>>
>> for ((retry = 0; retry < max_retry; ++retry)); do
>> typeset -i free_port="${X2GO_PORT}"
>> if free_port="$("${X2GO_LIB_PATH}/x2gogetfreeport"
>> "${current_host_name}" "${ss}" 'display' "${X2GO_PORT}")"; then
>> ...
>> else
>> "${X2GO_LIB_PATH}/x2gosyslog" "${0}" 'warning' "no
>> free display number available, cannot start new session. Retrying (run
>> $((retry + 1)))."
>> fi
>> done
>>
>> -> as you can see x2gofreeport does not seem to report the port as
>> free. You can try this manually:
>>
>> /usr/lib/x2go/x2gogetfreeport $(hostname) "$(which ss)" display 50
>>
>> If that will output a free port x2go should generally work. If not,
>> you still have something running and blocking these ports. You can
>> check with lsof -i :6050 and you will see who is blocking the first
>> checked port.
>>
>> You can also run the x2gogefreeport with bash -x:
>> bash -x /usr/lib/x2go/x2gogetfreeport $(hostname) "$(which ss)" display 50
>>
>> and see what going on.
>>
>> Hope that helps,
>>
>> Uli
>>
>>
>>
>>
>> On Mon, Jan 25, 2021 at 8:50 PM Robert Kudyba <rkudyba at fordham.edu>
>> wrote:
>> >
>> > I posted a similar issue back in Nov, 2020 at
>> https://www.mail-archive.com/x2go-dev@lists.x2go.org/msg06284.html
>> >
>> > rpm -qa|grep -i x2go
>> > x2goclient-4.1.2.2-3.fc33.x86_64
>> > x2goserver-common-4.1.0.3-9.fc33.noarch
>> > perl-X2Go-Server-4.1.0.3-9.fc33.noarch
>> > perl-X2Go-Log-4.1.0.3-9.fc33.noarch
>> > perl-X2Go-Server-DB-4.1.0.3-9.fc33.x86_64
>> > x2goagent-4.1.0.3-9.fc33.x86_64
>> > x2goserver-xsession-4.1.0.3-9.fc33.noarch
>> > x2goserver-4.1.0.3-9.fc33.x86_64
>> >
>> > nxagent -display :55
>> > NXAGENT - Version 3.5.99.25
>> >
>> > Jan 25 14:14:29 pascal /usr/bin/x2gostartagent[39654]: no free display
>> number available, cannot start new session. Retrying (run 1).
>> > Jan 25 14:14:30 pascal /usr/bin/x2gostartagent[39663]: no free display
>> number available, cannot start new session. Retrying (run 2).
>> > Jan 25 14:14:30 pascal /usr/bin/x2gostartagent[39672]: no free display
>> number available, cannot start new session. Retrying (run 3).
>> > Jan 25 14:14:30 pascal /usr/bin/x2gostartagent[39681]: no free display
>> number available, cannot start new session. Retrying (run 4).
>> > Jan 25 14:14:30 pascal /usr/bin/x2gostartagent[39690]: no free display
>> number available, cannot start new session. Retrying (run 5).
>> > Jan 25 14:14:30 pascal /usr/bin/x2gostartagent[39699]: no free display
>> number available, cannot start new session. Retrying (run 6).
>> > Jan 25 14:14:30 pascal /usr/bin/x2gostartagent[39708]: no free display
>> number available, cannot start new session. Retrying (run 7).
>> > Jan 25 14:14:30 pascal /usr/bin/x2gostartagent[39717]: no free display
>> number available, cannot start new session. Retrying (run 8).
>> > Jan 25 14:14:31 pascal /usr/bin/x2gostartagent[39726]: no free display
>> number available, cannot start new session. Retrying (run 9).
>> > Jan 25 14:14:31 pascal /usr/bin/x2gostartagent[39736]: no free display
>> number available, cannot start new session. Retrying (run 10).
>> > Jan 25 14:14:31 pascal /usr/bin/x2gostartagent[39737]: Unable to find
>> free display port or insert new session into database; parameters: port
>> (50), hostname (pascal.dsm.fordham.edu) and session name ().
>> > Jan 25 14:14:31 pascal kernel: kauditd_printk_skb: 21 callbacks
>> suppressed
>> >
>> > Let me to
>> https://unix.stackexchange.com/questions/467507/x2go-unable-to-find-free-display-port-or-insert-new-session-into-database
>> so I ran x2godbadmin --createdb
>> >
>> > Then I tried with another use and got:
>> > Connection failed.
>> > /usr/lib64/x2go/x2gocheckport: line 131:
>> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
>> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>> > /usr/lib64/x2go/x2gocheckport: line 131:
>> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
>> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>> > /usr/lib64/x2go/x2gocheckport: line 131:
>> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
>> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>> > /usr/lib64/x2go/x2gocheckport: line 131:
>> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
>> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>> > /usr/lib64/x2go/x2gocheckport: line 131:
>> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
>> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>> > /usr/lib64/x2go/x2gocheckport: line 131:
>> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
>> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>> > /usr/lib64/x2go/x2gocheckport: line 131:
>> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
>> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>> > /usr/lib64/x2go/x2gocheckport: line 131:
>> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
>> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>> > /usr/lib64/x2go/x2gocheckport: line 131:
>> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
>> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>> > /usr/lib64/x2go/x2gocheckport: line 131:
>> connect('dbname=/var/lib/x2go/x2go_sessions','',...): syntax error in
>> expression (error token is "('dbname=/var/lib/x2go/x2go_sessions','',...)")
>> > Unable to find free display port or insert new session into database;
>> parameters: port (50), hostname (oudomain.edu) and session name ().
>> >
>> > How does one start X2Go Windows with debug enabled? I only found for
>> Mac you can add the --debug flag.
>> >
>> > My colleague also had this error:
>> >
>> >
>> > XSession-x2go: X session started for moniot at Mon Jan 25 09:01:13 EST
>> 2021
>> > ** Message: 09:01:15.605: couldn't access control socket:
>> /run/user/1200/keyring/control: No such file or directory
>> > SSH_AUTH_SOCK=/run/user/1200/keyring/ssh
>> >
>> > ** (mate-settings-daemon:1436112): WARNING **: 09:01:16.172: Could not
>> open RFKILL control device, please verify your installation
>> > SSH_AUTH_SOCK=/run/user/1200/keyring/ssh
>> > SSH_AUTH_SOCK=/run/user/1200/keyring/ssh
>> > vmware-user: could not open /proc/fs/vmblock/dev
>> > Error: /usr/bin/vmtoolsd must be run inside a virtual machine on a
>> VMware hypervisor product.
>> > SSH_AUTH_SOCK=/run/user/1200/keyring/ssh
>> >
>> > (caja:1436133): Gtk-WARNING **: 09:01:17.552: Failed to register
>> client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to
>> register client
>> > *** ERROR ***
>> > TI:09:01:17 TH:0x56299587f960 FI:gpm-manager.c
>> FN:gpm_manager_systemd_inhibit,1786
>> > - Error in dbus - GDBus.Error:org.freedesktop.DBus.Error.AccessDenied:
>> Permission denied
>> > Traceback:
>> > mate-power-manager(+0x1d474) [0x562995487474]
>> > mate-power-manager(+0x136ab) [0x56299547d6ab]
>> > /lib64/libgobject-2.0.so.0(g_type_create_instance+0x248)
>> [0x7f04c0b72498]
>> > /lib64/libgobject-2.0.so.0(+0x19205) [0x7f04c0b58205]
>> > /lib64/libgobject-2.0.so.0(g_object_new_with_properties+0x1dd)
>> [0x7f04c0b596ad]
>> > /lib64/libgobject-2.0.so.0(g_object_new+0xc1) [0x7f04c0b5a331]
>> > mate-power-manager(+0x15f16) [0x56299547ff16]
>> > mate-power-manager(+0xb20a) [0x56299547520a]
>> > /lib64/libc.so.6(__libc_start_main+0xf2) [0x7f04c0708082]
>> > mate-power-manager(+0xb58e) [0x56299547558e]
>> > Failure: Module initialization failed
>> > SELinux Troubleshooter: Applet requires SELinux be enabled to run
>> > Initializing caja-open-terminal extension
>> > Initializing caja-xattr-tags extension
>> > Initializing caja-image-converter extension
>> > ICE default IO error handler doing an exit(), pid = 1436318, errno = 32
>> >
>> > (mate-settings-daemon:1436112): GLib-GIO-WARNING **: 09:02:44.229:
>> Error releasing name org.mate.SettingsDaemon.Rfkill: The connection is
>> closed
>> > [1611583276,000,xklavier.c:xkl_engine_start_listen/] The backend
>> does not require manual layout management - but it is provided by the
>> application
>> >
>> >
>> >
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x2go.org/pipermail/x2go-dev/attachments/20210126/4aeabfe2/attachment-0001.htm>
More information about the x2go-dev
mailing list