1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problem with Restart (Mono / Wine)

Discussion in 'Mono Support' started by Regnak, May 14, 2013.

  1. Regnak
    Offline

    Regnak Active Member

    Joined:
    Apr 1, 2013
    Messages:
    254
    Likes Received:
    43
    Hi there !

    I have a problem with the admin command : Save & Restart (or just Restart).

    When I use Mono directly, for example "sudo mono ServUO.exe", and I try to restart the shard with (or without) a save, it usually crashes at restart. The exact moment is when the World Files are loading.
    Here is the error I get :
    - Invalid handle to path "/opt/servuoTC/[Unknown]"

    I'm a bit lost and can't find a solution. Anything changed on the way to restart the server ? It used to work with RunUO.
    I've tried many things, like using the Core.Kill(true) command ... or Application.Restart() ... or Environment.Exit(-1) ... nothing works. However, I think the new application launches too fast, before the old one could get killed (and free the world files access).
    Well, this is my theory, but I might be wrong.

    About Wine (but I don't use Wine ... it's too slow imho), the server gets restarted, but it says the IP is still in use.

    If anyone can help, I would be grateful. :)

    Thank you !

    -Rek-
     

    Attached Files:

  2. Regnak
    Offline

    Regnak Active Member

    Joined:
    Apr 1, 2013
    Messages:
    254
    Likes Received:
    43
    This was actually easier to fix than I thought ... lol

    No need to modify the code. Just changing how to launch Mono in Linux is enough ;)

    For people who might encounter the same problem :
    - open a terminal
    - go to the ServUO folder
    - launch "mimeopen -d ServUO.exe"
    - choose option number # (depending on your options), which corresponds to Mono Runtime (Terminal)

    Second step :
    - open a terminal
    - go to Edit -> Profile Preferences
    - go to the Title and Commands tab
    - choose the option : "When Command exists : restart the command"

    Fast and simple :)
    (took me a while to find out though)

    To launch ServUO, just open your favourite file browser, go the ServUO folder, and double-click ServUO.exe (yes, Linux is becoming like Windows ... lol)

    -Regnak-
     
  3. Phred
    Offline

    Phred Member

    Joined:
    Jan 13, 2014
    Messages:
    64
    Likes Received:
    4
    Regnak,

    I see this post has been out there for a while, though inquiring minds need to know was this done on Debian or Ubuntu? If it was on Ubuntu what did you end up using to get this to compile? I can get regular runuo to compile, and load up just fine using mono. Any assistance is appreciated!
     
  4. Regnak
    Offline

    Regnak Active Member

    Joined:
    Apr 1, 2013
    Messages:
    254
    Likes Received:
    43
    It was done on Ubuntu.

    To compile ServUO, there is another topic with the exact command.
    But in cas, here it is :
    Code (C#):
    1. mcs -sdk:4.5 -out:ServUO.exe -d:MONO -d:Framework_4_0 -d:ServUO -optimize+ -unsafe -r:System,System.Configuration.Install,System.Data,System.Drawing,System.EnterpriseServices,System.Management,System.Security,System.ServiceProcess,System.Web,System.Web.Services,System.Windows.Forms,System.Xml,OpenUO.Core.dll,OpenUO.Ultima.dll,OpenUO.Ultima.Windows.Forms.dll,SevenZipSharp.dll -nowarn:219 -recurse:Server/*.cs
     
  5. Phred
    Offline

    Phred Member

    Joined:
    Jan 13, 2014
    Messages:
    64
    Likes Received:
    4
    How did you satisfy the sdk:4.5 requirements, and which version of Ubuntu as I am using 12.04 LTS
     
  6. Insanity
    Offline

    Insanity Active Member

    Joined:
    Mar 2, 2013
    Messages:
    276
    Likes Received:
    61
    4.5 isn't required, 4.0 is enough.
     
  7. Phred
    Offline

    Phred Member

    Joined:
    Jan 13, 2014
    Messages:
    64
    Likes Received:
    4
    This is the error I am still receiving, perhaps the compilation line has to much in it?

    [email protected]:/var/servuo$ sudo mcs -sdk:4.0 -out:ServUO.exe -d:MONO -d:Framework_4_0 -d:ServUO -optimize+ -unsafe -r:System,System.Configuration.Install,System.Data,System.Drawing,System.EnterpriseServices,System.Management,System.Security,System.ServiceProcess,System.Web,System.Web.Services,System.Windows.Forms,System.Xml,OpenUO.Core.dll,OpenUO.Ultima.dll,OpenUO.Ultima.Windows.Forms.dll,SevenZipSharp.dll -nowarn:219 -recurse:Server/*.cs
    error CS8026: Invalid sdk version name
    Compilation failed: 1 error(s), 0 warnings
     
  8. Phred
    Offline

    Phred Member

    Joined:
    Jan 13, 2014
    Messages:
    64
    Likes Received:
    4
    I was able to get this to compile after adding the mono repository, however only a few warnings on compiling. However I have updated the datapath to point to /var/uosac and when I execute servuo it doesn't see the necessary files.
     
  9. Regnak
    Offline

    Regnak Active Member

    Joined:
    Apr 1, 2013
    Messages:
    254
    Likes Received:
    43
    Do you have Mono 3.0+ ?


    Sent from my iPhone using Tapatalk
     
  10. Phred
    Offline

    Phred Member

    Joined:
    Jan 13, 2014
    Messages:
    64
    Likes Received:
    4
    Mono JIT compiler version 3.2.1 (Debian 3.2.1+dfsg-1~pre2)
    Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
     
  11. Phred
    Offline

    Phred Member

    Joined:
    Jan 13, 2014
    Messages:
    64
    Likes Received:
    4
    In my opinion the topic is deviating just a little. In the spirit of all things mono and Ubuntu, I will provide a 'clean slate' set of instructions to install ServUO on Ubuntu 12.04 LTS
     
  12. RedDragon
    Offline

    RedDragon Member

    Joined:
    Dec 19, 2013
    Messages:
    34
    Likes Received:
    1
    Hello Lord Regnak.
    There is a way to do this only with the console?
     
  13. Phyxion
    Offline

    Phyxion New Member

    Joined:
    Aug 23, 2014
    Messages:
    1
    Likes Received:
    0
    Did you find any way RedDragon?
     
  14. RedDragon
    Offline

    RedDragon Member

    Joined:
    Dec 19, 2013
    Messages:
    34
    Likes Received:
    1
    Nope, still needing help.
     
  15. RedDragon
    Offline

    RedDragon Member

    Joined:
    Dec 19, 2013
    Messages:
    34
    Likes Received:
    1
    Still needing help,

    There is a way to do this only with the console?

    I really need it.
     
  16. Regnak
    Offline

    Regnak Active Member

    Joined:
    Apr 1, 2013
    Messages:
    254
    Likes Received:
    43
    On my many attempts back in 2013, I wasn't able to fix this issue from the code.
    I guess it requires a core modification, but I didn't find which one.
    If I quite remember, this is the main reason I changed to a Windows Server. ;)

    Although, it should be possible, as with RunUO on Linux, it does restart normally.

    Have you tried with Wine ?

    Sorry I can't help much more than that ...
     
Similar Threads: Problem Restart
Forum Title Date
Script Support Problem adding reward Yesterday at 2:06 PM
Bug Reports Problems with Trophy Dec 4, 2017
Archived Bug Reports customize house problem Dec 2, 2017
General Discussion Problem with statics Nov 23, 2017
Script Support Mount problems Nov 10, 2017
Script Support Two problems Nov 5, 2017
3rd Party Support UOFiddler problems Nov 5, 2017