User Tools

Site Tools


wiki:development:debugging

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:development:debugging [2012/04/25 15:39]
bmullan [How To fix error - Access denied. Authentication that can continue: publickey,keyboard-interactive]
wiki:development:debugging [2018/03/15 11:40] (current)
ionic Nope, we mean hyphens, not dashes.
Line 1: Line 1:
-====== X2Go Server Debugging ======+====== Debugging X2Go Components ======
  
-If you want to track down problems with the ''x2goserver'' or the ''cups-x2go'' code, it is possible to enable output of debug information into the systems syslog facility (normally ''/var/log/syslog'').+===== Log File Watching =====
  
-The default log levels for ''x2goserver'' and ''cups-x2go'' are set to ''notice''. Available log levels are: emerg, crit, alert, err, warning, notice, info, debug.+If you want to track down problems with the server-side components of X2Go, it is possible to enable output of debug information into the systems syslog facility (normally ''/var/log/syslog'').
  
-===== Log File Watching =====+The default log levels for ''x2goserver'' and ''cups-x2go'' are set to ''notice''. Available log levels are: emerg, crit, alert, err, warning, notice, info, debug.
  
-While testing your X2Go server, you can open another terminal on the server and watch the ''syslog'' file:+While testing e.g. your X2Go server, you can open another terminal on the server and watch the ''syslog'' file:
  
 <code> <code>
Line 13: Line 13:
 </code> </code>
  
-===== Debugging x2goserver =====+Other logging locations apart from the system's log are: 
 + 
 +  * X2Go Server: ''/var/log/syslog'' 
 +  * X2Go Client: stderr (use ''%%--debug%%''
 +  * PyHoca-GUI: stderr (use ''%%--libdebug --debug%%''
 +  * Xsession itself: ''$HOME/.xsession-x2go-errors'' 
 +  * NX (server-side): ''$HOME/.x2go/C-<sessionid>/session.*'' 
 +  * NX (client-side): ''$HOME/.x2go/S-<sessionid>/session.*'' 
 + 
 +===== Enable Debug Output ===== 
 + 
 +==== Debugging X2Go Server ====
  
 The ''x2goserver'' log level can be set by editing: The ''x2goserver'' log level can be set by editing:
Line 21: Line 32:
 </file> </file>
  
-===== Debugging cups-x2go =====+==== Debugging cups-x2go ====
  
 For debugging cups-x2go there are two files to look at: For debugging cups-x2go there are two files to look at:
Line 37: Line 48:
  
 <file> <file>
-root@x2goserver:~$ editor /etc/cups/cups-x2go+root@printserver:~$ editor /etc/cups/cups-x2go
 </file> </file>
  
-===== Customizing Debug Messages =====+==== Debugging X2Go Session Broker ====
  
-All X2go server scripts are ready for syslogging, though not all of them actually do log to syslog. If you want to add your own syslog messages for debugging purposes, please take a look at the code of files that already do report to syslog. Here is a little howto that explains how to add extra log output to X2go server scripts:+The ''x2gobroker'' debug mode can be enabled in:
  
-==== Logging in X2Go Perl Scripts ====+<file> 
 +root@broker:~$ editor /etc/default/python-x2gobroker 
 +</file>
  
-Whereever you want to write a line to syslog from an X2Go Perl script, place this command:+The log files normally get written to ''/var/log/x2gobroker/*.log''
  
-<code+You can also run  
-syslog('debug', '<My message to syslog...>'); +<file
-</code>+root@broker:~$ x2gobroker-daemon-debug 
 +</file>
  
 +as user ''root''. This is equivalent to running the broker daemon provided by the package ''x2gobroker-daemon'', but you will see all output piped to stderr while the X2Go Session Broker daemon runs in foreground mode.
 +==== Python X2Go / PyHoca Debugging ====
  
-==== Logging in X2go Shell/Bash Scripts ====+The PyHoca clients both have a ''%%--libdebug%%'' option. Run ''pyhoca-gui'' or ''pyhoca-cli'' from the command line with that option enabled and you get blasted with debug output.
  
-Whereever you want to write a line to syslog from an X2Go Shell/Bash script, place this command:+===== Customizing Debug Messages =====
  
-<code> +All X2go server scripts are ready for syslogging, though not all of them actually do log to syslog. If you want to add your own syslog messages for debugging purposes, please take a look at the code of files that already do report to syslog.\
-$X2GO_LIB_PATH/x2gosyslog "$0" "debug" "<My message to syslog...>" +
-</code>+
  
-====== Python X2Go / PyHoca Debugging ======+Here is a little howto that explains how to add extra log output to X2go server scripts:
  
-The PyHoca clients both have a ''--libdebug'' option. Run ''pyhoca-gui'' or ''pyhoca-cli'' from the command line with that option enabled and you get blasted with debug output.+==== Logging in X2Go Server's Perl Scripts ====
  
-===== Log-in error - "Access denied. Authentication that can continue: publickey,keyboard-interactive"  ===== +Whereever you want to write a line to syslog from an X2Go Server'Perl script, place this command:
- +
-Sometime in the past year or two of Ubuntu & Debian operating system updates something changed which caused the normal x2goclient session profile that requires the UserID -and- Password to be entered to fail giving an error message on the client that says: +
-** +
-Access denied. Authentication that can continue: publickey,keyboard-interactive** +
- +
-Here'how to fix it. +
- +
-Start a terminal session with your x2goserver and edit /etc/ssh/sshd_config+
  
 <code> <code>
-sudo nano /etc/ssh/sshd_config+syslog('debug', '<My message to syslog...>');
 </code> </code>
  
-in /etc/ssh/sshd_config (example was copied from Ubuntu 12.04) you will see the following entries: 
  
-<code> +==== Logging in X2Go Server's Shell/Bash Scripts ====
-# Change to yes to enable challenge-response passwords (beware issues with +
-# some PAM modules and threads) +
-ChallengeResponseAuthentication yes+
  
-# Change to no to disable tunnelled clear text passwords +Whereever you want to write a line to syslog from an X2Go Shell/Bash script, place this command:
-PasswordAuthentication no +
-</code>+
  
- 
-=== HOW TO FIX THIS === 
- 
-  
-ChangeE **PasswordAuthentication** to "**yes**" and save the file.  
- 
-then restart ssh 
- 
-sudo /etc/init.d/ssh restart 
- 
- 
-=== REASON for the failure & change of behavior from previous/older versions of Ubuntu. === 
- 
- 
-I installed several older versions of Ubuntu going back to Ubuntu 9.10 and found that the installations of the Ubuntu Server changed the content of the /etc/ssh/sshd_config file! 
- 
-In older systems the entry for PasswordAuthentication either said: 
 <code> <code>
-# Change to no to disable tunnelled clear text passwords +$X2GO_LIB_PATH/x2gosyslog "$0" "debug" "<My message to syslog...>"
-# PasswordAuthentication no+
 </code> </code>
-where the PasswordAuthentication line was commented out ... which then defaulted it to "YES" 
  
--or- 
  
-the Password Authentication line was actually uncommented BUT set to "YES" +==== Logging in X2Go Session Broker's Python Module ====
-<code> +
-# Change to no to disable tunnelled clear text passwords +
-PasswordAuthentication yes +
-</code>+
  
-So those older OS versions and x2go __would work__ using login ID's and Passwords.+Whereever you want to write a line to ''/var/log/x2gobroker/broker.log'' from one of the python-x2gobroker module files, place this command:
  
-Sometime during one of the Ubuntu 11.x releases the PasswordAuthentication entry was actually changed to "no" as is the case in Ubuntu 12.04 servers and the line was left not commented out so it was active... 
 <code> <code>
-Change to no to disable tunnelled clear text passwords +at the top of the module file: 
-PasswordAuthentication no+from x2gobroker.loggers import logger_broker 
 +# [...] then further below, wherever needed: 
 +logger_broker.debug('<your message>')
 </code> </code>
-That is what caused the failure of x2go logins using passwords and would present the user with that error message: 
  
-**Access denied. Authentication that can continue: publickey,keyboard-interactive 
-** 
  
wiki/development/debugging.1335368346.txt.gz · Last modified: 2013/03/08 13:31 (external edit)