Project

General

Profile

Problem executing component developed following dev guide

Giannandrea Castaldi
Added almost 4 years ago

Hi,

I've developed a simple component following the dev guide but it doesn't work correctly just in lesson1 (http://docs.tigase.org/tigase-server/7.0.0/Development_Guide/html/#cil1). I'm using tigase server 7.0.2.

The component is started correctly (I've verified the tigase-console.log, tigase.log.0 and with Psi I see the component with Discovery service).

When I try to send a message to the component I find the following error:

2015-06-12 11:21:32.002 [pool-15-thread-12]  ClientConnectionManager.processSocketData()  FINEST: Processing socket data: from=null, to=null, DATA=<message xmlns="jabber:client" id="ab1ea" to="exm-poll2@xmpp-local">
2015-06-12 11:21:32.002 [in_6-message-router]  MessageRouter.processPacket()  FINEST:   Processing packet: from=c2s@mac-calcolino.local/127.0.0.1_5222_127.0.0.1_50133, to=sess-man@mac-calcolino.local, DATA=<message xmlns="jabber:client" id="ab1ea" to="exm-poll2@xmpp-local">
2015-06-12 11:21:32.002 [in_6-message-router]  MessageRouter.getLocalComponent()  FINEST: Called for : exm-poll2@xmpp-local
2015-06-12 11:21:32.003 [in_6-message-router]  MessageRouter.getLocalComponent()  FINEST: No componentID matches (fast lookup against exact address): exm-poll2@xmpp-local, for map: [vhost-man@mac-calcolino.local, proxy@mac-calcolino.local, ws2s@mac-calcolino.local, stats@mac-calcolino.local, bosh@mac-calcolino.local, c2s@mac-calcolino.local, basic-conf@mac-calcolino.local, s2s@mac-calcolino.local, monitor@mac-calcolino.local, sess-man@mac-calcolino.local, message-archive@mac-calcolino.local, exm-poll2@mac-calcolino.local, pubsub@mac-calcolino.local, amp@mac-calcolino.local, muc@mac-calcolino.local]; trying VHost lookup
2015-06-12 11:21:32.004 [in_6-message-router]  MessageRouter.processPacket()  FINEST:   1. Packet will be processed by: sess-man@mac-calcolino.local, from=c2s@mac-calcolino.local/127.0.0.1_5222_127.0.0.1_50133, to=sess-man@mac-calcolino.local, DATA=<message xmlns="jabber:client" id="ab1ea" to="exm-poll2@xmpp-local">
2015-06-12 11:21:32.006 [in_6-sess-man]    SessionManager.processPacket()     FINEST:   Received packet: from=c2s@mac-calcolino.local/127.0.0.1_5222_127.0.0.1_50133, to=sess-man@mac-calcolino.local, DATA=<message xmlns="jabber:client" id="ab1ea" to="exm-poll2@xmpp-local">
2015-06-12 11:21:32.006 [in_6-sess-man]    SessionManager.processPacket()     FINEST:   processing packet: from=c2s@mac-calcolino.local/127.0.0.1_5222_127.0.0.1_50133, to=sess-man@mac-calcolino.local, DATA=<message xmlns="jabber:client" id="ab1ea" to="exm-poll2@xmpp-local">
2015-06-12 11:21:32.008 [in_6-sess-man]    SessionManager.walk()              FINEST:   XMPPProcessorIfc: MessageCarbons (message-carbons)Request: from=c2s@mac-calcolino.local/127.0.0.1_5222_127.0.0.1_50133, to=sess-man@mac-calcolino.local, DATA=<message xmlns="jabber:client" id="ab1ea" from="admin@xmpp-local/mac-calcolino" to="exm-poll2@xmpp-local">
2015-06-12 11:21:32.009 [in_6-sess-man]    SessionManager.walk()              FINEST:   XMPPProcessorIfc: MessageAmp (amp)Request: from=c2s@mac-calcolino.local/127.0.0.1_5222_127.0.0.1_50133, to=sess-man@mac-calcolino.local, DATA=<message xmlns="jabber:client" id="ab1ea" from="admin@xmpp-local/mac-calcolino" to="exm-poll2@xmpp-local">
2015-06-12 11:21:32.009 [in_6-sess-man]    SessionManager.walk()              FINEST:   XMPPProcessorIfc: MessageArchivePlugin (message-archive-xep-0136)Request: from=c2s@mac-calcolino.local/127.0.0.1_5222_127.0.0.1_50133, to=sess-man@mac-calcolino.local, DATA=<message xmlns="jabber:client" id="ab1ea" from="admin@xmpp-local/mac-calcolino" to="exm-poll2@xmpp-local">
2015-06-12 11:21:32.009 [in_13-message-router]  MessageRouter.processPacket()  FINEST:  Processing packet: from=sess-man@mac-calcolino.local, to=null, DATA=<message xmlns="jabber:client" id="ab1ea" from="admin@xmpp-local/mac-calcolino" to="exm-poll2@xmpp-local">
2015-06-12 11:21:32.009 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST: Called for : exm-poll2@xmpp-local
2015-06-12 11:21:32.009 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST: No componentID matches (fast lookup against exact address): exm-poll2@xmpp-local, for map: [vhost-man@mac-calcolino.local, proxy@mac-calcolino.local, ws2s@mac-calcolino.local, stats@mac-calcolino.local, bosh@mac-calcolino.local, c2s@mac-calcolino.local, basic-conf@mac-calcolino.local, s2s@mac-calcolino.local, monitor@mac-calcolino.local, sess-man@mac-calcolino.local, message-archive@mac-calcolino.local, exm-poll2@mac-calcolino.local, pubsub@mac-calcolino.local, amp@mac-calcolino.local, muc@mac-calcolino.local]; trying VHost lookup
2015-06-12 11:21:32.009 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST: Called for : exm-poll2@xmpp-local
2015-06-12 11:21:32.010 [in_13-message-router]  MessageRouter.getLocalComponent()  FINEST: No componentID matches (fast lookup against exact address): exm-poll2@xmpp-local, for map: [vhost-man@mac-calcolino.local, proxy@mac-calcolino.local, ws2s@mac-calcolino.local, stats@mac-calcolino.local, bosh@mac-calcolino.local, c2s@mac-calcolino.local, basic-conf@mac-calcolino.local, s2s@mac-calcolino.local, monitor@mac-calcolino.local, sess-man@mac-calcolino.local, message-archive@mac-calcolino.local, exm-poll2@mac-calcolino.local, pubsub@mac-calcolino.local, amp@mac-calcolino.local, muc@mac-calcolino.local]; trying VHost lookup
2015-06-12 11:21:32.010 [in_13-message-router]  MessageRouter.processPacket()  FINEST:  1. Packet will be processed by: exm-poll2@mac-calcolino.local, from=sess-man@mac-calcolino.local, to=null, DATA=<message xmlns="jabber:client" id="ab1ea" from="admin@xmpp-local/mac-calcolino" to="exm-poll2@xmpp-local">

The component is named exm-poll2 and then I send the message to exm-poll2@xmpp-local (xmpp-local is configured as virt-host) but as you can see in the log seems that tigase is considering all the services in the virt-host mac-calcolino.local that is the hostname of my mac. I've this problem only with the component I've developed, all the users I've registered in this xmpp-server can chat without problems.

This is my configuration:

config-type = --gen-config-def
--admins = admin@xmpp-local
--virt-hosts = xmpp-local
--user-db-uri = jdbc:derby:/Users/gcastaldi/work/tigase/tigase-7.0.2/tigasedb
--user-db = derby
--cluster-mode = false
--sm-plugins = +message-archive-xep-0136
--comp-name-1 = muc
--comp-class-1 = tigase.muc.MUCComponent
--comp-name-2 = pubsub
--comp-class-2 = tigase.pubsub.PubSubComponent
--comp-name-3 = proxy
--comp-class-3 = tigase.socks5.Socks5ProxyComponent
--comp-name-4 = message-archive
--comp-class-4 = tigase.archive.MessageArchiveComponent
# --comp-name-5 = poll-bot
# --comp-class-5 = ch.exm.xmppChat.pollBotComponent.PollBotComponent
--comp-name-6 = exm-poll2
--comp-class-6 = ch.exmachina.xmpp.ExmPollComp2
--debug = server
# --debug-packages = exm.xmppChat
basic-conf/logging/ch.exm.xmppChat.pollBotComponent.PollBotComponent.level=FINEST
basic-conf/logging/tigase.conf.ConfiguratorAbstract.level=INFO
basic-conf/logging/tigase.conf.Configurator.level=INFO
basic-conf/logging/tigase.server.ConnectionManager.level=INFO
basic-conf/logging/tigase.server.MessageRouter.level=FINEST

# poll-bot configuration
poll-bot/log-prepend="My packet: "
poll-bot/packet-types[s]=message,presence,iq
poll-bot/secure-logging[B]=true

Thanks for the help.

Giannandrea


Replies (2)

Added by Giannandrea Castaldi almost 4 years ago

I've reproduced the problem also in a virtual machine VirtualBox with centos. The only way to solve the problem seems to have the hostname of the machine equals to the virt-host of xmpp-server.

It seems that my component hasn't the jid @ but @, but I don't think this is correct.

Any suggestion?

Giannandrea

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

I dont' see any error - from the above your component should receive the packet just fine:

2015-06-12 11:21:32.010 [in_13-message-router]  MessageRouter.processPacket()  FINEST:  1. Packet will be processed by: exm-poll2@mac-calcolino.local, from=sess-man@mac-calcolino.local, to=null, DATA=<message xmlns="jabber:client" id="ab1ea" from="admin@xmpp-local/mac-calcolino" to="exm-poll2@xmpp-local">

All components in Tigase are addressed in the same way: <component_name>@<machine_hostname> internally and they are available to the end user under the address <component_name>@<VHost> which matches above - internally component address is exm-poll2@mac-calcolino.local and actual XMPP packet is addressed to to="exm-poll2@xmpp-local"

    (1-2/2)