Go Back   RunUO - Ultima Online Emulation > RunUO > Server Support on Mono

Server Support on Mono Forum dedicated to RunUO 2.0 on Mono.

Reply
 
Thread Tools Display Modes
Old 08-06-2008, 09:50 AM   #1 (permalink)
Newbie
 
Join Date: Feb 2008
Location: Finland
Posts: 49
Send a message via MSN to Saumane
Default Errors and a crash

Sometimes i get this error/warning/what ever it is:
Code:
System.Net.Sockets.SocketException: The socket is not connected
  at System.Net.Sockets.Socket.Shutdown (SocketShutdown how) [0x00000] 
  at Server.Network.NetState.Dispose (Boolean flush) [0x00000]
(Usually when a client disconnects)

And sometimes my server crashes, and the error is "Too many open files"(i will give more specific error report when the shard crashes next time), and when i restart my server, half of the folders inside the saves folder has been deleted.

Any fixes?
__________________
aim: Saumato
Saumane is offline   Reply With Quote
Old 08-08-2008, 03:06 AM   #2 (permalink)
Forum Expert
 
ClanCC's Avatar
 
Join Date: Dec 2002
Location: The Darkness
Posts: 421
Default

Quote:
Originally Posted by Saumane View Post
Sometimes i get this error/warning/what ever it is:
Code:
System.Net.Sockets.SocketException: The socket is not connected
  at System.Net.Sockets.Socket.Shutdown (SocketShutdown how) [0x00000] 
  at Server.Network.NetState.Dispose (Boolean flush) [0x00000]
(Usually when a client disconnects)
Did you edit ServerList.cs?

If you did, did you changed the public static readonly string Address?

I got that error before, when i changed public static readonly string Address.

Also, which RunUO are you using? SVN or official release?
__________________
ClanCC was missing D:
One Vision, One Purpose, Peace Through Power!

Last edited by ClanCC; 08-08-2008 at 03:09 AM.
ClanCC is offline   Reply With Quote
Old 08-08-2008, 08:23 AM   #3 (permalink)
Newbie
 
Join Date: Feb 2008
Location: Finland
Posts: 49
Send a message via MSN to Saumane
Default

I have not edited the public static readonly string Address.
I'm using RUO2 SVN.
__________________
aim: Saumato
Saumane is offline   Reply With Quote
Old 08-09-2008, 04:33 AM   #4 (permalink)
Forum Expert
 
ClanCC's Avatar
 
Join Date: Dec 2002
Location: The Darkness
Posts: 421
Default

Quote:
Originally Posted by Saumane View Post
I have not edited the public static readonly string Address.
I'm using RUO2 SVN.
hm, did u do any modifications to any scripts or added any scripts?
__________________
ClanCC was missing D:
One Vision, One Purpose, Peace Through Power!
ClanCC is offline   Reply With Quote
Old 08-10-2008, 07:09 PM   #5 (permalink)
Newbie
 
Join Date: Feb 2008
Location: Finland
Posts: 49
Send a message via MSN to Saumane
Default

Code:
Login: **.***.***.**: Valid credentials for '*****'
System.Net.Sockets.SocketException: Too many open files
  at System.Net.Sockets.Socket..ctor (AddressFamily family, SocketType type, ProtocolType proto) [0x00000] 
  at Server.Network.SocketPool.AcquireSocket () [0x00000] 
  at Server.Network.Listener.OnAccept (IAsyncResult asyncResult) [0x00000] 
Client: **.***.***.**: Disconnected. [11 Online] [*****]
Core: Using dual save strategy
World: Saving...Error:
Error:
SysSystem.IO.IOExcetem.IO.IOExcepption: tion: Too many openTo files
  at System.IO.FileStream..ctor (So many open files
  at System.ystem.IO.FileStream..ctor (System.StrString naming ne, FileMoame, d
e mode, FiFileMode mode, FileAcleAccess accceesss as, FileShare shacrce, Iess, 
FileShare nsth3a2r buffee,rSize, B oIoleannt3 2 buffanonymous, FileeOrSize, Booleapn tanonymions optoiuons) [0x00000]s ,
  F iat System.IO.FlielOepStitream..ctoonrs options) [0x00000] 
  at System.IO.FileStream..ctor (System.String name, FileMode mode, FileAccess access, FileShare share) [0x00000] 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at Server.BinaryFileWriter..ctor (System.String filename, Boolean prefixStr) [0x00000] 
  at Server.StandardSaveStrategy.SaveMobiles (Server.SaveMetrics metrics) [0x00000] 
  at Server.DualSaveStrategy.Save (Server.SaveMetrics metrics) [0x00000] 
  at Server.World.Save (Boolean message) [0x00000] 
  at Server.World.Save () [0x00000] 
  at Server.Misc.AutoSave.Save (System.String name, FileMode mode, FileAccess access, FileShare share) [0x00000] 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at Ser () [0x00000] 
  at Server.Misc.AutoSave.OnTick () [0x00000] 
  at Server.Timer.Slice () [0x00000] 
  at Server.Core.Main (System.String[] args) [0x00000]ver.BinaryFileWriter..ctor (System.String filename, Bool 
ean prefixStr) [0x00000] 
  at Server.StandardSaveStrategy.SaveItems (Server.SaveMetrics metrics) [0x00000] 
  at Server.DualSaveStrategy+<>c__CompilerGenerated2.<Save>c__7 () [0x00000] 
  at (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()
Crash: Backing up...Crash: Backing up...donedonedone

Crash: Generating report...Craffaileds
h: Generating report...Crash: Restarting...failed
Crash: Restarting...donedonedone
There's the crash.

Yes, i've added some scripts and done some minor distro modifications but none of them should make this kind of crash.. :S
Before this crash happens, a player, or some players, gets disconnected from the game, and can't re-connect. When the next save comes, the server crashes.
__________________
aim: Saumato

Last edited by Saumane; 08-11-2008 at 03:15 AM.
Saumane is offline   Reply With Quote
Old 08-16-2008, 07:49 AM   #6 (permalink)
Newbie
 
Join Date: Feb 2008
Location: Finland
Posts: 49
Send a message via MSN to Saumane
Default

I just found out, that
Code:
System.Net.Sockets.SocketException: The socket is not connected
  at System.Net.Sockets.Socket.Shutdown (SocketShutdown how) [0x00000] 
  at Server.Network.NetState.Dispose (Boolean flush) [0x00000]
comes when someone's client crashes. Is there anything i can do to remove this network error?
__________________
aim: Saumato
Saumane is offline   Reply With Quote
Old 08-16-2008, 12:17 PM   #7 (permalink)
Forum Novice
 
Join Date: Dec 2005
Posts: 608
Default

Does any of your custom scripts use any I/O operations?
__________________
Add your scripts!
Script Library for custom RunUO scripts >> sunny-productions.eu
b0b01 is offline   Reply With Quote
Old 09-03-2008, 09:36 AM   #8 (permalink)
Lurker
 
Join Date: Oct 2002
Posts: 10
Default

I have the same problem running with mono 1.9.1 on gentoo.
Yes, a few custom scripts, e.g. a welcome gump, use IO-operations like SQL connections.

Anything to look out for?

Or even a solution?
Lord_Helmchen is offline   Reply With Quote
Old 10-26-2008, 07:01 AM   #9 (permalink)
Newbie
 
Join Date: Jan 2006
Posts: 39
Default

*push*

i've the same problem
__________________
Switzerland ftw :)
son!c is offline   Reply With Quote
Old 10-27-2008, 02:50 PM   #10 (permalink)
Newbie
 
Thadeus's Avatar
 
Join Date: Jul 2006
Location: Tampa, FL
Age: 26
Posts: 60
Send a message via AIM to Thadeus
Default

I have the same errors when the client crashes or is killed.
I have not, yet, experienced the runuo crash as I am currently the only user.

This is a fresh compile of revision 300 on mono 1.9.1 with literally nothing added other than my own account.
__________________
"It is one of the essential features of such incompetence that the person so afflicted is incapable of knowing that he is incompetent...
..To have such knowledge would already be to remedy a good portion of the offense. ( Miller, 1993 , p. 4)
Thadeus is online now   Reply With Quote
Old 10-28-2008, 02:22 PM   #11 (permalink)
Newbie
 
Join Date: Sep 2002
Posts: 74
Send a message via ICQ to Arek Send a message via AIM to Arek Send a message via Yahoo to Arek
Default

Regarding the socket error:
It looks to me like the problem is that the when a client disconnects uncleanly (i.e. crashes or is killed), the socket is already disconnected when the server finds out about the crash. The server then tries to disconnect the socket, and fails because the socket is already disconnected. The patch attached to this message should fix this by making sure the socket is still connected before trying to disconnect it.

Please note that while I have compiled and run a RunUO 2.0 server with this patch applied on mono 1.9.1, I have not had a chance to connect to the server as of yet. This means that the patch is basically untested, other than the fact that it compiles. Also note that since I haven't tested crashing a client with or without the patch applied, it may not even fix the problem.

If one of you folks wants to be brave and see if this patch fixes the problem for you, then please do. Once I get my server configured a bit better, I'll test it more fully myself.

To apply the patch, simply unzip the attached file in the root of your runuo installation and run the following command (as the user you normally use to run RunUO):
patch -p0 < runuo-300-mono-191-netstate.patch
Then just rebuild runuo.exe and run it as usual.

One last thing to be aware of: This is a core modification, with all the potential problems associated with it. If you choose to use it, you do so at your own risk. I take no responsibility if it completely borks your computer, your shard, or whatever.

-----------------------

Now, on to the Too many open files error (assuming custom scripts are involved in this one):
I don't know myself how to fix this, since I don't know what all scripts and/or core mods are involved, and even then, I may not really be experienced enough with C# or the scripts in question to find or fix the error.

To fix this error you need to go through all of your custom scripts and core modifications and make sure that any files/sockets they use are getting closed properly when the script is done with them, even if an exception occurs while the file/socket is open (use try/catch to deal with this). If you find that your scripts are closing files properly when they're through with them, then the scripts may simply be opening too many files/sockets at once and causing your system to run out of available files/sockets (I think there's a way to increase the number of available sockets on a linux system, but I don't remember what it is offhand).

Hope this helps some folks.

--Arek
Attached Files
File Type: zip runuo-300-mono-191-netstate.zip (411 Bytes, 8 views)

Last edited by Arek; 10-28-2008 at 02:25 PM.
Arek is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5