Page 4 of 4 FirstFirst ... 234
Results 31 to 40 of 40

Thread: [CoD2] Setup CoD2 on your Ubuntu server

  1. #31
    Private
    Join Date
    Mar 2018
    Posts
    36
    Thanks
    8
    Thanked 6 Times in 6 Posts
    Hey guys!
    I got my cod 2 and cod 4 working
    But. CoD 2 works only when CoD 4 is off
    and CoD4 works only if CoD 2 is off
    How can i make two servers working on the same time?

    In CoD 4 cfg I've changed the port on 28777 and it did not help :/
    any solution?


    EDIT:

    Ok, +set net_port 28777 did the job
    Last edited by rgl12; 10th March 2018 at 19:32.

  2. #32
    Private Mariusz's Avatar
    Join Date
    Sep 2017
    Posts
    67
    Thanks
    8
    Thanked 43 Times in 43 Posts
    I am proud of you. Congratulations! Do you invite us on your servers soon, don't you?

  3. #33
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quick update for ubuntu 16.04 and the current libcod version (which doesnt require the gcc-multilib thing anymore):

    PHP Code:
    dpkg --add-architecture i386
    apt
    -get update
    apt
    -get install libstdc++5:i386 libstdc++6:i386 libmysqlclient-dev:i386 g++-multilib git
    git 
    clone https://github.com/voron00/libcod
    cd libcod
    ./doit.sh cod2_1_3 
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  4. #34
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    Somehow I only can start the server on localhost, but I would like to make the server available for everyone.

    When I run the server.sh, console tells me:
    PHP Code:
    Opening IP socketlocalhost:28960 
    I tried to set dedicate to 2, so that the server is for everyone available.
    Now the console this
    PHP Code:
    dedicated is read only
    I am not sure if it's an error or warning, but it's still running on localhost.

    This is my server.sh (which is inside my CoD2 folder):
    PHP Code:
    #!/bin/bash

    cod="/home/CoD2/cod2_lnxded_1_3"

    $cod +set dedicated 2 +set fs_game "loveboy" +set com_hunkMegs "256" +set sv_maxclients "16" +exec server.cfg +set g_gametype hq +map_rotate 
    I also tried to set the net_ip with my real IPv4 address
    PHP Code:
    $cod +set dedicated 2 +set fs_game "loveboy" +set com_hunkMegs "256" +set sv_maxclients "16" +set net_ip "12.34.56.78" +exec server.cfg +set g_gametype hq +map_rotate 
    but the server crashes.

    The error:
    PHP Code:
    Opening IP socket12.34.56.78:28960
    ERROR
    UPD_OpenSocketbindCannot assign requested
    Opening IP socket
    12.34.56.78:28961
    ERROR
    UPD_OpenSocketbindCannot assign requested
    Opening IP socket
    12.34.56.78:28962
    ERROR
    UPD_OpenSocketbindCannot assign requested

    ... till :28969

    Sys_Error
    Error during initialization:
    Couldn't allocate IP port 
    I also tried to open port in my firewall
    PHP Code:
    iptables -A INPUT -p udp -d 12.34.56.78 --dport 28960 -m state --state NEW -j ACCEPT 
    and tried to check it with
    PHP Code:
    iptables -
    and found my new entry (successful), but still same errors.
    My opened port disappears when I restart ubuntu.


    Does anyone maybe know what to do?

  5. #35
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,083 Times in 753 Posts
    There are 2 pages of google with the same problem, maybe try some: https://www.google.de/search?q=%22ER...n+requested%22

    Quick skip for solutions over it was from "put net_ip in .cfg" to "reinstall game" lol

    Also show your server.cfg

    Also try allow all traffic: https://superuser.com/questions/6344...coming-traffic

    Or start as root for a test
    timescale 0.01

  6. #36
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    I tried to allow all traffics with:
    PHP Code:
    iptables -P INPUT ACCEPT 
    I looked up which ports are in use, and when I start server, this will be list up:
    PHP Code:
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
    ...
    udp     1408      0 0.0.0.0:28960           0.0.0.0:*                           3345/cod2_lnxded_1_ 
    ... 
    It disappears when server is offline.

    The net_ip was already set in my server.cfg.
    This is my server.cfg:
    PHP Code:
    set sv_wwwDownload 1
    seta sv_wwwBaseURL 
    ""
    set sv_wwwDlDisconnected 0
    set sv_reconnectlimit 3
    set sv_pure 1
    set sv_allowDownload 0

    sv_hostname 
    "Testserver"
    set scr_motd "123456"

    sets _Admin ""
    sets _Email ""
    sets _IRC ""
    sets _Website ""
    sets _Location ""

    set sv_pam "1"
    set pam_mode "cb"


    set sv_pure "1"
    set net_ip "12.34.56.78" //Replaced with my real IPv4 address
    set net_port "28960"
    set sv_maxclients "16"
    set sv_privateClients ""
    set sv_maxRate "25000"
    set sv_minPing "0"
    set sv_maxPing "250"
    set g_antilag "0"
    set scr_friendlyfire "0"
    set scr_killcam "1"
    set scr_spectatefree "1"
    set scr_spectateenemy "1"
    set logfile "1"
    set g_logsync "1"
    set g_log "games_mp.log"
    set scr_teambalance "1"
    set sv_cheats "1"
    set sv_floodprotect "1"
    set sv_fps "20"
    set g_deadChat "1"
    set sv_disableClientConsole "0"
    set g_allowvote "0"
    set sv_voice "0"
    set sv_voiceQuality ""
    set scr_drawfriend "1"


    seta sv_gamespy "1"
    seta sv_master1 "cod2master.activision.com"
    seta sv_master2 "cod2update.activision.com"
    seta sv_master3 "master0.gamespy.com"
    seta sv_master4 "master1.gamespy.com"



    set scr_allow_springfield "1"
    set scr_allow_svt40 "1"
    set scr_allow_kar98ksniper "1"
    set scr_allow_nagantsniper "1"
    set scr_allow_enfieldsniper "1"
    set scr_allow_enfield "1"
    set scr_allow_kar98k "1"
    set scr_allow_m1carbine "1"
    set scr_allow_m1garand "1"
    set scr_allow_g43 "1"
    set scr_allow_nagant "1"
    set scr_allow_bar "1"
    set scr_allow_bren "1"
    set scr_allow_mp44 "1"
    set scr_allow_ppsh "1"
    set scr_allow_mp40 "1"
    set scr_allow_sten "1"
    set scr_allow_thompson "1"
    set scr_allow_pps42 ""
    set scr_allow_greasegun ""
    set scr_allow_shotgun "1"
    set scr_allow_smokegrenades "0"
    set scr_allow_fraggrenades "1"

    set scr_allow_drop_weapons "0"
    set scr_allow_drop_grenades "0"



    set scr_dm_scorelimit "50" 
    set scr_dm_timelimit "30" 
    set scr_tdm_scorelimit "300"
    set scr_tdm_timelimit "30.5"
    set scr_sd_graceperiod "15"
    set scr_sd_roundlength "4"
    set scr_sd_roundlimit "7"
    set scr_sd_scorelimit ""
    set scr_sd_timelimit "20"
    set scr_sd_bombtimer "45"
    set scr_ctf_scorelimit "7"
    set scr_ctf_timelimit "20"
    set scr_hq_scorelimit "50"
    set scr_hq_timelimit "30"

    set scr_map_vote 1 
    set scr_map_vote_time 15
    set scr_map_vote_replay 1


    set sv_mapRotation 
    "gametype hq map mp_toujane"

    set sv_maprotationcurrent ""

    map_rotate 


    Edit: [SOLVED]

    net_ip 0.0.0.0 fixed my problem.
    Last edited by Loveboy; 11th June 2018 at 18:57.

  7. #37
    ... connecting
    Join Date
    Dec 2020
    Posts
    1
    Thanks
    0
    Thanked 1 Time in 1 Post
    Code:
    ubuntu@ip-xxx-xx-0-202:~/cod2$ ./cod2_lnxded_1_3_cracked +exec dedicated.cfg
    CoD2 MP 1.3 build linux-i386 Jun 23 2006
    ----- FS_Startup -----
    Current language: english
    Current search path:
    /home/ubuntu/.callofduty2/main
    /home/ubuntu/cod2/main/zPAM207.iwd (183 files)
    /home/ubuntu/cod2/main/T04.iwd (998 files)
    /home/ubuntu/cod2/main/P01.iwd (283 files)
    /home/ubuntu/cod2/main/iw_15.iwd (85 files)
    /home/ubuntu/cod2/main/iw_14.iwd (4038 files)
    /home/ubuntu/cod2/main/iw_13.iwd (22624 files)
    /home/ubuntu/cod2/main/iw_12.iwd (1016 files)
    /home/ubuntu/cod2/main/iw_11.iwd (1462 files)
    /home/ubuntu/cod2/main/iw_10.iwd (1936 files)
    /home/ubuntu/cod2/main/iw_09.iwd (2142 files)
    /home/ubuntu/cod2/main/iw_08.iwd (2723 files)
    /home/ubuntu/cod2/main/iw_07.iwd (3384 files)
    /home/ubuntu/cod2/main/iw_06.iwd (990 files)
    /home/ubuntu/cod2/main/iw_05.iwd (928 files)
    /home/ubuntu/cod2/main/iw_04.iwd (698 files)
    /home/ubuntu/cod2/main/iw_03.iwd (26 files)
    /home/ubuntu/cod2/main/iw_02.iwd (40 files)
    /home/ubuntu/cod2/main/iw_01.iwd (16 files)
    /home/ubuntu/cod2/main/iw_00.iwd (102 files)
    /home/ubuntu/cod2/main/91420.iwd (211 files)
    /home/ubuntu/cod2/main/91020c.iwd (413 files)
    /home/ubuntu/cod2/main/111120.iwd (483 files)
    /home/ubuntu/cod2/main/102520b.iwd (158 files)
    /home/ubuntu/cod2/main
    /home/ubuntu/.callofduty2/raw
    /home/ubuntu/.callofduty2/raw_shared
    /home/ubuntu/.callofduty2/devraw
    /home/ubuntu/.callofduty2/devraw_shared
    /home/ubuntu/cod2/raw
    /home/ubuntu/cod2/raw_shared
    /home/ubuntu/cod2/devraw
    /home/ubuntu/cod2/devraw_shared
    /home/ubuntu/cod2/main/localized_english_iw11.iwd (1 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw10.iwd (414 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw09.iwd (98 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw08.iwd (8 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw07.iwd (1014 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw06.iwd (xx10 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw05.iwd (5xx0 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw04.iwd (6240 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw03.iwd (6580 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw02.iwd (6404 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw01.iwd (5510 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw00.iwd (4764 files)
        localized assets iwd file for english
    
    
    File Handles:
    ----------------------
    84392 files in iwd files
    execing default_mp.cfg
    couldn't exec language.cfg
    execing config_mp_server.cfg
    Opening IP socket: localhost:28960
    Hostname: ip-xxx-xx-0-202.us-east-2.compute.internal
    IP: xxx.xx.0.202
    --- Common Initialization Complete ---
    execing dedicated.cfg
    net_ip is write protected.
    net_port is write protected.
    dedicated is read only.
    map_rotate...
    
    "sv_mapRotation" is:"map mp_carentan"
    
    "sv_mapRotationCurrent" is:""
    
    Setting map: mp_carentan.
    g_gametype random is not a valid gametype, defaulting to dm
    ------ Server Initialization ------
    Server: mp_carentan
    ----- FS_Startup -----
    Current language: english
    Current search path:
    /home/ubuntu/.callofduty2/main
    /home/ubuntu/cod2/main/zPAM207.iwd (183 files)
    /home/ubuntu/cod2/main/T04.iwd (998 files)
    /home/ubuntu/cod2/main/P01.iwd (283 files)
    /home/ubuntu/cod2/main/iw_15.iwd (85 files)
    /home/ubuntu/cod2/main/iw_14.iwd (4038 files)
    /home/ubuntu/cod2/main/iw_13.iwd (22624 files)
    /home/ubuntu/cod2/main/iw_12.iwd (1016 files)
    /home/ubuntu/cod2/main/iw_11.iwd (1462 files)
    /home/ubuntu/cod2/main/iw_10.iwd (1936 files)
    /home/ubuntu/cod2/main/iw_09.iwd (2142 files)
    /home/ubuntu/cod2/main/iw_08.iwd (2723 files)
    /home/ubuntu/cod2/main/iw_07.iwd (3384 files)
    /home/ubuntu/cod2/main/iw_06.iwd (990 files)
    /home/ubuntu/cod2/main/iw_05.iwd (928 files)
    /home/ubuntu/cod2/main/iw_04.iwd (698 files)
    /home/ubuntu/cod2/main/iw_03.iwd (26 files)
    /home/ubuntu/cod2/main/iw_02.iwd (40 files)
    /home/ubuntu/cod2/main/iw_01.iwd (16 files)
    /home/ubuntu/cod2/main/iw_00.iwd (102 files)
    /home/ubuntu/cod2/main/91420.iwd (211 files)
    /home/ubuntu/cod2/main/91020c.iwd (413 files)
    /home/ubuntu/cod2/main/111120.iwd (483 files)
    /home/ubuntu/cod2/main/102520b.iwd (158 files)
    /home/ubuntu/cod2/main
    /home/ubuntu/.callofduty2/raw
    /home/ubuntu/.callofduty2/raw_shared
    /home/ubuntu/.callofduty2/devraw
    /home/ubuntu/.callofduty2/devraw_shared
    /home/ubuntu/cod2/raw
    /home/ubuntu/cod2/raw_shared
    /home/ubuntu/cod2/devraw
    /home/ubuntu/cod2/devraw_shared
    /home/ubuntu/cod2/main/localized_english_iw11.iwd (1 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw10.iwd (414 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw09.iwd (98 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw08.iwd (8 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw07.iwd (1014 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw06.iwd (xx10 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw05.iwd (5xx0 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw04.iwd (6240 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw03.iwd (6580 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw02.iwd (6404 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw01.iwd (5510 files)
        localized assets iwd file for english
    /home/ubuntu/cod2/main/localized_english_iw00.iwd (4764 files)
        localized assets iwd file for english
    
    File Handles:
    ----------------------
    84392 files in iwd files
    ERROR: Sound alias file mp_commando_sound.csv: Unknown sound channel 'streamed'; should be auto, auto2d, menu, weapon, voice, item, body, local, music, announcer or shellshock
    WARNING: sound file 'doors/door_bunker_close.wav' used as streamed in alias 'mp_v2_bunkerdoorclose' and loaded in alias 'fermportebomb'
    WARNING: sound file 'fire/Fire_med_loop02.wav' used as streamed in alias 'fire1' and loaded in alias 'medfire'
    ------- Game Initialization -------
    gamename: Call of Duty 2
    gamedate: Jun 23 2006
    -----------------------------------
    logfile opened on Sun Dec  6 01:03:22 2020
    
    -----------------------------------
    Hitch warning: 2968 msec frame time
    Resolving cod2master.fucker    .com
    Couldn't resolve address: cod2master.fucker    .com
    I'm trying to make it work for hours. I have no idea and i can't see any error message :/ I can't connect to server with ip and address like : /connect xxx.xx.0.202:28960;password xxxxxx It's keep trying forever.


    Edit : I solved it. IP was wrong omg sorry for bother
    Last edited by kambocian; 6th December 2020 at 01:31.

  8. The Following User Says Thank You to kambocian For This Useful Post:

    kung foo man (6th December 2020)

  9. #38
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Thread editted to reflect that this method works on basically any ubuntu version
    - 12.04 untested
    - 14.04 thoroughly tested (10+ servers running for multiple years)
    - 16.04 tested
    - 18.04 thoroughly tested (10+ servers running for multiple years)
    - 20.04 tested

    Barring any major changes in the architecture (dropping 32 bit support for example), this tutorial should work on future versions as well.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  10. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (28th January 2021)

  11. #39
    ... connecting
    Join Date
    Jan 2021
    Posts
    2
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hello!

    Ill have a problem with dependencies:

    apt-get -y install libmysqlclient-dev:i386Package libmysqlclient-dev:i386 is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    However the following packages replace it:
    libmariadb-dev-compatpc64el libmariadb-devpc64el libmariadb-dev-compat
    libmariadb-dev libmariadb-dev-compat:arm64 libmariadb-dev:arm64
    libmariadb-dev:i386 libmariadb-dev-compat:i386
    apt install libmariadb-dev-compat:i386

    gives this:

    The following packages have unmet dependencies:
    libmariadb-dev:i386 : Depends: libmariadb3:i386 (= 1:10.5.12-0+deb11u1) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages. Im on Debian 11 (amd64)

    Whatever. I compiled anyway, The real problem is with running the script.

    Created startcod2.sh
    With this lines in it:

    ################################################## ##################################
    #!/bin/bash

    sv_maxclients="32"
    fs_game="main"
    fs_homepath="/home/somedirectoryname/cod2"
    cod="/home/somedirectoryname/cod2/libcod2_1_3.so"
    config="cod2server.cfg"
    cracked="1"
    net_port="28961"


    args=\
    "+set fs_homepath "$fs_homepath" "\
    "+set sv_cracked $cracked "\
    "+set fs_game $fs_game "\
    "+set net_port $net_port "\
    "+set sv_maxclients $sv_maxclients "\
    "+set fs_basepath "$fs_homepath" "\
    "+exec $config"

    LD_PRELOAD="/home/somedirectoryname/cod2/libcod2_1_3.so" $cod $args +set g_gametype tdm +map mp_leningrad
    ################################################## ##################################



    I get this errors:

    bash startcod2.sh
    startcod2.sh: line 21: 47857 Segmentation fault LD_PRELOAD="/home/somedirectoryname/cod2/libcod2_1_3.so" $cod $args +set g_gametype tdm +map mp_leningrad


    Any idea?
    Last edited by Rohambili; 3rd December 2021 at 18:55.

  12. The Following User Says Thank You to Rohambili For This Useful Post:

    kung foo man (12th December 2021)

  13. #40
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Works fine for me on a fresh Debian 11 amd64 install, substituting the libmysqlclient-dev:i386 with libmariadb-dev-compat:i386.

    Literally all commands until cod2 server got started:

    Code:
    sudo dpkg --add-architecture i386
    sudo apt update
    sudo apt -y install libstdc++5:i386
    sudo apt -y install gcc-multilib
    sudo apt -y install libmariadb-dev-compat:i386
    sudo apt -y install g++-multilib
    sudo apt -y install git
    git clone https://github.com/voron00/libcod
    cd libcod
    ./doit.sh cod2_1_3
    cd ..
    nano run.sh
    chmod 700 run.sh
    cd cod
    chmod 700 cod2_lnxded_1_3
    cd ..
    ./run.sh
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  14. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (12th December 2021)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •