I have this error:
DEBUG:[spade] Could not register agent [email protected] , error
DEBUG:[spade] Could not kill behavior <class 'spade.peer2peer.DiscoBehaviour'> , warn
DEBUG:[spade] Could not kill behavior <class 'spade.peer2peer.StreamInitiationBehaviour'> , warn
DEBUG:[spade] Could not kill behavior <class 'spade.RPC.RPCServerBehaviour'> , warn
DEBUG:[spade] Stopping agent [email protected] , ok
Traceback (most recent call last):
File "./nodo.py", line 14, in
main()
File "./nodo.py", line 10, in main
agent=AgentNode("node"+machine+"@127.0.0.1","node"+machine+"secret")
File "/Library/Python/2.7/site-packages/SPADE-2.1.1-py2.7.egg/spade/Agent.py", line 1847, in init
raise AgentNotRegisteredError
spade.Agent.AgentNotRegisteredError
But my code it's simple:
!/usr/bin/env python
import threading,spade,os,sys,subprocess
class AgentNode(spade.Agent.Agent):
def _setup(self):
sys.stdout.write("Agent Node Starting...\n")
def main():
machine=subprocess.check_output("uname -n | tr -d '.'",shell=True).strip().upper()
agent=AgentNode("node"+machine+"@127.0.0.1","node"+machine+"secret")
agent.start()
if name == "main":
main()
And the server log:
Wed Apr 3 10:48:58 2013: (info) Presence handler called (None::unavailable)
Wed Apr 3 10:48:58 2013: (ok) Dispatching presence stanza with type->unavailable props->[] id->None
Wed Apr 3 10:48:58 2013: (ok) Got jabber:client/presence stanza
Wed Apr 3 10:48:58 2013: () UNregistered 22 (<xmppd.xmppd.Session instance at 0x108c9f368>)
Wed Apr 3 10:48:58 2013: (info) Presence handler called (None::unavailable)
Wed Apr 3 10:48:58 2013: (ok) Dispatching presence stanza with type->unavailable props->[] id->None
Wed Apr 3 10:48:58 2013: (ok) Got jabber:client/presence stanza
Wed Apr 3 10:48:58 2013: (error) Socket error while receiving data!
Wed Apr 3 10:48:58 2013: (info) Presence handler called (None::unavailable)
Wed Apr 3 10:48:58 2013: (ok) Dispatching presence stanza with type->unavailable props->[] id->None
Wed Apr 3 10:48:58 2013: (ok) Got jabber:client/presence stanza
Wed Apr 3 10:48:58 2013: () UNregistered 23 (<xmppd.xmppd.Session instance at 0x10986dd40>)
Wed Apr 3 10:48:58 2013: (info) Presence handler called (None::unavailable)
Wed Apr 3 10:48:58 2013: (ok) Dispatching presence stanza with type->unavailable props->[] id->None
Wed Apr 3 10:48:58 2013: (ok) Got jabber:client/presence stanza
Wed Apr 3 10:48:58 2013: (error) Socket error while receiving data!
Wed Apr 3 10:48:58 2013: (error) Peer [email protected] failed to authenticate
Wed Apr 3 10:48:58 2013: (sent) 23
Wed Apr 3 10:48:58 2013: (ok) Got challenge: '[email protected]\x00nodeMACJUANDALOCAL\x00secret'
Wed Apr 3 10:48:58 2013: (ok) Dispatching unknown stanza with type-> props->[] id->None
Wed Apr 3 10:48:58 2013: (warn) Unknown stanza: auth
Wed Apr 3 10:48:58 2013: (dispatch) bm9kZU1BQ0pVQU5EQUxPQ0FMQDEyNy4wLjAuMQBub2RlTUFDSlVBTkRBTE9DQUwAc2VjcmV0
Wed Apr 3 10:48:58 2013: (got) 23 bm9kZU1BQ0pVQU5EQUxPQ0FMQDEyNy4wLjAuMQBub2RlTUFDSlVBTkRBTE9DQUwAc2VjcmV0
Wed Apr 3 10:48:58 2013: (sent) 23 stream:featuresPLAIN/stream:features
Wed Apr 3 10:48:58 2013: (sent) 23 <stream:stream id="923431166240887" from="127.0.0.1" xmlns:db="jabber:server:dialback" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" version="1.0">
Wed Apr 3 10:48:58 2013: (got) 23 <stream:stream xmlns="jabber:client" to="127.0.0.1" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" >
Wed Apr 3 10:48:57 2013: (sent) 22
Wed Apr 3 10:48:57 2013: (info) save_database: User database saved!
Wed Apr 3 10:48:57 2013: (info) Registered user nodemacjuandalocal in domain 127.0.0.1
Wed Apr 3 10:48:57 2013: (info) with stanza nodeMACJUANDALOCALsecretnodeMACJUANDALOCAL
Wed Apr 3 10:48:57 2013: (info) Router handler called
Wed Apr 3 10:48:57 2013: (ok) Dispatching iq stanza with type->set props->[u'jabber:iq:register'] id->2
Wed Apr 3 10:48:57 2013: (ok) Got jabber:client/iq stanza
Wed Apr 3 10:48:57 2013: (dispatch) nodeMACJUANDALOCALsecretnodeMACJUANDALOCAL
Wed Apr 3 10:48:57 2013: (got) 22 nodeMACJUANDALOCALsecretnodeMACJUANDALOCAL
Wed Apr 3 10:48:57 2013: (sent) 22 Please specify name and password to register with
Wed Apr 3 10:48:57 2013: (info) with stanza
Wed Apr 3 10:48:57 2013: (info) Router handler called
Wed Apr 3 10:48:57 2013: (ok) Dispatching iq stanza with type->get props->[u'jabber:iq:register'] id->1
Wed Apr 3 10:48:57 2013: (ok) Got jabber:client/iq stanza
Wed Apr 3 10:48:57 2013: (dispatch)
Wed Apr 3 10:48:57 2013: (got) 22
Wed Apr 3 10:48:57 2013: (error) Peer [email protected] failed to authenticate
Wed Apr 3 10:48:57 2013: (sent) 22
Wed Apr 3 10:48:57 2013: (ok) Got challenge: '[email protected]\x00nodeMACJUANDALOCAL\x00secret'
Wed Apr 3 10:48:57 2013: (ok) Dispatching unknown stanza with type-> props->[] id->None
Wed Apr 3 10:48:57 2013: (warn) Unknown stanza: auth
Wed Apr 3 10:48:57 2013: (dispatch) bm9kZU1BQ0pVQU5EQUxPQ0FMQDEyNy4wLjAuMQBub2RlTUFDSlVBTkRBTE9DQUwAc2VjcmV0
Wed Apr 3 10:48:57 2013: (got) 22 bm9kZU1BQ0pVQU5EQUxPQ0FMQDEyNy4wLjAuMQBub2RlTUFDSlVBTkRBTE9DQUwAc2VjcmV0
Wed Apr 3 10:48:57 2013: (sent) 22 stream:featuresPLAIN/stream:features
Wed Apr 3 10:48:57 2013: (sent) 22 <stream:stream id="3436120583343476" from="127.0.0.1" xmlns:db="jabber:server:dialback" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" version="1.0">
Wed Apr 3 10:48:57 2013: (got) 22 <stream:stream xmlns="jabber:client" to="127.0.0.1" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" >
It seems that they could not auth. Whats going on? Thank!