powered by Jive Software

Seemingly random users have lost their contacts

I am getting reports of people losing their contacts. It’‘s like a new database has been created or something. Here’'s a scenerio - a user lost their contacts…he then added me in and it worked. To see if i would lose mine, I logged off neos and then back on…all of my contacts that were there before I logged off disappeared except for the person who had just added me (and I added them at the same time)

Does this make sense to anyone?

Our database server was rebooted this morning and the times seem to correlate, but I just don’'t know where to go from here.

Thanks,

Calvin

Setup:

Jive Wildfire on Linux

SQL Server 2000

Clients are all using Neos

Here is an error in my Error.log that started coming up this morning and has come up a number of times:

2006.02.08 10:43:34 org.jivesoftware.wildfire.user.User.insertProperty(User.java:401)

java.sql.SQLException: [SQLServer 2000 Driver for JDBC][SQLServer]Violation of PRIMARY KEY constraint ‘‘jiveUserProp_pk’’. Cannot insert duplicate key in object ‘‘jiveUserProp’’.

at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)

at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)

at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)

at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)

at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)

at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)

at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)

at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)

at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)

at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)

at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)

at com.microsoft.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)

at org.jivesoftware.wildfire.user.User.insertProperty(User.java:398)

at org.jivesoftware.wildfire.user.User.access$300(User.java:39)

at org.jivesoftware.wildfire.user.User$PropertiesMap.put(User.java:306)

at org.jivesoftware.wildfire.spi.PresenceManagerImpl.userUnavailable(PresenceManag erImpl.java:172)

at org.jivesoftware.wildfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:111)

at org.jivesoftware.wildfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:141)

at org.jivesoftware.wildfire.SessionManager$ClientSessionListener.onConnectionClos e(SessionManager.java:1299)

at org.jivesoftware.wildfire.net.SocketConnection.notifyCloseListeners(SocketConne ction.java:496)

at org.jivesoftware.wildfire.net.SocketConnection.close(SocketConnection.java:341)

at org.jivesoftware.wildfire.handler.IQAuthHandler.login(IQAuthHandler.java:204)

at org.jivesoftware.wildfire.handler.IQAuthHandler.handleIQ(IQAuthHandler.java:141 )

at org.jivesoftware.wildfire.handler.IQHandler.process(IQHandler.java:48)

at org.jivesoftware.wildfire.IQRouter.handle(IQRouter.java:242)

at org.jivesoftware.wildfire.IQRouter.route(IQRouter.java:78)

at org.jivesoftware.wildfire.PacketRouter.route(PacketRouter.java:65)

at org.jivesoftware.wildfire.net.SocketReader.processIQ(SocketReader.java:390)

at org.jivesoftware.wildfire.net.ClientSocketReader.processIQ(ClientSocketReader.j ava:50)

at org.jivesoftware.wildfire.net.SocketReader.readStream(SocketReader.java:255)

at org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:118)

at java.lang.Thread.run(Thread.java:595)


And here’'s a relevant part of my debog log:

2006.02.08 11:14:41 Starting LDAP search…

2006.02.08 11:14:41 … search finished

2006.02.08 11:14:41 Creating a DirContext in LdapManager.getContext()…

2006.02.08 11:14:41 Created hashtable with context values, attempting to create context…

2006.02.08 11:14:41 … context created successfully, returning.

2006.02.08 11:14:42 SSL Connect 196d898[SSL_NULL_WITH_NULL_NULL: Socket[addr=/10.10.116.57,port=1439,localport=5223]]

2006.02.08 11:15:13 SSL Connect d45f89[SSL_NULL_WITH_NULL_NULL: Socket[addr=/10.10.116.57,port=1493,localport=5223]]

2006.02.08 11:15:13 Trying to find a user’'s DN based on their username. sAMAccountName: calvin.daling, Base DN: DC=twu,DC=ca…

2006.02.08 11:15:13 Creating a DirContext in LdapManager.getContext()…

2006.02.08 11:15:13 Created hashtable with context values, attempting to create context…

2006.02.08 11:15:13 … context created successfully, returning.

2006.02.08 11:15:13 Starting LDAP search…

2006.02.08 11:15:13 … search finished

2006.02.08 11:15:13 In LdapManager.checkAuthentication(userDN, password), userDN is: CN=Calvin Daling,OU=Users,OU=Information Technology,OU=Mattson,OU=Staff…

2006.02.08 11:15:13 Created context values, attempting to create context…

2006.02.08 11:15:13 … context created successfully, returning.

2006.02.08 11:15:15 Error creating session

java.net.SocketException: Connection reset

at java.net.SocketInputStream.read(SocketInputStream.java:168)

at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:284)

at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:319)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:720)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImp l.java:1025)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:67 5)

at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)

at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)

at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)

at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)

at java.io.InputStreamReader.read(InputStreamReader.java:167)

at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2971)

at org.xmlpull.mxp1.MXParser.more(MXParser.java:3025)

at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)

at org.jivesoftware.wildfire.net.MXParser.nextImpl(MXParser.java:322)

at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)

at org.jivesoftware.wildfire.net.SocketReader.createSession(SocketReader.java:567)

at org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:109)

at java.lang.Thread.run(Thread.java:595)

2006.02.08 11:15:15 Error creating session

java.net.SocketException: Connection reset

at java.net.SocketInputStream.read(SocketInputStream.java:168)

at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:284)

at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:319)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:720)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImp l.java:1025)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:67 5)

at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)

at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)

at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)

at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)

at java.io.InputStreamReader.read(InputStreamReader.java:167)

at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2971)

at org.xmlpull.mxp1.MXParser.more(MXParser.java:3025)

at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)

at org.jivesoftware.wildfire.net.MXParser.nextImpl(MXParser.java:322)

at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)

at org.jivesoftware.wildfire.net.SocketReader.createSession(SocketReader.java:567)

at org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:109)

at java.lang.Thread.run(Thread.java:595)

2006.02.08 11:15:15 Error creating session

java.net.SocketException: Connection reset

at java.net.SocketInputStream.read(SocketInputStream.java:168)

at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:284)

at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:319)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:720)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImp l.java:1025)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:67 5)

at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)

at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)

at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)

at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)

at java.io.InputStreamReader.read(InputStreamReader.java:167)

at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2971)

at org.xmlpull.mxp1.MXParser.more(MXParser.java:3025)

at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)

at org.jivesoftware.wildfire.net.MXParser.nextImpl(MXParser.java:322)

at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)

at org.jivesoftware.wildfire.net.SocketReader.createSession(SocketReader.java:567)

at org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:109)

at java.lang.Thread.run(Thread.java:595)

Hi Calvin,

did you also restart Wildfire? I’'m sorry to ask such a simple question but Wildfire uses a database cache and I yet did not try if Wildfire supports a transparent database reconnect if the connection was lost.

LG

Thanks - that fixed it. Must have been that the database won’'t auto-reconnect. I was a bit worried about restarting the server because, as I said, users lose their contacts when they log off and on so restarting the server would force everyone to do that…but oh well. Risk-reward.

Hi Calvin,

I don’'t want to ask you to do this again, but to me it sounds like a bug. It seems that a lost database connection is not properly handled, so either reconnect does not work or in a way which is not acceptable. Matt, Gato, … (the developers) what about creating a JM- issue (internal bugreport) ?

LG

Yeah I agree - let me know if any of you needs more information.