我遇到运行vysper的问题。
刚刚更新了这一部分:
<bean id="addUsers" class="org.apache.vysper.spring.AddUserHelper">
<constructor-arg index="0">
<map>
<entry key="admin@test" value="Password" />
<entry key="darewreck@test" value="Password" />
<!--<entry key="user2@vysper.org" value="CHOOSE A SECURE PASSWORD" />-->
<!--<entry key="user3@vysper.org" value="CHOOSE A SECURE PASSWORD" />-->
</map>
</constructor-arg>
<property name="storageProviderRegistry" ref="storageRegistry" />
</bean>
我认为“test”是运行时服务器的注册域名?
或者您是否指定了服务器的域名?
16:16:22,415 |信息| org.springframework.context.support.ClassPathXmlApplicationContext | 清爽 org.springframework.context.support.ClassPathXmlApplicationContext@625e068: 启动日期[Mon Sep 16 16:16:22 PDT 2013];上下文层次结构的根 16:16:22,457 |信息| org.springframework.beans.factory.xml.XmlBeanDefinitionReader | 从类路径资源加载XML bean定义 [弹簧-config.xml中] 16:16:22,514 |信息| org.springframework.beans.factory.support.DefaultListableBeanFactory | 在实例中预先实例化单身人士 org.springframework.beans.factory.support.DefaultListableBeanFactory@19f9e 414:定义bean [inmemoryStorageRegistry,jcrStorageRegistry,addUsers,tcpEndpoint,server]; 工厂层级的根 16:16:22,762 |信息| org.apache.vysper.xmpp.server.DefaultServerRuntimeContext |更换 存储提供程序注册表 org.apache.vysper.storage.inmemory.MemoryStorageProviderRegistry 16:16:22,821 |信息| org.apache.vysper.xmpp.server.DefaultServerRuntimeContext |加入 module ... servicediscovery(1.0beta) 16:16:22,825 |信息| org.apache.vysper.xmpp.server.DefaultServerRuntimeContext |加入 模块......名单(1.0beta) 16:16:22,877 |信息| org.apache.vysper.xmpp.server.DefaultServerRuntimeContext |加入 模块... XEP-0092软件版本(1.0) 16:16:22,881 |信息| org.apache.vysper.xmpp.server.DefaultServerRuntimeContext |加入 模块... XEP-0202实体时间(1.0) 16:16:22,883 |信息| org.apache.vysper.xmpp.server.DefaultServerRuntimeContext |加入 模块... XEP-0054 Vcard-temp(1.0) 16:16:22,883 |错误| org.apache.vysper.xmpp.modules.extension.xep0054_vcardtemp.VcardTempModule |找不到VcardTempPersistenceManager 16:16:22,883 |信息| org.apache.vysper.xmpp.server.DefaultServerRuntimeContext |加入 模块... XEP-0199 XMPP Ping(2.0) 16:16:22,883 |信息| org.apache.vysper.xmpp.server.DefaultServerRuntimeContext |加入 模块... XEP-0049私有数据(1.2) 16:16:22,884 |错误| org.apache.vysper.xmpp.modules.extension.xep0049_privatedata.PrivateDataModule |找不到PrivateDataPersistenceManager 16:16:22,884 |信息| org.apache.vysper.xmpp.server.DefaultServerRuntimeContext |加入 模块... XEP-0050 Ad-hoc命令(1.2) 16:16:22,885 |信息| org.apache.vysper.xmpp.server.DefaultServerRuntimeContext |加入 模块... XEP-0133服务管理(1.1) 16:16:22,885 |信息| org.apache.vysper.xmpp.server.DefaultServerRuntimeContext |加入 模块... XEP-0045多用户聊天(1.24) 16:16:22,891 |警告| org.apache.vysper.xmpp.modules.extension.xep0045_muc.MUCModule |没有 找到房间存储提供程序,使用默认值(在内存中) 16:16:22,891 |警告| org.apache.vysper.xmpp.modules.extension.xep0045_muc.MUCModule |没有 找到的占用者存储提供程序,使用默认值(在内存中)
用户:darewreck @ test 密码:密码
但是,Swift Client收到加密错误。我不太确定我做错了什么。
服务器打印出来:
16:18:49,571 | DEBUG | org.apache.vysper.xmpp.protocol.SessionStateHolder | session state changed to = INITIATED
16:18:56,582 | DEBUG | org.apache.vysper.xml.decoder.XMPPContentHandler | Decoder writing stanza: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" to="test" version="1.0"></stream:stream
>
16:18:56,584 | INFO | stanza.client | stream
16:18:56,585 | DEBUG | org.apache.vysper.xmpp.protocol.SessionStateHolder | session state changed to = STARTED
16:18:56,588 | INFO | stanza.server | stream.starttls[required]
16:18:56,590 | DEBUG | org.apache.vysper.xml.decoder.XMPPContentHandler | Decoder writing stanza: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls>
16:18:56,591 | INFO | stanza.client | starttls
16:18:56,592 | DEBUG | org.apache.vysper.xmpp.protocol.SessionStateHolder | session state changed to = ENCRYPTION_STARTED
16:18:56,604 | DEBUG | org.apache.vysper.xmpp.protocol.SessionStateHolder | session state changed to = CLOSED
我是否使用spring-config.xml文件中提供的身份验证/密码无法正确配置?
答案 0 :(得分:2)
<bean id="inmemoryStorageRegistry" class="org.apache.vysper.storage.inmemory.MemoryStorageProviderRegistry" />
<bean id="jcrStorageRegistry" class="org.apache.vysper.storage.jcr.JcrStorageProviderRegistry" />
<!-- choose one of the storage registries -->
<alias name="inmemoryStorageRegistry" alias="storageRegistry" />
<!-- default users; remove if you have persistently stored users
NOTE: if passwords are empty, random passwords are generated and printed on the console
So, your default install of Vysper is secure from the very beginning
-->
<bean id="addUsers" class="org.apache.vysper.spring.AddUserHelper">
<constructor-arg index="0">
<map>
<entry key="admin@vysper.org" value="CHOOSE A SECURE PASSWORD" />
<entry key="user1@localhost" value="user1" />
<entry key="user2@localhost" value="user2" />
<!--<entry key="user3@vysper.org" value="CHOOSE A SECURE PASSWORD" />-->
</map>
</constructor-arg>
<property name="storageProviderRegistry" ref="storageRegistry" />
</bean>
<bean id="tcpEndpoint" class="org.apache.vysper.mina.TCPEndpoint">
</bean>
<!-- for making the server available over HTTP transport, configure the BOSH endpoint
BOSH requires extension xep0124-xep0206-bosh to be on the classpath.
-->
<bean id="boshEndpoint" class="org.apache.vysper.xmpp.extension.xep0124.BoshEndpoint">
<property name="accessControlAllowOrigin">
<list><value>*</value></list>
</property>
<property name="port" value="8080" />
<property name="contextPath" value="/bosh" />
</bean>
<bean id="server" class="org.apache.vysper.spring.SpringCompatibleXMPPServer"
init-method="init" destroy-method="destroy">
<!-- TODO change domain name to your domain -->
<constructor-arg value="localhost"/>
<property name="endpoints">
<list>
<ref bean="tcpEndpoint"/>
<ref bean="boshEndpoint"/>
</list>
</property>
<property name="storageProviderRegistry" ref="storageRegistry" />
<property name="certificateFile" value="classpath:bogus_mina_tls.cert" />
<property name="certificatePassword" value="boguspw" />
<property name="modules" >
<list>
<bean class="org.apache.vysper.xmpp.modules.extension.xep0092_software_version.SoftwareVersionModule"/>
<bean class="org.apache.vysper.xmpp.modules.extension.xep0202_entity_time.EntityTimeModule" />
<bean class="org.apache.vysper.xmpp.modules.extension.xep0054_vcardtemp.VcardTempModule" />
<bean class="org.apache.vysper.xmpp.modules.extension.xep0119_xmppping.XmppPingModule" />
<bean class="org.apache.vysper.xmpp.modules.extension.xep0049_privatedata.PrivateDataModule" />
<bean class="org.apache.vysper.xmpp.modules.extension.xep0050_adhoc_commands.AdhocCommandsModule" />
<bean class="org.apache.vysper.xmpp.modules.extension.xep0133_service_administration.ServiceAdministrationModule" >
<property name="addAdmins">
<list><value>admin@vysper.org</value></list>
</property>
</bean>
<!-- below some more modules which are available as separately-built jars.
make sure they are on the classpath when enabling them or remove the beans below,
depending on the features your server should expose -->
<!--<bean class="org.apache.vysper.xmpp.modules.extension.xep0060_pubsub.PublishSubscribeModule" />-->
<bean class="org.apache.vysper.xmpp.modules.extension.xep0045_muc.MUCModule" />
</list>
</property>
</bean>