[LDTP-Dev] [Bug 629053] New: Socket error on python ldtp import when running from remote terminal
LDTP (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Sep 8 05:32:01 PDT 2010
https://bugzilla.gnome.org/show_bug.cgi?id=629053
LDTP | ldtp2 | 2.0.0
Summary: Socket error on python ldtp import when running from
remote terminal
Classification: Other
Product: LDTP
Version: 2.0.0
OS/Version: Solaris
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ldtp2
AssignedTo: ldtp-dev at lists.freedesktop.org
ReportedBy: brian.nitz at oracle.com
QAContact: ldtp-dev at lists.freedesktop.org
GNOME target: ---
GNOME version: ---
Steps to reproduce:
1) Install ldtp2 on testhost
2) Enable accessibility on testhost
3) login to testhost desktop
4) ssh from anotherhost to testhost (you can try ssh -X, set your DISPLAY,
xhost+...), in all cases, ldtp cannot be run remotely because of socket connect
errors:
bash-4.0$ python
Python 2.6.4 (r264:75706, Aug 16 2010, 16:36:38) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import ldtp
** (-c:1191): WARNING **: Trying to register gtype 'WnckWindowState' as enum
when in fact it is of type 'GFlags'
** (-c:1191): WARNING **: Trying to register gtype 'WnckWindowActions' as enum
when in fact it is of type 'GFlags'
** (-c:1191): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask'
as enum when in fact it is of type 'GFlags'
Traceback (most recent call last):
+ Trace 223590
* File "<string>", line 1 in <module>
* File "/usr/lib/python2.6/site-packages/ldtpd/__init__.py", line 56 in
main
pyatspi.setCacheLevel(pyatspi.CACHE_PROPERTIES)
* File "/usr/lib/python2.6/vendor-packages/pyatspi/accessible.py", line 91
in setCacheLevel
r.registerEventListener(_updateCache, *constants.CACHE_EVENTS)
* File "/usr/lib/python2.6/vendor-packages/pyatspi/registry.py", line 331
in __getattribute__
raise RuntimeError('Could not find or activate registry')
RuntimeError: Could not find or activate registry
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/ldtp/__init__.py", line 257, in
<module>
_populateNamespace(globals())
File "/usr/lib/python2.6/site-packages/ldtp/__init__.py", line 60, in
_populateNamespace
for method in client._client.system.listMethods():
File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
verbose=self.__verbose
File "/usr/lib/python2.6/site-packages/ldtp/client.py", line 73, in request
self, host, handler, request_body, verbose=0)
File "/usr/lib/python2.6/xmlrpclib.py", line 1235, in request
self.send_content(h, request_body)
File "/usr/lib/python2.6/xmlrpclib.py", line 1349, in send_content
connection.endheaders()
File "/usr/lib/python2.6/httplib.py", line 892, in endheaders
self._send_output()
File "/usr/lib/python2.6/httplib.py", line 764, in _send_output
self.send(msg)
File "/usr/lib/python2.6/httplib.py", line 723, in send
self.connect()
File "/usr/lib/python2.6/httplib.py", line 704, in connect
self.timeout)
File "/usr/lib/python2.6/socket.py", line 514, in create_connection
raise error, msg
socket.error: [Errno 146] Connection refused
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>>
5) Now open a terminal on testhost
python
import ldtp
{you'll see a few warnings about Gflags type but it works)
6) Now go back to another host and retry step 4. You'll see that import ldtp
does work now that it has been "initialized" by a terminal running on the
desktop of testhost.
I previously logged this as https://bugzilla.gnome.org/show_bug.cgi?id=629041
and prematurely closed it when I didn't realize the conditions under which a
remote terminal import of ldtp does work.
You may wish to punt this to pyatspi. A similar problem occurs when trying to
access the pyatspi.Registry() via a remote terminal.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the LDTP-dev
mailing list