Project

General

Profile

psi client not connecting

kumar vinukonda
Added over 4 years ago

Hi,

I am a newbie. I have installed the server as well as the PSI client as per the user guide. I am trying to use the "localhost" as the virtual hosts.

However I am getting the following error when connecting from the psi client. "There was an error communicating with the server.

Details: Stream Negotiation Error: Host unknown".

root@kumar-eME443:/usr/local/Tigase-5.2.0-b3447# more etc/init.properties

--comp-class-1 = tigase.muc.MUCComponent

--virt-hosts = localhost

--user-db-uri = jdbc:mysql://localhost/tigasedb?user=tigase&password=tigase12

--user-db = mysql

--admins = admin@localhost

--comp-name-4 = message-archive

--comp-name-3 = proxy

config-type = --gen-config-def

--comp-name-2 = pubsub

--comp-name-1 = muc

--cluster-mode = true

--sm-plugins = +message-archive-xep-0136,+jabber:iq:auth

--debug = server

--comp-class-4 = tigase.archive.MessageArchiveComponent

--comp-class-3 = tigase.socks5.Socks5ProxyComponent

--comp-class-2 = tigase.pubsub.PubSubComponent

root@kumar-eME443:/usr/local/Tigase-5.2.0-b3447# more etc/tigase.conf

#osgiEnabled=(true|false)

#osgiEnabled=false

OSGI=true

ENC="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"

DRV="-Djdbc.drivers=com.mysql.jdbc.Driver:org.postgresql.Driver:org.apache.derby

.jdbc.EmbeddedDriver"

#GC="-XX:+UseBiasedLocking -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:P

arallelCMSThreads=2 -XX:-ReduceInitialCardMarks"

#EX="-XX:+OptimizeStringConcat -XX:+DoEscapeAnalysis -XX:+UseNUMA"

JAVA_HOME="/usr/lib/jvm/java-7-oracle"

CLASSPATH=""

JAVA_OPTIONS="${GC} ${EX} ${ENC} ${DRV} -server -Xms100M -Xmx200M -XX:PermSize=3

2m -XX:MaxPermSize=256m -XX:MaxDirectMemorySize=128m "

TIGASE_CONFIG="etc/tigase.xml"

TIGASE_OPTIONS=" --property-file etc/init.properties "

Can someone help me in root causing the problem. Logs have nothing in them.

Thank you in advance.

Kumar


Replies (5)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

Are you sure you used 'localhost' as a domain for your user account in Psi?

Added by kumar vinukonda over 4 years ago

I tried with Mcabber as well. The error is:

Certificate is not trusted!

Disconnected, reason: 3->'LM_DISCONNECT_REASON_ERROR'

So thought it might be a issue with server configuration.

I then tried with tclmt.sh tool. Even there it is failing.

command executed was:

bin/tclmt.sh -debug -u admin@localhost -p tigase -ip localhost remote sess-man add-user kumar@localhost kumar123 vvsskumar@gmail.com

and in the tclmt logs I see the following:

2014-09-15 15:57:17 FINEST SocketConnector.send() - Send:

2014-09-15 15:57:17 INFO SocketConnector$2.handshakeCompleted() - TLS completed javax.net.ssl.HandshakeCompletedEvent[source=2cf42d[TLS_RSA_WITH_AES_128_CBC_SHA: Socket[addr=/127.0.0.1,port=5222,localport=47987]]]

2014-09-15 15:57:17 FINEST SocketConnector$Worker$1.xmppStreamOpened() - xmppStreamOpened()

2014-09-15 15:57:17 FINEST SocketConnector.processElement() - RECV: PLAINANONYMOUSzlib

2014-09-15 15:57:17 FINER AuthModule.login() - Authenticating with SASL Non-SASL

2014-09-15 15:57:17 FINE SaslModule.login() - Try login with SASL

2014-09-15 15:57:17 FINEST JaxmppCore$1.write() - SENT: YWRtaW5AbG9jYWxob3N0AGFkbWluAHRpZ2FzZQ==

2014-09-15 15:57:17 FINEST SocketConnector.send() - Send: YWRtaW5AbG9jYWxob3N0AGFkbWluAHRpZ2FzZQ==

2014-09-15 15:57:17 FINEST SocketConnector.processElement() - RECV: Password not verified

2014-09-15 15:57:17 FINE SaslModule.processFailure() - Failure with condition: not_authorized

2014-09-15 15:57:17 FINE Jaxmpp.onException() - Catching exception

2014-09-15 15:57:17 FINE SocketConnector.terminateStream() - Terminating XMPP Stream

In the both the scenarios, I am not seeing anything in the Server logs.

Server Configuration:

init.properties

--comp-class-1 = tigase.muc.MUCComponent

--virt-hosts = localhost

--user-db-uri = jdbc:mysql://localhost/tigasedb?user=tigase&password=tigase12

--user-db = mysql

--admins = admin@localhost

--comp-name-4 = message-archive

--comp-name-3 = proxy

config-type = --gen-config-all

--comp-name-2 = pubsub

--comp-name-1 = muc

--cluster-mode = true

--sm-plugins = +message-archive-xep-0136,+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

--debug = server

--comp-class-4 = tigase.archive.MessageArchiveComponent

--comp-class-3 = tigase.socks5.Socks5ProxyComponent

--comp-class-2 = tigase.pubsub.PubSubComponent

I have created a self-signed Certificated using the procedure in the tigase.org.

Pls suggest where the problem can be.

Thanks in advance.

Added by kumar vinukonda over 4 years ago

One question I had was....I see that the server is bound to port 5223 when I queried using "netstat -a".

However in the tclmt logs I see that it is trying to connect to 5222 port.

Can this be the problem?

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

Port 5223 is for SSL connections, port 5222 is for TLS and plain connections.

As for the installation it appears there are 2 "problems". One with Mcabber and Psi is that these clients refuse to connect to the server because the server uses self-signed SSL certificate. So most likely you have to adjust account settings in the client to allow connecting to the server with self-signed certificate. Usually Psi, when it finds out that server uses self-signed certificate, it displays a window with information and asking you what to do. If you select to allow connection, it should proceed.

The second problem is one step further with user authentication. The tclmt cannot connect because authentication fails. There might be a few reasons for this:

  1. Incorrect password used

  2. The account does not exist, user not yet registered on the server

  3. Database connectivity problems

I suggest you to try with Psi first to register a new account 'admin@localhost' on the server. If it gets through the certificate checking it should attempt registering a new user account. Check what response you get from the server.

Added by kumar vinukonda over 4 years ago

I was able to make it work. Thank you for your help.

Kumar

    (1-5/5)