gloox 链接openfire服务器 问题
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://blog.csdn.net/love254443233/article/details/7888082
原因:
修改主机域名,修改数据库中的域名。。。。。。
现象:
gloox登录服务器时出现:
log: level: 0, area: 8, This is gloox 0.9.9.12, connecting...
log: level: 1, area: 32, notice: no SRV record found for 192.168.148.128, using default port.
log: level: 0, area: 32, connecting to 192.168.148.128 (192.168.148.128:5222)
log: level: 0, area: 16384, <?xml version='1.0' ?><stream:stream to='192.168.148.128' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en' version='1.0'>
log: level: 0, area: 8192, <stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='192.168.148.128' id='d1314c34' xml:lang='en' version='1.0'/>
log: level: 0, area: 8192, <stream:features><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns='http://jabber.org/features/compress'><method>zlib</method></compression><auth xmlns='http://jabber.org/features/iq-auth'/><register xmlns='http://jabber.org/features/iq-register'/></stream:features>
log: level: 0, area: 16384, <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
log: level: 0, area: 8192, <proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
log: level: 0, area: 4, starting TLS handshake...
解决办法:
1、登陆openfire管理页面,点击主页面下方“编辑属性”,修改服务器名称为当前主机名称,点击“保存属性”,重启服务器。
2、 重启后,主页的“服务器属性”的‘服务器名称“出现叹号, 这是RSA认证无效造成的,对新的服务器进行RSA证书的配置。
3、选择【服务器设置】菜单,选择左下方【服务器证书】,点击后面的删除按钮将两个证书全部删除。删除后重启服务器。
4、重启后,系统提示“一个或更多的证书丢失。单击 这里 产生自定义签名证书”。点击后,自动生成和新的服务器匹配的RSA证书。
5、重启服务器。再次登录,主界面服务器名称的叹号消失,客户端可以正常登陆。
修改后运行程序如下:
log: level: 0, area: 8, This is gloox 0.9.9.12, connecting...status: 3
issuer: CN=192.168.148.128
peer: CN=192.168.148.128
protocol: TLS1.0
mac: SHA1
cipher: AES-128-CBC
compression: NULL
log: level: 0, area: 8, connection encryption active
log: level: 0, area: 16384, <?xml version='1.0' ?><stream:stream to='192.168.148.128' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en' version='1.0'>
log: level: 0, area: 8192, <stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='192.168.148.128' id='d1314c34' xml:lang='en' version='1.0'/>
log: level: 0, area: 8192, <stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns='http://jabber.org/features/compress'><method>zlib</method></compression><auth xmlns='http://jabber.org/features/iq-auth'/><register xmlns='http://jabber.org/features/iq-register'/></stream:features>
log: level: 0, area: 16384, <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/>
log: level: 0, area: 8192, <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>cmVhbG09IjE5Mi4xNjguMTQ4LjEyOCIsbm9uY2U9IjhINnJoN2NPcytGcWFEdVVKaFJJYkRDQWRxSElvNldFZTY0MVpZYWwiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
log: level: 0, area: 4, processing SASL challenge
log: level: 0, area: 16384, <response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>dXNlcm5hbWU9InVzZXIiLHJlYWxtPSIxOTIuMTY4LjE0OC4xMjgiLG5vbmNlPSI4SDZyaDdjT3MrRnFhRHVVSmhSSWJEQ0FkcUhJbzZXRWU2NDFaWWFsIixjbm9uY2U9IjZiOGI0NTY3MzI3YjIzYzY2NDNjOTg2OTY2MzM0ODczIixuYz0wMDAwMDAwMSxxb3A9YXV0aCxkaWdlc3QtdXJpPSJ4bXBwLzE5Mi4xNjguMTQ4LjEyOCIscmVzcG9uc2U9OTc1Njc1MTllNmNlN2Y3YTRlMjhjNTBmMWY1ZTEwZWMsY2hhcnNldD11dGYtOA==</response>
log: level: 0, area: 8192, <success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>cnNwYXV0aD00OWEzZGE0YWUwNWNmY2I3NWJiZTdjYjMxNGMxOGMxOA==</success>
log: level: 0, area: 4, SASL authentication successful
log: level: 0, area: 16384, <?xml version='1.0' ?><stream:stream to='192.168.148.128' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en' version='1.0'>
log: level: 0, area: 8192, <stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='192.168.148.128' id='d1314c34' xml:lang='en' version='1.0'/>
log: level: 0, area: 8192, <stream:features><compression xmlns='http://jabber.org/features/compress'><method>zlib</method></compression><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></stream:features>
log: level: 0, area: 16384, <iq type='set' id='bind'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/></iq>
log: level: 0, area: 8192, <iq type='result' id='bind' to='192.168.148.128/d1314c34'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid>user@192.168.148.128/d1314c34</jid></bind></iq>
log: level: 0, area: 16384, <iq type='set' id='session'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></iq>
log: level: 0, area: 8192, <iq type='result' id='session' to='user@192.168.148.128/d1314c34'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></iq>
log: level: 0, area: 16384, <presence><priority>0</priority></presence>
log: level: 0, area: 16384, <iq type='get' id='uid1'><query xmlns='jabber:iq:register'/></iq>
log: level: 0, area: 8192, <iq type='result' id='uid1' to='user@192.168.148.128/d1314c34'><query xmlns='jabber:iq:register'><username>user</username><password/><email/><name/><x xmlns='jabber:x:data' type='form'><title>XMPP Client Registration</title><instructions>Please provide the following information</instructions><field var='FORM_TYPE' type='hidden'><value>jabber:iq:register</value></field><field var='username' type='text-single' label='Username'><required/><value>user</value></field><field var='name' type='text-single' label='Full name'><value/></field><field var='email' type='text-single' label='Email'><value/></field><field var='password' type='text-private' label='Password'><required/></field></x><registered/></query></iq>
the account already exists.
链接服务器成功!