Bug 6729 - Cannot connect to x2go server, likely a sqlite problem
Summary: Cannot connect to x2go server, likely a sqlite problem
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Oliver Burger
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-09 12:09 CEST by JeanClaude Garaud
Modified: 2013-11-23 16:14 CET (History)
0 users

See Also:
Source RPM: nx
CVE:
Status comment:


Attachments

Description JeanClaude Garaud 2012-07-09 12:09:22 CEST
Description of problem:

I installed x2go clients and servers on 2 PC one with Mageia2 32 bits version and the other with Mageia 64 bits version.
When I try to connect with x2goclient on x2go server I get the following error message:
Connection failed DBI connect('dbname=/var/lib/x2go/x2go_sessions','',...) failed: unable to open database file at /usr/lib/x2go/x2gosqlitewrapper.pl line 36 Died at /usr/lib/x2go/x2gosqlitewrapper.pl line 36. 

How reproducible: I tried from Mageia2 32 bit to Mageia 64 bit or vice-versa: same error message

I have been unable to find a clear documentation for x2go. Documentation on http://wiki.x2go.org/ is almost void.

Please help.
Manuel Hiebel 2012-07-09 15:50:28 CEST

Assignee: bugsquad => oliver.bgr

Comment 1 Oliver Burger 2012-07-12 16:35:02 CEST
Did you create the database like the README.urpmi script told you on installation of the server?

Could you try using pyhoca-gui instead of x2goclient? The client is a bit buggy on Mageia and I (together with upstream) wasn't able to figure out why.

Status: NEW => ASSIGNED

Comment 2 Oliver Burger 2012-07-27 13:33:22 CEST
Did you or did you not create the database before trying to use x2go?
Comment 3 Oliver Burger 2012-08-07 20:41:04 CEST
The bug reporter does not answer and I can't reproduce.

Status: ASSIGNED => RESOLVED
Resolution: (none) => WORKSFORME

Comment 4 JeanClaude Garaud 2012-08-18 23:50:32 CEST
Sorry for the delay: I was away for a few weeks.
Below is an extract of the commands I used and their results:

==========================================================================
Installation of x2go server
==========================================================================
$ sudo urpmi x2goserver
Afin de satisfaire les dépendances de « x2goserver-database », un des paquetages suivants est nécessaire :
 1- x2goserver-sqlite-3.1.1.0-1.1.mga2.x86_64 : Virtual package for using x2goserver with sqlite (à installer)
 2- x2goserver-postgresql-3.1.1.0-1.1.mga2.x86_64 : Virtual package for using x2goserver with a postgresql database (à installer)
Que choisissez-vous ? (1-2) 1
Pour satisfaire les dépendances, les paquetages suivants vont être installés :
  Paquetage                      Version      Révision      Arch    
(média « Core Release »)
  lib64nxX11_0                   3.5.0.12     1.mga2        x86_64  
  lib64xcomp3                    3.5.0.12     1.mga2        x86_64  
  lib64xcompext3                 3.5.0.12     1.mga2        x86_64  
  makepasswd                     0.5.0        1.mga2        x86_64  
  nxagent                        3.5.0.12     1.mga2        x86_64  
  nxproxy                        3.5.0.12     1.mga2        x86_64  
  perl-Config-Simple             4.590.0      1.mga1        noarch  
  perl-DBD-SQLite                1.350.0      1.mga2        x86_64  (conseillé)
  sshfs-fuse                     2.3          1.mga2        x86_64  
  x2goagent                      3.5.0.12     1.mga2        x86_64  
(média « Core Updates »)
  x2goserver                     3.1.1.0      1.1.mga2      x86_64  
  x2goserver-sqlite              3.1.1.0      1.1.mga2      x86_64  (conseillé)
un espace additionnel de 9.9Mo sera utilisé.
3.2Mo de paquets seront récupérés.
Procéder à l'installation des 12 paquetages ? (O/n) o

  ftp://distrib-coffee.ipsl.jussieu.fr//pub/linux/Mageia/distrib/2/x86_64/media/core/release/perl-Config-Simple-4.590.0-1.mga1.noarch.rpm

[.....snip.....]

----------------------------------------------------------------------
Plus d'information sur le paquetage x2goserver-3.1.1.0-1.1.mga2.x86_64

DATABASE SETUP
-----------------

You need either an sqlite or a postgresql database for running x2go.
If you want to run x2go just on a single server, sqlite is sufficient, for
running x2go on a multi server setup, postgresql is required.

 $ x2godbadmin --createdb


DEFAULT: SQLite setup
------------------------

This variant is the default X2go database setup. The X2go database keeps track
of running/suspended/finished X2go sessions, mounted devices, etc. If you use
SQLite as DB backend, X2go will run on one single server.

For multi-X2goServer support use the PostgreSQL setup variant of X2go server. 
All files should be present for this setup. If not, please report it as a bug.


[.....snip.....]
----------------------------------------------------------------------

==========================================================================
Attempt to create the sqlite database
==========================================================================
[jcg@localhost ~]$  x2godbadmin --createdb
bash: x2godbadmin : commande introuvable
[jcg@localhost ~]$ sudo updatedb
[jcg@localhost ~]$ locate x2godbadmin
/usr/sbin/x2godbadmin
/usr/share/man/man8/x2godbadmin.8.xz
[jcg@localhost ~]$ /usr/sbin/x2godbadmin --createdb
DBI connect('dbname=/var/lib/x2go/x2go_sessions','',...) failed: unable to open database file at /usr/sbin/x2godbadmin line 91
backend=sqlite at /usr/sbin/x2godbadmin line 91.
[jcg@localhost ~]$ less /usr/sbin/x2godbadmin

Clearly the "x2godbadmin --createdb" failed to create the database, but as my knowledge in databases is almost zero I don't know what to do at this point.

==========================================================================
Installation of x2go client
==========================================================================
[jcg@localhost ~]$ sudo urpmi x2goclient
    ftp://distrib-coffee.ipsl.jussieu.fr//pub/linux/Mageia/distrib/2/x86_64/media/core/release/x2goclient-3.99.1.1-1.mga2.x86_64.rpm
installation de x2goclient-3.99.1.1-1.mga2.x86_64.rpm depuis /var/cache/urpmi/rpms

[.....snip.....]

I installed X2goclient and server on another PC, then I started x2go client on one PC hopping to connect to the 2nd PC:

==========================================================================
Test of x2go client: attempt to connect to the remote server
==========================================================================
[jcg@localhost ~]$ x2goclient
ONMainWindow constructor 

ONMainWindows constructor finished, home Directory is: "/home/jcg" 

read  0  sessions from config file 
start new ssh connection to server: "ciste.home" : "22" krb:  false 

ssh connection ok 

continue normal x2go session


which ended up with the following error message in the X2Go Client window: 
"Connection failed DBI connect('dbname=/var/lib/x2go/x2go_sessions','',...) failed: unable to open database file at /usr/lib/x2go/x2gosqlitewrapper.pl line 36 Died at /usr/lib/x2go/x2gosqlitewrapper.pl line 36"

If I knew what to do with the sqlite database I think the problem will be quickly solved :)
Comment 5 Oliver Burger 2012-08-19 10:10:19 CEST
x2godbadmin creates a system wide database.
So it has to be run as root.
Comment 6 JeanClaude Garaud 2012-08-21 00:13:17 CEST
Thanks: Sqlite problem solved.
In your Database setup note you may change
 $ x2godbadmin --createdb
into
 # x2godbadmin --createdb

But there is another problem:

===========================================================================
start new ssh connection to server: "192.168.1.18" : "22" krb:  false 

ssh connection ok 

continue normal x2go session 

Agent output: "gr_port=30001
sound_port=30002
fs_port=30003
" 
new gr_port:  "30001" 

new sound_port:  "30002" 

new fs_port:  "30003" 

starting nxproxy with:  "nxproxy -S nx/nx,options=/home/jcg/.x2go/S-jcg-50-1345503878_stDKDE_dp24/options:50" 

"
NXPROXY - Version 3.5.0

Copyright (C) 2001, 2010 NoMachine.
See http://www.nomachine.com/ for more information.

Info: Proxy running in client mode with pid '31884'.
Session: Starting session at 'Mon Aug 20 23:22:27 2012'.
Info: Connecting to remote host 'localhost:31001'.
Info: Connection to remote proxy 'localhost:31001' established.
" 

search proxy win:  "X2GO-jcg-50-1345503878_stDKDE_dp24" 
"channel_write failed"  -  "Remote channel is closed" 

"Error: The remote NX proxy closed the connection.
" 

"Error: Failure negotiating the session in stage '7'.
Error: Wrong version or invalid session authentication cookie.
Session: Terminating session at 'Mon Aug 20 23:22:28 2012'.
Session: Session terminated at 'Mon Aug 20 23:22:28 2012'.
" 

deleting proxy 

nxproxy not running 

proxy deleted 

check command message 

"channel_open_session failed" :  "Writing packet: error on socket (or connection closed): Opération maintenant en cours" 

search proxy win:  "X2GO-jcg-50-1345503878_stDKDE_dp24" 
search proxy win:  "X2GO-jcg-50-1345503878_stDKDE_dp24"
......... 
===========================================================================

Apparently an authentication problem with nxproxy, but I don't know what to do.
Comment 7 Oliver Burger 2012-08-21 08:59:05 CEST
Please give me the output of
rpm -qa | egrep '(^nx|^x2)'

And please run
tailf /var/log/auth.log
while trying to connect to the server.
Comment 8 JeanClaude Garaud 2012-08-21 17:28:01 CEST
$ rpm -qa | egrep '(^nx|^x2)'
nxagent-3.5.0.12-1.mga2
nxclient-3.5.0-7
x2goserver-3.1.1.0-1.1.mga2
nxserver-3.5.0-11
x2goclient-3.99.1.1-1.mga2
x2goagent-3.5.0.12-1.mga2
nxnode-3.5.0-9
x2goserver-sqlite-3.1.1.0-1.1.mga2
nxproxy-3.5.0.12-1.mga2

With password authentication:
----------------------------
$ tailf /var/log/auth.log

Aug 21 18:47:23 ciste sshd[14264]: pam_tcb(sshd:auth): Authentication passed for jcg from (uid=0)
Aug 21 18:47:23 ciste sshd[14264]: Accepted password for jcg from 192.168.1.10 port 52911 ssh2
Aug 21 18:47:23 ciste systemd-logind[634]: New session c59 of user jcg.
Aug 21 18:47:23 ciste sshd[14264]: pam_tcb(sshd:session): Session opened for jcg by (uid=0)
Aug 21 18:47:29 ciste sshd[14516]: pam_tcb(sshd:auth): Authentication passed for jcg from (uid=0)
Aug 21 18:47:29 ciste sshd[14516]: Accepted password for jcg from 192.168.1.10 port 52915 ssh2
Aug 21 18:47:29 ciste systemd-logind[634]: New session c60 of user jcg.
Aug 21 18:47:29 ciste sshd[14516]: pam_tcb(sshd:session): Session opened for jcg by (uid=0)
Aug 21 18:47:29 ciste sshd[14266]: error: connect_to localhost port 30040: failed.
Aug 21 18:47:29 ciste sshd[14266]: channel_by_id: 0: bad id: channel free
Aug 21 18:47:29 ciste sshd[14266]: Disconnecting: Received ieof for nonexistent channel 0.
Aug 21 18:47:29 ciste sshd[14264]: pam_tcb(sshd:session): Session closed for jcg
Aug 21 18:47:29 ciste systemd-logind[634]: Removed session c59.
Aug 21 18:47:37 ciste sshd[14516]: pam_tcb(sshd:session): Session closed for jcg
Aug 21 18:47:37 ciste systemd-logind[634]: Removed session c60.


Or with id.rsa key authentication:
----------------------------------
$ tailf /var/log/auth.log

Aug 21 19:12:19 ciste sshd[15739]: Accepted publickey for jcg from 192.168.1.10 port 52994 ssh2
Aug 21 19:12:19 ciste systemd-logind[634]: New session c63 of user jcg.
Aug 21 19:12:19 ciste sshd[15739]: pam_tcb(sshd:session): Session opened for jcg by (uid=0)
Aug 21 19:12:25 ciste sshd[15992]: Accepted publickey for jcg from 192.168.1.10 port 52998 ssh2
Aug 21 19:12:25 ciste systemd-logind[634]: New session c64 of user jcg.
Aug 21 19:12:25 ciste sshd[15992]: pam_tcb(sshd:session): Session opened for jcg by (uid=0)
Aug 21 19:12:26 ciste sshd[15743]: error: connect_to localhost port 30043: failed.
Aug 21 19:12:26 ciste sshd[15743]: channel_by_id: 0: bad id: channel free
Aug 21 19:12:26 ciste sshd[15743]: Disconnecting: Received ieof for nonexistent channel 0.
Aug 21 19:12:26 ciste sshd[15739]: pam_tcb(sshd:session): Session closed for jcg
Aug 21 19:12:26 ciste systemd-logind[634]: Removed session c63.

The result is the same if the firewall is disabled.
JeanClaude Garaud 2012-08-27 11:03:30 CEST

Status: RESOLVED => REOPENED
Resolution: WORKSFORME => (none)

Comment 9 Manuel Hiebel 2012-11-11 00:43:00 CET
(broks my buglist search display)

Source RPM: x2goagent 3.5.0.12-1.mga2, x2goclient 3.99.1.1-1.mga2, x2goserver 3.1.0.1-2.mga2, x2goserver-sqlite 3.1.0.1-2.mga2 => nx

Comment 10 Manuel Hiebel 2013-10-22 12:10:43 CEST
This message is a reminder that Mageia 2 is nearing its end of life.
Approximately one month from now Mageia will stop maintaining and issuing updates for Mageia 2. At that time this bug will be closed as WONTFIX (EOL) if it remains open with a Mageia 'version' of '2'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Mageia version prior to Mageia 2's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Mageia 2 is end of life.  If you would still like to see this bug fixed and are able to reproduce it against a later version of Mageia, you are encouraged to click on "Version" and change it against that version of Mageia.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Mageia release includes newer upstream software that fixes bugs or makes them obsolete.

-- 
The Mageia Bugsquad
Comment 11 Manuel Hiebel 2013-11-23 16:14:06 CET
Mageia 2 changed to end-of-life (EOL) status on ''22 November''. Mageia 2 is no
longer maintained, which means that it will not receive any further security or
bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of Mageia
please feel free to click on "Version" change it against that version of Mageia
and reopen this bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

--
The Mageia Bugsquad

Status: REOPENED => RESOLVED
Resolution: (none) => OLD


Note You need to log in before you can comment on or make changes to this bug.