Project

General

Profile

S2S - Incorrect destinationaddress - one of local virtual hosts or components.

Dathan Pattishall
Added about 4 years ago

So I am running into a situation where my laptop is being used as the XMPP server for the domain

shots.com

the box itself is called dathan.local and is not networked with another box.

The error:

2015-01-05 15:07:36.124 [in_28-c2s]        ConnectionManager.writePacketToSocket()  FINEST: c2s@dathan.local/127.0.0.1_5222_127.0.0.1_61560, type: accept, Socket: TLS: c2s@dathan.local/127.0.0.1_5222_127.0.0.1_61560 Socket[addr=/127.0.0.1,port=61560,localport=5222], jid: dathan@shots.com/adium, Writing packet: from=sess-man@dathan.local, to=c2s@dathan.local/127.0.0.1_5222_127.0.0.1_61560, DATA=<presence xmlns="jabber:client" type="error" to="dathan@shots.com/adium" from="dvp@shots.com"><c xmlns="http://jabber.org/protocol/caps" node="http://pidgin.im/" hash="sha-1" ver="DdnydQG7RGhP9E3k9Sf+b+bF0zo="/><x xmlns="vcard-temp:x:update"/><error code="406" type="modify"><not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">S2S - Incorrect destinationaddress - one of local virtual hosts or components.</text></error></presence>, SIZE=504, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=AUTH, TYPE=error

my config

config-type=--gen-config-def
--admins=admin@shots.com,admin,admin@shots.com
--virt-hosts=shots.com
--vhost-anonymous-enabled=false
--vhost-tls-required=false
--debug=com.shots.xmpp.tigase,com.shots.xmpp.tigase,xmpp.impl,server,io,auth,message,util
--user-db=mysql
--user-db-uri=jdbc:mysql://localhost:3306/tigasedb?user=root&password=root&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true
--tigase.level=ALL
--tigase.xml.level=ALL
--java.util.logging.ConsoleHandler.level=ALL
--auth-db=com.shots.xmpp.tigase.ShotsCustomAuth
--user-db=com.shots.xmpp.tigase.ShotsUserRepositoryImpl
--roster-implementation=com.shots.xmpp.tigase.RosterFlat
--domain-filter-policy=LOCAL
--def-hostname=shots.com

sess-man/plugins-conf/jabber\:iq\:roster/dynamic-roster-classes=com.shots.xmpp.tigase.ShotsRosterImpl
sess-man/plugins-conf/jabber\:iq\:roster/db-uri=jdbc:mysql://localhost/mydb?user=tigase&password=tigase
sess-man/plugins-conf/jabber\:iq\:roster/default-domain=shots.com
sess-man/plugins-conf/jabber\:iq\:roster/pass-local-jids-to-queries=true
sess-man/plugins-conf/presence/dynamic-roster-classes=com.shots.xmpp.tigase.ShotsRosterImpl
sess-man/plugins-conf/presence/db-uri=jdbc:mysql://localhost/mydb?user=tigase&password=tigase
sess-man/plugins-conf/presence/default-domain=shots.com
sess-man/plugins-conf/presence/pass-local-jids-to-queries=true
#
--sm-plugins = +shots-message-archive,-message-archive,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,+jabber:iq:roster,+presence,-jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,+starttls,-msgoffline,-vcard-temp,+http://jabber.org/protocol/commands,-jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,+pep,+zlib

If the box is not called shots.com How can I get past this error? Typically a top level domain that serves XMPP would be a collection of boxes.

How can you tell tigase that all the boxes in a subnet are ok to route to?

How can you tell tigase that routing to localhost is ok for the local domain?

Do I need to add the name of the box as valid virtual host parameter?

NOTE: vcard is disabled


Replies (3)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 4 years ago

It's hard to tell from the single line from the log file why this happened. My first suspicion is the:

--def-hostname=shots.com

My suggestion is to remove this line and avoid setting default hostname of the machine. In most cases defaults with automatic hostname resolution work best.

Added by Dathan Pattishall about 4 years ago

Looks like to get past the error, I need to do the following

remove --def-hostname, as you suggested and add the following

--virt-hosts=shots.com,dathan.local,localhost

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 4 years ago

dathan.local,localhost should not be needed in your configuration unless you have some kind of network misconfiguration on your machine. Make sure, the OS returns a correct canonical hostname value and that this value resolves correctly to an IP address.

    (1-3/3)