Details
-
Question
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.7
-
None
-
None
-
windows/v0.7/pidgin 2.10.12
Description
hi vsyper dev group:
I'm an newer to vysper, I'm sorry for interupt you. but I conn't continue my work. when i try vysper with docment "embbed vysper in your application", I connot connect to the vysper with pidgin xmpp client.
first, I download the cert file,and then copy the "server/core/src/main/java/org/apache/vysper/xmpp/server/ServerMain.java", and last I change my hosts file, it still didn't work.
code:
String domain = "vysper.org";
StorageProviderRegistry providerRegistry = new MemoryStorageProviderRegistry();
final Entity adminJID = EntityImpl.parseUnchecked("admin@" + domain);
final AccountManagement accountManagement = (AccountManagement) providerRegistry
.retrieve(AccountManagement.class);
accountManagement.addUser(adminJID, "123456");
XMPPServer server = new XMPPServer(domain);
server.setStorageProviderRegistry(providerRegistry);
server.addEndpoint(new TCPEndpoint());
server.setTLSCertificateInfo(new File("e:\\server
bogus_mina_tls.cert"), "boguspw");
server.start();
System.out.println("vysper server is running...");
server.addModule(new SoftwareVersionModule());
server.addModule(new EntityTimeModule());
// server.addModule(new VcardTempModule());
server.addModule(new XmppPingModule());
// server.addModule(new PrivateDataModule());
server.addModule(new AdhocCommandsModule());
final ServiceAdministrationModule serviceAdministrationModule = new ServiceAdministrationModule();
// unless admin user account with a secure password is added, this will
// be not become effective
serviceAdministrationModule.setAddAdminJIDs(Arrays.asList(adminJID));
server.addModule(serviceAdministrationModule);
logs:
[chat]14:56:40.808 [NioProcessor-4] DEBUG o.a.v.x.protocol.SessionStateHolder - session state changed to = INITIATED
[chat]14:56:40.808 [NioProcessor-4] INFO o.a.vysper.mina.XmppIoHandlerAdapter - new session from /127.0.0.1:50790 has been opened
[chat]14:56:40.808 [NioProcessor-4] DEBUG o.a.m.f.codec.ProtocolCodecFilter - Processing a MESSAGE_RECEIVED for session 8
[chat]14:56:40.808 [NioProcessor-4] DEBUG o.a.v.xml.decoder.XMPPContentHandler - Decoder writing stanza: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" to="vysper.org" version="1.0"></stream:stream>
[chat]14:56:40.808 [NioProcessor-4] DEBUG stanza.client - < <stream:stream xmlns:stream="http://etherx.jabber.org/streams" to="vysper.org" version="1.0">
[chat]14:56:40.820 [pool-3-thread-5] DEBUG o.a.v.x.protocol.SessionStateHolder - session state changed to = STARTED
[chat]14:56:40.821 [NioProcessor-4] DEBUG stanza.server - > <stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" from="vysper.org" version="1.0" id="93f75d1bc7214e0aa656496df8736d54"><stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required></required></starttls></stream:features>
[chat]14:56:40.823 [NioProcessor-4] DEBUG o.a.m.f.codec.ProtocolCodecFilter - Processing a MESSAGE_RECEIVED for session 8
[chat]14:56:40.824 [NioProcessor-4] DEBUG o.a.v.xml.decoder.XMPPContentHandler - Decoder writing stanza: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls>
[chat]14:56:40.824 [NioProcessor-4] DEBUG stanza.client - < <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls>
[chat]14:56:40.824 [pool-3-thread-6] DEBUG o.a.v.x.protocol.SessionStateHolder - session state changed to = ENCRYPTION_STARTED
[chat]14:56:40.824 [pool-3-thread-6] DEBUG org.apache.mina.filter.ssl.SslFilter - Adding the SSL Filter sslFilter to the chain
[chat]14:56:40.824 [pool-3-thread-6] DEBUG o.apache.mina.filter.ssl.SslHandler - Session Server[8](no sslEngine) Initializing the SSL Handler
[chat]14:56:40.825 [pool-3-thread-6] DEBUG o.apache.mina.filter.ssl.SslHandler - Session Server[8](no sslEngine) SSL Handler Initialization done.
[chat]14:56:40.825 [pool-3-thread-6] DEBUG org.apache.mina.filter.ssl.SslFilter - Session Server[8](ssl...) : Starting the first handshake
[chat]14:56:40.825 [pool-3-thread-6] DEBUG o.apache.mina.filter.ssl.SslHandler - Session Server[8](ssl...) processing the NEED_UNWRAP state
[chat]14:56:40.825 [pool-3-thread-6] DEBUG org.apache.mina.filter.ssl.SslFilter - Session Server[8](ssl...): Writing Message : WriteRequest: HeapBuffer[pos=0 lim=59 cap=64: 3C 70 72 6F 63 65 65 64 20 78 6D 6C 6E 73 3D 22...]
[chat]14:56:40.825 [pool-3-thread-6] DEBUG org.apache.mina.filter.ssl.SslFilter - Session Server[8](ssl...): Writing Message : MessageWriteRequest, parent : WR WrapperWriteRequest: [ prolog=false, open=true, close=true, content=true, stanza=[proceed]
[chat]14:56:40.826 [NioProcessor-4] DEBUG org.apache.mina.filter.ssl.SslFilter - Session Server[8](ssl...): Message received : HeapBuffer[pos=0 lim=152 cap=1024: 16 03 01 00 93 01 00 00 8F 03 03 8C 0A 6A EB B7...]
[chat]14:56:40.826 [NioProcessor-4] DEBUG o.apache.mina.filter.ssl.SslHandler - Session Server[8](ssl...) Processing the received message
[chat]14:56:40.827 [NioProcessor-4] DEBUG o.apache.mina.filter.ssl.SslHandler - Session Server[8](ssl...) processing the NEED_UNWRAP state
[chat]14:56:40.827 [NioProcessor-4] DEBUG o.apache.mina.filter.ssl.SslHandler - Session Server[8](ssl...) processing the NEED_TASK state
[chat]14:56:40.829 [NioProcessor-4] DEBUG o.apache.mina.filter.ssl.SslHandler - Session Server[8](ssl...) processing the NEED_WRAP state
[chat]14:56:40.829 [NioProcessor-4] DEBUG org.apache.mina.filter.ssl.SslFilter - Session Server[8](ssl...): Writing Message : WriteRequest: HeapBuffer[pos=0 lim=924 cap=1041: 16 03 01 03 97 02 00 00 4D 03 01 56 F8 D5 A8 04...]
[chat]14:56:40.829 [NioProcessor-4] DEBUG o.apache.mina.filter.ssl.SslHandler - Session Server[8](ssl...) processing the NEED_UNWRAP state
[chat]14:56:40.829 [NioProcessor-4] DEBUG org.apache.mina.filter.ssl.SslFilter - Session Server[8](ssl...): Processing the SSL Data
[chat]14:56:40.829 [NioProcessor-4] DEBUG org.apache.mina.filter.ssl.SslFilter - Session Server[8](ssl...): Message received : HeapBuffer[pos=0 lim=7 cap=1024: 15 03 01 00 02 02 47]
[chat]14:56:40.829 [NioProcessor-4] DEBUG o.apache.mina.filter.ssl.SslHandler - Session Server[8](ssl...) Processing the received message
[chat]14:56:40.829 [NioProcessor-4] DEBUG o.apache.mina.filter.ssl.SslHandler - Session Server[8](ssl...) processing the NEED_UNWRAP state
[chat]14:56:40.829 [NioProcessor-4] WARN o.a.vysper.mina.XmppIoHandlerAdapter - error caught on transportation layer: {}
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:495) ~[mina-core-2.0.2.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:693) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:646) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:635) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:67) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1079) [mina-core-2.0.2.jar:na]
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) [mina-core-2.0.2.jar:na]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [na:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.6.0_45]
at java.lang.Thread.run(Unknown Source) [na:1.6.0_45]
Caused by: javax.net.ssl.SSLException: Received fatal alert: insufficient_security
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source) ~[na:1.6]
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(Unknown Source) ~[na:1.6]
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(Unknown Source) ~[na:1.6]
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.recvAlert(Unknown Source) ~[na:1.6]
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readRecord(Unknown Source) ~[na:1.6]
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readNetRecord(Unknown Source) ~[na:1.6]
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.unwrap(Unknown Source) ~[na:1.6]
at javax.net.ssl.SSLEngine.unwrap(Unknown Source) ~[na:1.6]
at org.apache.mina.filter.ssl.SslHandler.unwrap(SslHandler.java:725) ~[mina-core-2.0.2.jar:na]
at org.apache.mina.filter.ssl.SslHandler.unwrapHandshake(SslHandler.java:663) ~[mina-core-2.0.2.jar:na]
at org.apache.mina.filter.ssl.SslHandler.handshake(SslHandler.java:549) ~[mina-core-2.0.2.jar:na]
at org.apache.mina.filter.ssl.SslHandler.messageReceived(SslHandler.java:349) ~[mina-core-2.0.2.jar:na]
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:476) ~[mina-core-2.0.2.jar:na]
... 15 common frames omitted
[chat]14:56:40.829 [NioProcessor-4] DEBUG org.apache.mina.filter.ssl.SslFilter - Session Server[8](ssl...): Writing Message : WriteRequest: HeapBuffer[pos=0 lim=145 cap=256: 3C 65 72 72 6F 72 20 78 6D 6C 6E 73 3D 22 75 72...]
[chat]14:56:40.829 [NioProcessor-4] DEBUG org.apache.mina.filter.ssl.SslFilter - Session Server[8](ssl...): Writing Message : MessageWriteRequest, parent : WR WrapperWriteRequest: [ prolog=false, open=true, close=true, content=true, stanza=[error.undefined-condition]
[chat]14:56:40.829 [NioProcessor-4] INFO o.a.v.mina.MinaBackedSessionContext - session will be closed now
[chat]14:56:40.829 [NioProcessor-4] INFO o.a.v.mina.MinaBackedSessionContext - close future called
[chat]14:56:40.829 [NioProcessor-4] INFO o.a.v.mina.MinaBackedSessionContext - session closed
[chat]14:56:40.829 [NioProcessor-4] DEBUG o.a.v.x.protocol.SessionStateHolder - session state changed to = CLOSED
[chat]14:56:40.829 [NioProcessor-4] DEBUG o.apache.mina.filter.ssl.SslHandler - Unexpected exception from SSLEngine.closeInbound().
javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source) ~[na:1.6]
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(Unknown Source) ~[na:1.6]
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(Unknown Source) ~[na:1.6]
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.closeInbound(Unknown Source) ~[na:1.6]
at org.apache.mina.filter.ssl.SslHandler.destroy(SslHandler.java:203) ~[mina-core-2.0.2.jar:na]
at org.apache.mina.filter.ssl.SslFilter.sessionClosed(SslFilter.java:446) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:395) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:46) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:781) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.filterchain.IoFilterAdapter.sessionClosed(IoFilterAdapter.java:95) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:395) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireSessionClosed(DefaultIoFilterChain.java:388) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.service.IoServiceListenerSupport.fireSessionDestroyed(IoServiceListenerSupport.java:244) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(AbstractPollingIoProcessor.java:580) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeSessions(AbstractPollingIoProcessor.java:540) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67) [mina-core-2.0.2.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1087) [mina-core-2.0.2.jar:na]
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) [mina-core-2.0.2.jar:na]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [na:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.6.0_45]
at java.lang.Thread.run(Unknown Source) [na:1.6.0_45]
[chat]14:56:40.829 [NioProcessor-4] INFO o.a.v.mina.MinaBackedSessionContext - session will be closed now
[chat]14:56:40.829 [NioProcessor-4] INFO o.a.v.mina.MinaBackedSessionContext - session closed
[chat]14:56:40.829 [NioProcessor-4] DEBUG o.a.v.x.protocol.SessionStateHolder - session state changed to = CLOSED
[chat]14:56:40.829 [NioProcessor-4] INFO o.a.vysper.mina.XmppIoHandlerAdapter - session 93f75d1bc7214e0aa656496df8736d54 has been closed