Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xplgw fall if plugin name has more than 8 characters #186

Closed
vdomos opened this issue Dec 1, 2015 · 2 comments
Closed

xplgw fall if plugin name has more than 8 characters #186

vdomos opened this issue Dec 1, 2015 · 2 comments
Milestone

Comments

@vdomos
Copy link
Contributor

vdomos commented Dec 1, 2015

Yes, I know that plugin must have 8 characters maximum,
but if this precaution is forgotten xplgw falls and no longer responds to queries.

The first REST query dropped XPLGW and after it stops responding to other:

rest.log

2015-12-01 00:16:24,316 domogik.rest.url INFO http request GET for /cmd/id/42 received
2015-12-01 00:16:26,714 domogik-rest DEBUG Send client status : alive
2015-12-01 00:16:34,325 domogik.rest.url DEBUG performance|api_ncommand|()|{'cid': 42}|10.0084888935
2015-12-01 00:16:34,325 domogik.rest.url DEBUG  => response status code: 400
2015-12-01 00:16:34,325 domogik.rest.url DEBUG  => response content_type: application/json
2015-12-01 00:16:34,325 domogik.rest.url DEBUG  => response data: ['{"msg": "XPL gateway does not respond"}']
2015-12-01 00:16:41,714 domogik-rest DEBUG Send client status : alive
2015-12-01 00:16:56,714 domogik-rest DEBUG Send client status : alive

2015-12-01 00:17:00,956 domogik.rest.url INFO http request GET for /cmd/id/7 received
2015-12-01 00:17:10,966 domogik.rest.url DEBUG performance|api_ncommand|()|{'cid': 7}|10.0099039078
2015-12-01 00:17:10,966 domogik.rest.url DEBUG  => response status code: 400
2015-12-01 00:17:10,966 domogik.rest.url DEBUG  => response content_type: application/json
2015-12-01 00:17:10,966 domogik.rest.url DEBUG  => response data: ['{"msg": "XPL gateway does not respond"}']

xplgw.log

2015-12-01 00:16:24,318 domogik-xplgw DEBUG MQ Request received : <MQMessage(action=cmd.send, data='{u'cmdid': 42, u'cmdparams': {u'body': u'bonjour'}}')>
2015-12-01 00:16:24,318 domogik-xplgw INFO Received new cmd request: <MQMessage(action=cmd.send, data='{u'cmdid': 42, u'cmdparams': {u'body': u'bonjour'}}')>
2015-12-01 00:16:24,377 domogik-xplgw ERROR Traceback (most recent call last):
  File "/opt/dmg/domogik-dev/src/domogik/bin/xplgw.py", line 114, in on_mdp_request
    self._send_xpl_command(msg)
  File "/opt/dmg/domogik-dev/src/domogik/bin/xplgw.py", line 205, in _send_xpl_command
   msg.set_target(self.client_xpl_map[dev['client_id']])
  File "/opt/dmg/domogik-dev/src/domogik/xpl/common/xplmessage.py", line 305, in set_target
    raise XplMessageError("Invalid target (%s)" % target)
XplMessageError: Invalid target (domogik-pushbullet.ares)

After changing the name of the plugin, no problem

Need a test in the plugin's discovery ?

@Cereal2nd
Copy link
Contributor

its alread solved in develop

On Tue, Dec 1, 2015 at 10:51 AM, vdomos notifications@github.com wrote:

Yes, I know that plugin must have 8 characters maximum,
but if this precaution is forgotten xplgw falls and no longer responds to
queries.

The first REST query dropped XPLGW and after it stops responding to other:

rest.log

2015-12-01 00:16:24,316 domogik.rest.url INFO http request GET for /cmd/id/42 received
2015-12-01 00:16:26,714 domogik-rest DEBUG Send client status : alive
2015-12-01 00:16:34,325 domogik.rest.url DEBUG performance|api_ncommand|()|{'cid': 42}|10.0084888935
2015-12-01 00:16:34,325 domogik.rest.url DEBUG => response status code: 400
2015-12-01 00:16:34,325 domogik.rest.url DEBUG => response content_type: application/json
2015-12-01 00:16:34,325 domogik.rest.url DEBUG => response data: ['{"msg": "XPL gateway does not respond"}']
2015-12-01 00:16:41,714 domogik-rest DEBUG Send client status : alive
2015-12-01 00:16:56,714 domogik-rest DEBUG Send client status : alive

2015-12-01 00:17:00,956 domogik.rest.url INFO http request GET for /cmd/id/7 received
2015-12-01 00:17:10,966 domogik.rest.url DEBUG performance|api_ncommand|()|{'cid': 7}|10.0099039078
2015-12-01 00:17:10,966 domogik.rest.url DEBUG => response status code: 400
2015-12-01 00:17:10,966 domogik.rest.url DEBUG => response content_type: application/json
2015-12-01 00:17:10,966 domogik.rest.url DEBUG => response data: ['{"msg": "XPL gateway does not respond"}']

xplgw.log

2015-12-01 00:16:24,318 domogik-xplgw DEBUG MQ Request received : <MQMessage(action=cmd.send, data='{u'cmdid': 42, u'cmdparams': {u'body': u'bonjour'}}')>
2015-12-01 00:16:24,318 domogik-xplgw INFO Received new cmd request: <MQMessage(action=cmd.send, data='{u'cmdid': 42, u'cmdparams': {u'body': u'bonjour'}}')>
2015-12-01 00:16:24,377 domogik-xplgw ERROR Traceback (most recent call last):
File "/opt/dmg/domogik-dev/src/domogik/bin/xplgw.py", line 114, in on_mdp_request
self._send_xpl_command(msg)
File "/opt/dmg/domogik-dev/src/domogik/bin/xplgw.py", line 205, in _send_xpl_command
msg.set_target(self.client_xpl_map[dev['client_id']])
File "/opt/dmg/domogik-dev/src/domogik/xpl/common/xplmessage.py", line 305, in set_target
raise XplMessageError("Invalid target (%s)" % target)
XplMessageError: Invalid target (domogik-pushbullet.ares)

After changing the name of the plugin, no problem


Reply to this email directly or view it on GitHub
#186.

Cereal2nd added a commit that referenced this issue Dec 1, 2015
@fritz-smh fritz-smh added this to the 0.5 milestone Dec 10, 2015
@fritz-smh
Copy link
Contributor

So closing ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants