Issues with Linux Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • the_c

    #1

    Issues with Linux Server

    Hi,

    I am new to the BF2 scene, well the BF scene in general actually - but i know a fair bit about Linux so some friends who are a lot more intrenched in the BF2 scene have asked me to create a dedicated Linux server.

    Well I though it was going to be easy but it seems i was wrong. I have downloaded the server, run the installer, agreed to give away my first born child, selected the directory to install to and then started the server, moved about 3 feet to my right and started the client, which "sees" the game when selecting the "local" type of multiplayer game, and tried to join the game - but i aways get an error on the client says something to the effect of "you have a network problem" - however i connect fine on the very same client to games on the internet there are no firewalls between the servers and no firewall/iptables trickery on the Linux server.

    Now - running "lsof -i | grep bf2_f" gives me the list of process running the binary "bf2_f" and the IP address/ports they are on - the following is my output from this command.

    bf2_f 3870 bf2gm 3u IPv4 37976 UDP *:29900
    bf2_f 3870 bf2gm 6u IPv4 37977 UDP *:32795
    bf2_f 3870 bf2gm 7u IPv4 37980 UDP *:16567
    bf2_f 3870 bf2gm 8u IPv4 37979 TCP *:4711 (LISTEN)
    bf2_f 3870 bf2gm 12u IPv4 39772 UDP *:55124
    bf2_f 3870 bf2gm 13u IPv4 39773 UDP *:55125

    Now it seems to me that the only post actually listening for is the remote console port - which works and i can test by running "telnet localhost 4711" and i get the Remote console nicities. However when I try to telnet to 16567 by running "telnet localhost 16567" i get connection refused - and this is what i think clients are getting and are timing out - hence the "network error" message. It seems to me the game server is sending out messages (which the client detects as the server appears in the "local" browser) but is not actually listening for game connections.

    Any help would be gratefully accepted.

    I am running Fedora Core 4

    thanks
    c
  • preem

    #2
    Re: Issues with Linux Server

    hm dont know if it's going to help but its worth trying:

    did you make this line in your serversettings.con

    sv.internet 1

    it enables your server to receives connections from the internet or put 0 there if you want it to be just on the lan.

    Comment

    • Munson

      #3
      Re: Issues with Linux Server

      as mentioned above the sv.internet flag.

      also you need to set the interface IP's and open the proper ports in your firewall if you have one.


      post a copy of your serversettings.con file her eomitting passwords and sencitive data. Lets have a look under the hood.



      Munson

      Comment

      • the_c

        #4
        Re: Issues with Linux Server

        I haven't done anything to this file - i thought, at least for testing, that the defaults would be fine.

        cat serversettings.con

        sv.serverName "Default Server Name"
        sv.password ""
        sv.internet 0
        sv.bandwidthChoke 0
        sv.serverIP ""
        sv.serverPort 16567
        sv.welcomeMessage ""
        sv.punkBuster 0
        sv.allowFreeCam 0
        sv.allowExternalViews 1
        sv.allowNoseCam 1
        sv.hitIndicator 1
        sv.maxPlayers 64
        sv.numPlayersNeededToStart 2
        sv.notEnoughPlayersRestartDelay 15
        sv.startDelay 15
        sv.endDelay 15
        sv.spawnTime 15
        sv.manDownTime 15
        sv.endOfRoundDelay 15
        sv.ticketRatio 100
        sv.roundsPerMap 3
        sv.timeLimit 0
        sv.scoreLimit 0
        sv.soldierFriendlyFire 100
        sv.vehicleFriendlyFire 100
        sv.soldierSplashFriendlyFire 100
        sv.vehicleSplashFriendlyFire 100
        sv.tkPunishEnabled 1
        sv.tkNumPunishToKick 3
        sv.tkPunishByDefault 0
        sv.votingEnabled 1
        sv.voteTime 90
        sv.minPlayersForVoting 2
        sv.gameSpyPort 29900
        sv.allowNATNegotiation 0
        sv.interfaceIP ""
        sv.autoRecord 0
        sv.demoIndexURL http://
        sv.demoDownloadURL http://
        sv.autoDemoHook "adminutils/demo/rotate_demo.py"
        sv.demoQuality 1
        sv.adminScript "default"
        sv.timeBeforeRestartMap 30
        sv.autoBalanceTeam 0
        sv.teamRatioPercent 100
        sv.voipEnabled 1
        sv.voipQuality 3
        sv.voipServerRemote 0
        sv.voipServerRemoteIP ""
        sv.voipServerPort 55125
        sv.voipBFClientPort 55123
        sv.voipBFServerPort 55124
        sv.voipSharedPassword ""
        sv.useGlobalRank 1
        sv.useGlobalUnlocks 1
        sv.sponsorText ""
        sv.sponsorLogoURL ""
        sv.communityLogoURL ""
        sv.radioSpamInterval 6
        sv.radioMaxSpamFlagCount 6
        sv.radioBlockedDurationTime 30


        c

        Comment

        • Munson

          #5
          Re: Issues with Linux Server

          sv.internet 0 <-----this means DO NOT USE INTERNET

          change to:

          sv.internet 1


          That should allow internet traffic.


          Next.

          sv.serverIP ""

          Add your EXTERNAL IP HERE, unless your natting or using forwarding then do not populate it.



          Next.


          sv.interfaceIP ""


          Do the same thing here, add IP if it's frontline or DMZ'd and if it's Nat'd do not.



          That should get you all fix'd up mate. Let us know how it goes!


          Next will be your maplist.con, but we'll get you running 1st.

          Munson

          Comment

          • the_c

            #6
            Re: Issues with Linux Server

            In the first instance I just want to run this on the LAN, do i need to set "sv.internet" to "1" to do this?

            Even so, doing this in isolation didn't make any difference.

            I tried to set both "sv.serverIP" and "sv.interfaceIP" to the machines IP address - but still no joy ... it is really starting to annoy me ...

            but thanks for the help

            c

            Comment

            • Munson

              #7
              Re: Issues with Linux Server

              for LAN you set sv.internet to 0

              for internet sv.internet gets a 1


              is it crashing? your on the 1.02 version of the dedicated server right?



              Munson

              Comment

              • the_c

                #8
                Re: Issues with Linux Server

                No, not crashing, just sitting there. Clients cannot connect - getting "a problem with you network connection" but you can see the game in the "join local" browser, the same clients join internet games fine. The Server screen looks like this ...

                Battlefield II Dedicated Server v1.0.2446.12(IA-32)
                "Default Server Name" Average FPS: 34 [d:0, o:23]
                IP: 192.168.0.12 Port: 16567 (LAN) Map: gulf_of_oman
                Game mode: gpm_cq/32 Mod: bf2
                Players: 0/64 (0 connecting) Round: 1/3 Status: [playing]
                -------------------------------------------------------------------------------

                and i never even see anyone attempting to connect ...

                thanks for you continued attempts to help

                c

                Comment

                • Munson

                  #9
                  Re: Issues with Linux Server

                  IPTABLES?


                  Flavor of Linux?


                  did you install as a BF2 user or a NON-ROOT user? if you installed as ROOT, it will do exactly as you describe.



                  Munson

                  Comment

                  • the_c

                    #10
                    Re: Issues with Linux Server

                    No iptables

                    Fedora Core 4

                    but i think i have been installing it as root i am trying to test that now ...
                    i have installed it this time as bf2gm, but still get the same error on clients ....

                    "You have failed to connect. Check you network connection(s) and try again"

                    c

                    Comment

                    • Munson

                      #11
                      Re: Issues with Linux Server

                      run a "netstat -a" with the server running.

                      post a copy/paste here....that'll show what's actually listening.



                      Munson

                      Comment

                      • the_c

                        #12
                        Re: Issues with Linux Server

                        netstat -a output:

                        Proto Recv-Q Send-Q Local Address Foreign Address State
                        tcp 0 0 *:32769 *:* LISTEN
                        tcp 0 0 *:4711 *:* LISTEN
                        tcp 0 0 *:netbios-ssn *:* LISTEN
                        tcp 0 0 *:sunrpc *:* LISTEN
                        tcp 0 0 *:x11 *:* LISTEN
                        tcp 0 0 *:ftp *:* LISTEN
                        tcp 0 0 *:bpcd *:* LISTEN
                        tcp 0 0 localhost.localdomain:ipp *:* LISTEN
                        tcp 0 0 *:vopied *:* LISTEN
                        tcp 0 0 localhost.localdomain:5335 *:* LISTEN
                        tcp 0 0 localhost.localdomain:smtp *:* LISTEN
                        tcp 0 0 *:bpjava-msvc *:* LISTEN
                        tcp 0 0 *:vnetd *:* LISTEN
                        tcp 0 0 *:microsoft-ds *:* LISTEN
                        tcp 1 0 localhost.localdomain:45484 localhost.localdomain:ipp CLOSE_WAIT
                        tcp 0 0 *:x11 *:* LISTEN
                        tcp 0 0 *:ssh *:* LISTEN
                        udp 0 0 *:32768 *:*
                        udp 0 0 *:netbios-ns *:*
                        udp 0 0 *:netbios-dgm *:*
                        udp 0 0 *:16567 *:*
                        udp 0 0 *:29900 *:*
                        udp 0 0 *:720 *:*
                        udp 0 0 *:55124 *:*
                        udp 0 0 *:55125 *:*
                        udp 0 0 *:49365 *:*
                        udp 0 0 *:5353 *:*
                        udp 0 0 *:sunrpc *:*
                        udp 0 0 *:ipp *:*
                        udp 0 0 *:ntp *:*
                        udp 0 0 *:ntp *:*

                        i suggest my issue is this ...
                        udp 0 0 *:16567 *:*
                        because it doesn't appear to be in a LISTEN state

                        Comment

                        • [NRL]Gummiruecken

                          #13
                          Re: Issues with Linux Server

                          Originally posted by the_c
                          i suggest my issue is this ...
                          udp 0 0 *:16567 *:*
                          because it doesn't appear to be in a LISTEN state
                          No, it isn't, TCP has states, UDP is a connectionless / stateless networking protocol

                          (If interested: http://en.wikipedia.org/wiki/User_Datagram_Protocol )

                          However, I compared your netstat to the one on our server (FC3) and it looks ok. The only thing we changed after install to get it running at all was the sv.internet and sv.serverIP (and the firewall settings of course).

                          Are you sure there is no other programm running which uses the same ports ?

                          Do you use the SElinux stuff ? You can have a lot of fun when don't knowing about it (check with sestatus).

                          Comment

                          Working...