Sign in to follow this  
RicePirate

Inter-Server Mail Issues

Recommended Posts

We've recently opened a PvP island and whenever someone sends mail from one island to the other (either direction), the server freaks out and does a bunch of bad stuff. Note that sending mail to the same server does not yield any issues.

  • The sender receives this message:
[16:05:17] The spirits in the mailbox reported a problem when sending the contents of the mailbox. Reverting. The message was: Error occurred in server thread; nested exception is: 
	java.lang.StackOverflowError
  • The recipient "receives" 1000+ of each item, but when accepting, only one item is actually given:

[17:22:42] You sense imps whispering your name and saying you have 1325 mail waiting to be picked up.
  • The receiving server gives SQL errors, which are repeated many times (I would assume the same amount of times that the recipient receives the mail). Note that for each iteration of the same error, all of the IDs are the same:

[05:19:00 PM] INFO com.wurmonline.server.webinterface.WebInterfaceImpl: 127.0.0.1 sendMail 4576189452544 to server 9618, receiver ID: 256911970560
[05:19:00 PM] WARNING com.wurmonline.server.items.WurmMail: 764237625212930 : [SQLITE_CONSTRAINT]  Abort due to constraint violation (UNIQUE constraint failed: MAIL.ITEMID)
java.sql.SQLException: [SQLITE_CONSTRAINT]  Abort due to constraint violation (UNIQUE constraint failed: MAIL.ITEMID)
	at org.sqlite.core.DB.newSQLException(DB.java:890)
	at org.sqlite.core.DB.newSQLException(DB.java:901)
	at org.sqlite.core.DB.execute(DB.java:810)
	at org.sqlite.core.DB.executeUpdate(DB.java:847)
	at org.sqlite.jdbc3.JDBC3PreparedStatement.executeUpdate(JDBC3PreparedStatement.java:86)
	at com.wurmonline.server.items.WurmMail.createInDatabase(WurmMail.java:534)
	at com.wurmonline.server.webinterface.WebInterfaceImpl.sendMail(WebInterfaceImpl.java:2962)
	at com.wurmonline.server.LoginServerWebConnection.sendMail(LoginServerWebConnection.java:1204)
	at com.wurmonline.server.webinterface.WebInterfaceImpl.sendMail(WebInterfaceImpl.java:2987)
	at com.wurmonline.server.LoginServerWebConnection.sendMail(LoginServerWebConnection.java:1204)
	at com.wurmonline.server.webinterface.WebInterfaceImpl.sendMail(WebInterfaceImpl.java:2987)
	at com.wurmonline.server.LoginServerWebConnection.sendMail(LoginServerWebConnection.java:1204)
	...
	...
	...
	...
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$79(TCPTransport.java:683)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

 

Does anyone have any insight as to why this might be happening? I don't expect much but being relatively inexperienced in Wurm modding / server management I am honestly lost at this point. I found a similar SQL error in a previous post, in which someone recommended to rebuild the database table in question, but that didn't seem to help at all.

 

Thanks.

Share this post


Link to post
Share on other sites

It's possible that  your servers are confused about which one of them is the login server, or where the mail should go and ends up forwarding it to itself in an infinite loop (until it overflows the stack and throws that exception).

 

Verify that:

  • In local server -> advanced server settings, exactly one server should have "Login server" checked.
  • In Server Neighbours, all servers need to have an entry for the login server and have "Login server" checked for that entry, all other entries must have that box unchecked.
  • Check that all server IDs, IPs, and ports in Server Neighbours match the actual information in Local Server for the other server.

What is in those "...." lines in the log? more repeats of the previous 2 lines?

Share this post


Link to post
Share on other sites

I looked in the database and everything seems to be right... Also you are correct, the ... is a repetition of the previous 2 lines.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this