Projects tigase _server server-core Issues #1355
Failure to store message to offline storage should result in error response (#1355)
Wojciech Kapcia (Tigase) opened 3 years ago

(ref: https://github.com/tigase/tigase-server/issues/196#issuecomment-1527842097)

If there is an issue with storing message to offline store, there should be error returned:

[2023-04-28 17:00:19:922] [WARNING ] [              in_4-amp ] JDBCMsgRepository.storeMessage() : Problem adding new entry to DB: 
java.sql.SQLException: The MySQL server is running with the --read-only option so it cannot execute this statement
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2495)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1903)
	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2011)
	at com.mysql.jdbc.CallableStatement.executeQuery(CallableStatement.java:872)
	at jdk.internal.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at tigase.db.jdbc.PreparedStatementInvocationHandler.invoke(PreparedStatementInvocationHandler.java:38)
	at com.sun.proxy.$Proxy35.executeQuery(Unknown Source)
	at tigase.server.amp.db.JDBCMsgRepository.storeMessage(JDBCMsgRepository.java:414)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at tigase.stats.StatisticsInvocationHandler.invoke(StatisticsInvocationHandler.java:75)
	at com.sun.proxy.$Proxy38.storeMessage(Unknown Source)
	at tigase.server.amp.db.MsgRepository$MsgRepositoryMDBean.storeMessage(MsgRepository.java:326)
	at tigase.server.amp.action.Store.execute(Store.java:116)
	at tigase.server.amp.AmpComponent.processPacket(AmpComponent.java:198)
	at tigase.cluster.AmpComponentClustered.processPacket(AmpComponentClustered.java:72)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1405)

I do not receive any error on the XMPP submit, I guess that tigase is async and accept the message that needs to be delivered and sends an ack to the sender then it found that the recipient is offline and tries to store the message to the MsgRepository. If the recipient is online the delivery works also if mysql is not working but if is online this exception is triggered without any errors for the sender

  • Wojciech Kapcia (Tigase) batch edited 2 years ago
    Name Previous Value Current Value
    Iterations
    empty
    tigase-server-8.4.0
  • Wojciech Kapcia (Tigase) added "Related" #1496 2 years ago
  • Wojciech Kapcia (Tigase) changed state to 'Open' 2 years ago
    Previous Value Current Value
    Closed
    Open
  • Wojciech Kapcia (Tigase) added to iteration "tigase-server-8.5.0" 2 years ago
  • Wojciech Kapcia (Tigase) removed from iteration "tigase-server-8.4.0" 2 years ago
  • Wojciech Kapcia (Tigase) commented 4 days ago

    When attemp to store AMP offline message fails with SQLexception then TigaseDBException will be rethrown from tigase.server.amp.db.JDBCMsgRepository#storeMessage which will yield an error message up the call stack.

  • Wojciech Kapcia (Tigase) changed state to 'Closed' 4 days ago
    Previous Value Current Value
    Open
    Closed
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
tigase-server-8.4.0
Iterations
Issue Votes (0)
Watchers (2)
Reference
tigase/_server/server-core#1355
Please wait...
Page is in error, reload to recover