Project

General

Profile

help!When I ues tigase messager create new account ,it cause a ClosedChannelException

ll chen
Added over 4 years ago

my server config's file is:

config-type=--gen-config-def

--admins=tigase@localhost
--user-db=mysql
--virt-hosts=chenll
--debug=server
--user-repo-pool-size=12
--debug=server,xmpp.impl,xmpp.XMPPIOService
--debug-packages=tigase
--user-db-uri=jdbc:mysql://127.0.0.1:3306/tigase?user=root&password=31212cc&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true
--sm-plugins =message-archive-xep-0136,+message-all,+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=2,+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
sess-man/plugins-conf/message-archive-xep-0136/component-jid=message-archive@chenll
sess-man/plugins-conf/message-archive-xep-0136/auto=true

Server's logs is:

2014-09-18 13:03:39.306 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {31212=Domain: 31212, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: a6b0229b-53b7-41ce-b4ac-a6f0867d2981, domainFilter: ALL, chenll=Domain: chenll, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: 3cead2bc-acc0-48b1-93d9-139995df4de4, domainFilter: ALL, tigaseserver=Domain: tigaseserver, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: 4e4087c0-0fe2-45a2-bcef-5afa36c06610, domainFilter: ALL}
2014-09-18 13:03:51.057 [ConnectionOpenThread]  ConnectionOpenThread.run()    FINEST:   OP_ACCEPT
2014-09-18 13:03:51.058 [ConnectionOpenThread]  ConnectionOpenThread.run()    FINER:    Registered new client socket: java.nio.channels.SocketChannel[connected local=/192.168.3.124:5222 remote=/192.168.3.122:53409]
2014-09-18 13:03:51.058 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Accept called for service: null@null
2014-09-18 13:03:51.062 [ConnectionOpenThread]  ConnectionManager.serviceStarted()  FINER: [[c2s]] Connection started: null, type: accept, Socket: nullSocket[addr=/192.168.3.122,port=53409,localport=5222], jid: null
2014-09-18 13:03:51.083 [ConnectionOpenThread]  SocketThread.<clinit>()       WARNING:  17 socketReadThreads started.
2014-09-18 13:03:51.107 [ConnectionOpenThread]  SocketThread.<clinit>()       WARNING:  17 socketWriteThreads started.
2014-09-18 13:03:51.108 [ConnectionOpenThread]  SocketThread.addSocketServicePriv()  FINEST: Adding to waiting: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409, type: accept, Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[addr=/192.168.3.122,port=53409,localport=5222], jid: null
2014-09-18 13:03:51.110 [socketReadThread-7]  SocketThread.run()              FINEST:   Selector AWAKE: sun.nio.ch.KQueueSelectorImpl@25d2845a
2014-09-18 13:03:51.111 [socketReadThread-7]  SocketThread.addAllWaiting()    FINEST:   waiting.size(): 1
2014-09-18 13:03:51.112 [socketReadThread-7]  SocketThread.addAllWaiting()    FINEST:   ADDED OP_READ: 192.168.3.124_5222_192.168.3.122_53409
2014-09-18 13:03:51.113 [socketReadThread-7]  SocketThread.run()              FINEST:   Selector AWAKE: sun.nio.ch.KQueueSelectorImpl@25d2845a
2014-09-18 13:03:51.113 [socketReadThread-7]  SocketThread.run()              FINEST:   AWAKEN: 192.168.3.124_5222_192.168.3.122_53409, ready for READING, readyOps() = 1
2014-09-18 13:03:51.114 [socketReadThread-7]  SocketThread.addAllWaiting()    FINEST:   waiting.size(): 0
2014-09-18 13:03:51.115 [pool-10-thread-1]  IOService.isConnected()           FINEST:   Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[addr=/192.168.3.122,port=53409,localport=5222], Connected: true, id: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409
2014-09-18 13:03:51.116 [pool-10-thread-1]  IOUtil.<clinit>()                 CONFIG:   using direct byte buffers with size 131,072 per buffer
2014-09-18 13:03:51.117 [pool-10-thread-1]  SocketIO.read()                   FINER:    Read from channel 118 bytes, c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[addr=/192.168.3.122,port=53409,localport=5222]
2014-09-18 13:03:51.118 [pool-10-thread-1]  IOService.readData()              FINEST:   Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[addr=/192.168.3.122,port=53409,localport=5222], Reading network binary data: 118
2014-09-18 13:03:51.118 [pool-10-thread-1]  IOService.readData()              FINEST:   Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[addr=/192.168.3.122,port=53409,localport=5222], Decoded character data: <stream:stream to='192.168.3.124' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
2014-09-18 13:03:51.118 [pool-10-thread-1]  IOService.isConnected()           FINEST:   Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[addr=/192.168.3.122,port=53409,localport=5222], Connected: true, id: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409
2014-09-18 13:03:51.119 [pool-10-thread-1]  XMPPIOService.processSocketData()  FINEST:  c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409, type: accept, Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[addr=/192.168.3.122,port=53409,localport=5222], jid: null, READ:<stream:stream to='192.168.3.124' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
2014-09-18 13:03:51.119 [pool-10-thread-1]  XMPPDomBuilderHandler.startElement()  FINEST: Start element name: stream:stream
2014-09-18 13:03:51.119 [pool-10-thread-1]  XMPPDomBuilderHandler.startElement()  FINEST: Element attributes names: [to, xmlns, xmlns:stream, version, null, null]
2014-09-18 13:03:51.119 [pool-10-thread-1]  XMPPDomBuilderHandler.startElement()  FINEST: Element attributes values: [192.168.3.124, jabber:client, http://etherx.jabber.org/streams, 1.0, null, null]
2014-09-18 13:03:51.119 [pool-10-thread-1]  XMPPDomBuilderHandler.startElement()  FINEST: Namespace found: http://etherx.jabber.org/streams
2014-09-18 13:03:51.120 [pool-10-thread-1]  ClientConnectionManager.xmppStreamOpened()  FINER: Stream opened: {xmlns:stream=http://etherx.jabber.org/streams, to=192.168.3.124, xmlns=jabber:client, version=1.0}
2014-09-18 13:03:51.120 [pool-10-thread-1]  XMPPIOService.xmppStreamOpened()  FINEST:   c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409, type: accept, Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[addr=/192.168.3.122,port=53409,localport=5222], jid: null, Sending data: <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='tigase-error-tigase' from='31212' version='1.0' xml:lang='en'><stream:error><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error></stream:stream>
2014-09-18 13:03:51.120 [pool-10-thread-1]  IO            FINEST:   Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[unconnected], Exception reading data
java.nio.channels.ClosedChannelException
    at sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:236)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:279)
    at tigase.io.SocketIO.read(SocketIO.java:307)
    at tigase.net.IOService.readData(IOService.java:1010)
    at tigase.xmpp.XMPPIOService.processSocketData(XMPPIOService.java:753)
    at tigase.net.IOService.call(IOService.java:265)
    at tigase.net.IOService.call(IOService.java:1)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
2014-09-18 13:03:51.127 [pool-10-thread-1]  IOService.forceStop()             FINER:    Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[unconnected], Force stop called...
2014-09-18 13:03:51.128 [pool-10-thread-1]  IOService.forceStop()             FINER:    Service listener is null: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[unconnected]
2014-09-18 13:03:51.128 [pool-10-thread-1]  IOService.isConnected()           FINEST:   Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[unconnected], Connected: false, id: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409
2014-09-18 13:03:51.128 [pool-10-thread-1]  IOService.isConnected()           FINEST:   Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[unconnected], Connected: false, id: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409
2014-09-18 13:03:51.128 [pool-10-thread-1]  IOService.call()                  FINEST:   c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409, type: accept, Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[unconnected], jid: null, stopping connection due to the fact that it was disconnected, forceStop()
2014-09-18 13:03:51.129 [pool-10-thread-1]  IOService.forceStop()             FINER:    Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[unconnected], Force stop called...
2014-09-18 13:03:51.129 [pool-10-thread-1]  IOService.forceStop()             FINER:    Service listener is null: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[unconnected]
2014-09-18 13:03:51.129 [ResultsListener-socketWriteThread-16]  IOService.isConnected()  FINEST: Socket: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409 Socket[unconnected], Connected: false, id: c2s@shamrocks-macbook-pro.local/192.168.3.124_5222_192.168.3.122_53409
2014-09-18 13:03:51.130 [ResultsListener-socketWriteThread-16]  SocketThread$ResultsListener.run()  FINEST: REMOVED: 192.168.3.124_5222_192.168.3.122_53409

Replies (4)

Added by Wojciech Kapcia TigaseTeam over 4 years ago

First of all - you've configured:

--virt-hosts=chenll

yet you are sending:

<stream:stream to='192.168.3.124' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>

Please node to='192.168.3.124' - which is not configured as a VHost hence it generated error which was supposed to be written to the user.

As for the disconnection - which version of Tigase are you testing?

Added by ll chen over 4 years ago

thx (o)

I download server source from https://repository.tigase.org/git/tigase-server.git and download the Tigase Android Messenger source form https://repository.tigase.org/git/tigase-mobilemessenger.git.

I want to connect android messager and server,but now when I want to register a new account it cause a exception...

Added by Wojciech Kapcia TigaseTeam over 4 years ago

ll chen wrote:

I want to connect android messager and server,but now when I want to register a new account it cause a exception...

When you are trying to register new account make sure, when you provide server details, that you use chenll as server and not particular IP (@192.168.3.124@ in your case).

Added by ll chen over 4 years ago

thx~

1.bmp (2.33 MB) 1.bmp

    (1-4/4)