1. If you have a problem and need help, create a new thread with a title that briefly describes the problem.
    Do not use titles like 'Help!' or 'I have a problem!'
    Dismiss Notice
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Problems with an ENet server host.

Discussion in 'Server Help' started by Znote, May 27, 2012.

  1. Znote

    Znote Shark Slayer

    Messages:
    10
    Hello, I bough this game yesterday and would like to participate to host it.
    So forgive me if I'm a bit noob about this.

    Here is my startup error which crashes/or shuts down the server:

    Code:
    znote@debian:~/kag$ ./KAGdedi
    PID: 1676
    Starting in directory: /home/znote/kag
    Changed directory to: /home/znote/kag/
    Engine (build: 400 version: 0.95A)
     
    Downloading checksums from http://update.kag2d.com/kag_linux/App/version.txt
     
    Downloading http://update.kag2d.com/kag_linux/App/version.txt...
      % Total    % Received % Xferd  Average Speed  Time    Time    Time  Current
                                    Dload  Upload  Total  Spent    Left  Speed
    100 10079  100 10079    0    0  2406      0  0:00:04  0:00:04 --:--:-- 37329
    file Downloads/App/version.txt
    Version file the same (key matches)
     
    Using file 'Base/libJuxta_dedi.so'
    APP GameDLLInit
     
    Game DLL initialized.
    Changing game working directory to '/home/znote/kag/Base/'
    [17:18:40] Config loaded from 'Scripts/dedicated_autoconfig.gm'
    [17:18:40] * Config loaded from 'Scripts/config.gm'
    [17:18:40] Loading security from Base/Scripts/securitysetup.cfg
    [17:18:40] Whitelist inactive.
    [17:18:40] Blacklist empty.
    [17:18:40] Creating video device...
    [17:18:40] Checking driver support...
    [17:18:40] Initializing new video device...
    [17:18:40] Irrlicht Engine version 1.8.0-alpha
    Game version 394
    [17:18:40] Precaching files...
    Precaching files.
    [17:18:40]  ...Precaching files.
    [17:18:40] Loading config defines Scripts/defines.cfg
    [17:18:40] Creating world from file ''
    [17:18:40] Loading names from Scripts/NameGen_OldEnglish.cfg...
    [17:18:40]
    An error occurred while trying to create an ENet server host *********:50213
     
    Saving precached files.
    [17:18:40] Server shutdown.
    [17:18:40] Loading game rules from Rules/CTF/gamemode.cfg...
    [17:18:40] Loaded team 0 'GUI/emblem1.png'
    [17:18:40]  Loaded team 0 class 0 'GUI/builder_icon.png'
    [17:18:40]  Loaded team 0 class 1 'GUI/knight_icon.png'
    [17:18:40]  Loaded team 0 class 2 'GUI/archer_icon.png'
    [17:18:40] Loaded team 1 'GUI/emblem2.png'
    [17:18:40]  Loaded team 1 class 0 'GUI/builder_icon.png'
    [17:18:40]  Loaded team 1 class 1 'GUI/knight_icon.png'
    [17:18:40]  Loaded team 1 class 2 'GUI/archer_icon.png'
    [17:18:40] Loaded CTF default config
    [17:18:40] Config finished loading from Scripts/Server/dedicated_autostart.gm
    THE END
    
    The error is as following:
    An error occurred while trying to create an ENet server host *********:50213
    ********* is my IP, so I am assuming it means I failed to host it? Port 50213 seem to be ported correctly so I don't know what the problem is here.
    Perhaps I am not suppose to write my own IP there, which IP should I add there then? The kag serverListening IP? (And what is this IP?).
    (******* represent my own global IP, don't want it public just yet).
     
  2. MCrypa

    MCrypa Haxor

    Messages:
    562
  3. Znote

    Znote Shark Slayer

    Messages:
    10
    Don't take me wrong, I have searched, and I have found the thread you linked to me earlier. But that answer is wrong. And had me miss leading for hours.

    I solved the problem, and it had nothing to do with running another instance of the server. How could this issue ever occur during my first run of the server anyway?

    The solution to my problems was my network setup, as I suspected. And I had to change my global sv_ip attribute to 0 to make it work.
    global sv_ip = `0`;

    When inserting the value 0, the program will itself try to analyse my interfaces and use the correct local, loopback and perhaps global IP.

    After changing it to this, I was able to run the server, connect to it and make it appear in the server list.

    Anyway, thank you for your feedback. I appreciate your participation in this community MCrypa! :D
     
    MCrypa likes this.
  4. MCrypa

    MCrypa Haxor

    Messages:
    562
    Happy to hear that :)
     
  5. Teemo

    Teemo T͔̕e͖͚̖̯̩̪͙͝e͡m̖o̤̪͘ Forum Moderator Donator Tester

    Messages:
    244
    just fyi if you're running it in a NAT/etc (if you can't directly bind to it) -- you have to bind to your internal IP like 192.168.1.100 and then forward it, not your external IP because your system doesn't know that exists (it's not an iface like eth0 addr that can be bound to)

    you're on debian so `/sbin/ifconfig | grep "inet"` would show what's available to use
     
  6. Znote

    Znote Shark Slayer

    Messages:
    10
    I have solved the problem assuming problem is fixed when server runs online.

    The server is currently online and ready to go on IP znote.eu:50213

    However it tend to crash alot, usually when the game has ended the players get disconnected instead of autostarting next game.

    I have already taken care of the porting part.

    Anyway in hope that configuring it correctly instead of letting it auto-configure might help make the server more stable, here is my results:

    username@debian:~$ /sbin/ifconfig | grep "inet"
    inet addr:10.0.0.205 Bcast:10.0.0.255 Mask:255.255.255.0
    inet6 addr: fe80::250:56ff:fe89:3886/64 Scope:Link
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
     
  7. FliesLikeABrick

    FliesLikeABrick THD Team THD Team Administrator Global Moderator

    Messages:
    952
    The original error happens when you specify an IP address that is not on the server, or the server is already running.

    I suspect you were specifying a public IP address instead of 10.0.0.205. When behind NAT and you want to specify the address, you need to specify the private address, NOT the public one.

    When a machine only has one IP address, you should leave sv_ip blank. sv_ip is only needed when a computer has multiple IP addresses and you want to specify one for use.