Luxoft / Twister

Twister Test Automation Framework
http://www.twistertesting.com/
Apache License 2.0
38 stars 21 forks source link

Stop button not responding or not stopping the execution #182

Open Hamza989 opened 8 years ago

Hamza989 commented 8 years ago

We are unable to stop the test by pressing the "stop" button.
This issue exist for all the twister user. ded56eae-849f-11e5-92bc-83963f00042d

Since we are using twister continuously for executing tests, we cannot restart the central engine for resolving this issue. Kindly suggest how can we fix this

Hamza989 commented 8 years ago

This issue Persist with V 3.057. We are still facing the issue ,ie Stop button not responding for all the users of Twister.

Hamza989 commented 8 years ago

Hi team, As this is blocking our automation testing, or we would like to request you to consider this in high priority .. Can you please provide any work around to kill the execution and the restart with particular user without restarting central engine. We have tried to kill the background process ,but it resulted in run button disabled state

bogdanpopescu commented 8 years ago

@Hamza989 Hi, we are trying to reproduce this issue without success. In the meantime, I think the workaround would be to stop the execution ( clear it's state ) using cli.py utility in a terminal. Go to ~/twister/bin and issue the command: python cli.py --server=<ip+address>:8000 --login=: -s stop

Hamza989 commented 8 years ago

HI,

We have tried following command to stop the execution, It has given me an exception as follows..

 

 

$ python cli.py --server 127.0.0.1:8000 --login user11:passwd -s stop

 

Hello, user user11.

Authentication successful!

 

Stopping...

Traceback (most recent call last):

  File "cli.py", line 508, in

    print PROXY.set_ep_status_all(0, OPTIONS.config + ',' + OPTIONS.project)

  File "/usr/lib/python2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/netref.py", line 196, in call

    return syncreq(_self, consts.HANDLE_CALL, args, kwargs)

  File "/usr/lib/python2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/netref.py", line 71, in syncreq

    return conn.sync_request(handler, oid, *args)

  File "/usr/lib/python2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/protocol.py", line 441, in sync_request

    raise obj

KeyError: 'user11'

 

========= Remote Traceback (1) =========

Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/protocol.py", line 305, in _dispatch_request

    res = self._HANDLERS[handler](self, *args)

  File "/usr/lib/python2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/protocol.py", line 535, in _handle_call

    return self._local_objects[oid](*args, **dict%28kwargs%29)

  File "/opt/twister/server/CeRpyc.py", line 1030, in exposed_set_ep_status_all

    return self.project.set_exec_status(user, epname, new_status, msg)

  File "/opt/twister/server/CeProject.py", line 2064, in set_exec_status_all

    reserved_suts_ids = reserved_suts[user].keys()

KeyError: 'user11'

 

-Hamza

 

From: Bogdan Popescu [mailto:notifications@github.com] Sent: Thursday, November 19, 2015 1:06 PM To: Luxoft/Twister Cc: Hamza989 Subject: Re: [Twister] Stop button not responding or not stopping the execution (#182)

 

HYPERLINK "https://github.com/Hamza989"@Hamza989 Hi, we are trying to reproduce this issue without success. In the meantime, I think the workaround would be to stop the execution ( clear it's state ) using cli.py utility in a terminal. Go to ~/twister/bin and issue the command: python cli.py --server=:8000 --login=: -s stop

— Reply to this email directly or HYPERLINK "https://github.com/Luxoft/Twister/issues/182#issuecomment-157976780"view it on GitHub.Image removed by sender.

bogdanpopescu commented 8 years ago

@Hamza989 You HAVE to use equal sign for server and login: python cli.py --server=your_server:8000 --login=your_user:your_password -s stop

Hamza989 commented 8 years ago

We are getting the exception while executing this command

$ python cli.py --server=127.0.0.1:8000 --login=user11:passwd --stats

Hello, user user11. Authentication successful!

User status : running Last started: 2015-11-19 01:19:02 Time elapsed: 0:00:47

Passed : 0 Failed : 0 Pending : 0 Working : 1 Aborted : 0 No Exec : 0 Other : 0

Total : 1 Pass rate: 0.0%

$ $ $ python cli.py --server=127.0.0.1:8000 --login=user11:passwd -s stop

Hello, user user11. Authentication successful!

Stopping... Traceback (most recent call last): File "cli.py", line 508, in print PROXY.set_ep_status_all(0, OPTIONS.config + ',' + OPTIONS.project) File "/usr/lib/python2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/netref.py", line 196, in call return syncreq(_self, consts.HANDLE_CALL, args, kwargs) File "/usr/lib/python2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/netref.py", line 71, in syncreq return conn.sync_request(handler, oid, *args) File "/usr/lib/python2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/protocol.py", line 441, in sync_request raise obj KeyError: 'user11'

========= Remote Traceback (1) ========= Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/protocol.py", line 305, in _dispatch_request res = self._HANDLERS[handler](self, args) File "/usr/lib/python2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/protocol.py", line 535, in _handle_call return self._local_objects[oid](args, **dict%28kwargs%29) File "/opt/twister/server/CeRpyc.py", line 1030, in exposed_set_ep_status_all return self.project.set_exec_status(user, epname, new_status, msg) File "/opt/twister/server/CeProject.py", line 2064, in set_exec_status_all reserved_suts_ids = reserved_suts[user].keys() KeyError: 'user11'

$

bogdanpopescu commented 8 years ago

@Hamza989 Does your test case lauch threads ?

Hamza989 commented 8 years ago

Stops button not responding even before starting the threads..

 

From: Bogdan Popescu [mailto:notifications@github.com] Sent: Thursday, November 19, 2015 4:33 PM To: Luxoft/Twister Cc: Hamza989 Subject: Re: [Twister] Stop button not responding or not stopping the execution (#182)

 

HYPERLINK "https://github.com/Hamza989"@Hamza989 Does your test case lauch threads ?

— Reply to this email directly or HYPERLINK "https://github.com/Luxoft/Twister/issues/182#issuecomment-158023676"view it on GitHub.Image removed by sender.

bogdanpopescu commented 8 years ago

@Hamza989 Did you used kill -9 command against start_clinet.py ?

Hamza989 commented 8 years ago

No,  We have not used that command to kill this particular user.

 

From: Bogdan Popescu [mailto:notifications@github.com] Sent: Thursday, November 19, 2015 5:00 PM To: Luxoft/Twister Cc: Hamza989 Subject: Re: [Twister] Stop button not responding or not stopping the execution (#182)

 

HYPERLINK "https://github.com/Hamza989"@Hamza989 Did you used kill -9 command against start_clinet.py ?

— Reply to this email directly or HYPERLINK "https://github.com/Luxoft/Twister/issues/182#issuecomment-158029729"view it on GitHub.Image removed by sender.

bogdanpopescu commented 8 years ago

@Hamza989 I guess you are not using the latest Twister version ( 3.066, Build date 06.11.2015 ). This version has code to restore/reset the status when client is restarted and it should fix your issue. Please upgrade and test it.

Hamza989 commented 8 years ago

Yes, You are right, We are using version v.:3.057, going to upgrade to 3.066 and verify it.

 

From: Bogdan Popescu [mailto:notifications@github.com] Sent: Thursday, November 19, 2015 5:10 PM To: Luxoft/Twister Cc: Hamza989 Subject: Re: [Twister] Stop button not responding or not stopping the execution (#182)

 

HYPERLINK "https://github.com/Hamza989"@Hamza989 I guess you are not using the latest Twister version ( 3.066, Build date 06.11.2015 ). This version has code to restore/reset the status when client is restarted and it should fix your issue. Please upgrade and test it.

— Reply to this email directly or HYPERLINK "https://github.com/Luxoft/Twister/issues/182#issuecomment-158031528"view it on GitHub.Image removed by sender.

Hamza989 commented 8 years ago

Verified with v.3.067 version of twister , Stop button is working for all users It might be because user has forcefully must have killed background process by using kill -9 command, which might be caused Stop Button not working. .

Hamza989 commented 7 years ago

We are seeing that stop button not responding , this issue is found on v.3.068. Execution server log shows following error : 180345 17-07-14 13:48:06 ERROR [14/Jul/2017:13:48:06] HTTP 180346 Traceback (most recent call last): 180347 File "/usr/lib/python2.7/site-packages/CherryPy-8.7.0-py2.7.egg/cherrypy/_cprequest.py", line 670, in respond 180348 response.body = self.handler() 180349 File "/usr/lib/python2.7/site-packages/CherryPy-8.7.0-py2.7.egg/cherrypy/lib/encoding.py", line 220, in call 180350 self.body = self.oldhandler(*args, kwargs) 180351 File "/usr/lib/python2.7/site-packages/CherryPy-8.7.0-py2.7.egg/cherrypy/_cpdispatch.py", line 60, in call 180352 return self.callable(*self.args, *self.kwargs) 180353 File "/opt/twister/server/CeXmlRpc.py", line 93, in default 180354 resp = super(CeXmlRpc, self).default(vpath, params) 180355 File "/usr/lib/python2.7/site-packages/CherryPy-8.7.0-py2.7.egg/cherrypy/_cptools.py", line 378, in default 180356 body = subhandler(*(vpath + rpcparams), **params) 180357 File "/opt/twister/server/CeXmlRpc.py", line 1418, in set_exec_status_all 180358 return self.project.set_exec_status_all(user, new_status, msg) 180359 File "/opt/twister/server/CeProject.py", line 2140, in set_exec_status_all 180360 reserved_suts_ids = reserved_suts[user].keys() 180361 KeyError: 'TEST_USER110'