Bug #51890 Crash during 'new server instance' SSH Login, unable to create admin instance
Submitted: 9 Mar 2010 20:37 Modified: 28 Jun 2010 12:20
Reporter: daniel barbour Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:5.2.16 x86_64 OS:Linux (Ubuntu 9.10 server x64)
Assigned to: CPU Architecture:Any
Tags: Administration, New Server Instance, ssh

[9 Mar 2010 20:37] daniel barbour
Description:
A crash/hang/indefinite lockup occurs when attempting to create a new server administration instance with ssh login based administration with or without ssh authentication key 'id_rsa'. 

The mysql server is at a static local lan address with a custom hostname defined in /etc/hosts, and verified with '$ hostname' and '$ hostname -f'. SSH is installed and working, I verified this using puTTy on a windows machine.

CAN connect using the same method (Create new server instance > ssh login based administration) on the Windows version of MySQL Workbench.

--

Can't create a new server instance WITHOUT ssh login based administration enabled in the linux version either, and yields this output message: 

--
Traceback (most recent call last):

  File "/usr/lib/mysql-workbench/modules/wb_admin_grt.py", line 149, in openAdministrator

    
do_open_administrator(server_instance)

  File "/usr/lib/mysql-workbench/modules/wb_admin_grt.py", line 125, in do_open_administrator

    
adminTab = AdministratorTab(server_instance)

  File "/usr/lib/mysql-workbench/modules/wb_admin_grt.py", line 95, in __init__

    
self.configuration = wb_admin_configuration.WbAdminConfiguration(server_instance_settings, self.ctrl_be, self.monitor)

  File "/usr/lib/mysql-workbench/modules/wb_admin_configuration.py", line 60, in __init__

    
sys_config_path = self.ctrl_be.get_config_file_path()

  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 667, in get_config_file_path

    
return self.expand_path_variables(self.settings.serverInfo['sys.config.path'].strip(" \r\t\n\b"))

AttributeError
: 
'NoneType' object has no attribute 'strip'
--

What I can do:

MySQL development works 100%; can create new connections and access/make changes to them.

Not tested: Data Modeling.

How to repeat:
1. create a static IP in /etc/network/interfaces and restart it
2. edit /etc/hosts and change the second line to your static ip followed by a local domain name and your hostname.
3. assuming mysql/apache/ssh are installed, run MySQL Workbench and create a new server instance using your static lan address.

Suggested fix:
Possibly change the local domain in /etc/hosts back to localhost?
[10 Mar 2010 6:39] Susanne Ebrecht
Many thanks for writing a bug report.

I am not able to follow you.

Is your server up? Is ssh connection working?

Did you look with "netstat" if ports are listening?
[10 Mar 2010 15:02] daniel barbour
netstat is reporting:

server.machine1.co:mysql 192.168.5.10:51946      ESTABLISHED
server.machine1.co:mysql server.machine1.co:41060 ESTABLISHED

The server is running as it should, the only problem here lies in the linux version of MySQL Workbench. I can't administrate the mysql database using mysql workbench, and it's not a privilege issue, however I can open a connection to the mysql database to run queries(using workbench). Core SSH functionality is working 100%, I've connected remotely to the server machine via ssh, but MySQL Workbench is crashing every time I attempt to use ssh as a login/connection in a administration instance. If I create a new administration instance without ssh login, this error is returned: "Could not connect to target database: error calling WbAdmin.openAdministrator: see output for details" the output text is listed above in the report.

I can connect with and without using ssh on the Windows version of MySQL Workbench. This leads me to believe that there's a configuration issue with the linux machine or the MySQL Workbench linux client.
[26 Mar 2010 1:12] MySQL Verification Team
Thank you for the bug report.
[20 Apr 2010 13:03] Johannes Taxacher
Hi Daniel,

could you try the latest release to check if the recent changes we made to the admin code fixed the problem?
thanks ins advance
[20 Apr 2010 14:24] daniel barbour
I am getting the error still. (Could not connect to target database: error calling WbAdmin.openAdministrator: see output for details)

I uninstalled the previous version (5.2.16) and then installed 5.2.17.

This is my output log:

Traceback (most recent call last):
  File "/usr/lib/mysql-workbench/modules/wb_admin_grt.py", line 157, in openAdministrator
    do_open_administrator(server_instance)
  File "/usr/lib/mysql-workbench/modules/wb_admin_grt.py", line 126, in do_open_administrator
    adminTab = AdministratorTab(server_instance)
  File "/usr/lib/mysql-workbench/modules/wb_admin_grt.py", line 87, in __init__
    self.ctrl_be = wb_admin_control_be.MyCtrl(server_instance_settings)
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 662, in __init__
    if connect_sql and self.server_is_stopped_for_sure():
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 884, in server_is_stopped_for_sure
    return self.is_running()
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 899, in is_running
    result = self.exec_cmd(script, usesudo, password)
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 969, in exec_cmd
    (script, filters) = build_filters(script)
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 177, in build_filters
    idx = text.rfind('|')
AttributeError: 'NoneType' object has no attribute 'rfind'
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 477, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/mysql-workbench/modules/wb_admin_configuration.py", line 250, in refresh_tasks
    status = self.ctrl_be.is_running(True) # True - means supress output
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 899, in is_running
    result = self.exec_cmd(script, usesudo, password)
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 969, in exec_cmd
    (script, filters) = build_filters(script)
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 177, in build_filters
    idx = text.rfind('|')
AttributeError: 'NoneType' object has no attribute 'rfind'

get_server_version: parsed (5, 1, 37)
Traceback (most recent call last):
  File "/usr/lib/mysql-workbench/modules/wb_admin_grt.py", line 157, in openAdministrator
    do_open_administrator(server_instance)
  File "/usr/lib/mysql-workbench/modules/wb_admin_grt.py", line 126, in do_open_administrator
    adminTab = AdministratorTab(server_instance)
  File "/usr/lib/mysql-workbench/modules/wb_admin_grt.py", line 87, in __init__
    self.ctrl_be = wb_admin_control_be.MyCtrl(server_instance_settings)
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 662, in __init__
    if connect_sql and self.server_is_stopped_for_sure():
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 884, in server_is_stopped_for_sure
    return self.is_running()
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 899, in is_running
    result = self.exec_cmd(script, usesudo, password)
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 969, in exec_cmd
    (script, filters) = build_filters(script)
  File "/usr/lib/mysql-workbench/modules/wb_admin_control_be.py", line 177, in build_filters
    idx = text.rfind('|')
AttributeError: 'NoneType' object has no attribute 'rfind'

--

I set up another identical 'test' machine with just a generic install of 9.10 server x64, no custom changes and the same error is reporting.
[26 Apr 2010 14:15] Alfredo Kojima
Hi

Can you provide step by step instructions on how you create the server instance that causes the error you get?
We can't repeat the bug, but the bug is probably specific to something you're doing
during the profile creation. Also, pls attach your ~/.mysql/workbench/server_instances.xml file to this bug.
[26 May 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[27 Jun 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[28 Jun 2010 12:20] MySQL Verification Team
I couldn't repeat with 5.2.24.