Local Host Connecting

NOTE: this is an informal bug post place ONLY. Real bugs should be posted on GitHub
Post Reply
happyhad
Private First Class
Private First Class
Posts: 18
Joined: Wed Oct 21, 2015 7:58 pm

Local Host Connecting

Post by happyhad »

I am using Windows and am developing a map.
With 2.4.12 client I cannot connect to localhost.
With 2.4.10 client I have no problem connecting.

Is there a problem with 2.4.12?

I also tried doing this just by using the client to start a server and then connect to it, with the same results.
User avatar
Zehra
Private First Class
Private First Class
Posts: 914
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: Local Host Connecting

Post by Zehra »

Hi happyhad,

I made some testing and it seems that starting a server from the game client fails in 2.4.12
I also tested BZFS with default, random and -world options and they did not have any issues.(Server not started from game client.)

Something I've found useful over time is to use a script to start a server up.

Here's a Batch script which works on Windows, but you will need to edit it to suit your map.

Code: Select all

@ECHO OFF
ECHO Finding BZFlag
cd C:\Program Files\[bzflag version]
@ECHO OFF
ECHO Testing
ECHO If everything works properly we'll likely see BZFS give a message
bzfs.exe -password abc -world "C:\Users\[username]\Desktop\mapname.bzw"
PAUSE
Change '[username]' with the username you use on Windows.
'mapname' will be needed to be changed to the map name you are using as well.

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
happyhad
Private First Class
Private First Class
Posts: 18
Joined: Wed Oct 21, 2015 7:58 pm

Re: Local Host Connecting

Post by happyhad »

Thank you for you response. But my problem is not in the starting of the server.
I can start it with the .12 client or I can do it with a bat file.

I cannot connect to the locally running server with a .12 client (localhost).
I take the same batch file and put it on a server and can connect to the server.

So to me it looks like the bug is .12 cannot connect to localhost.

Sorry if I wasn't clear.

Thanks!
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Local Host Connecting

Post by blast »

I'm not seeing any differing behavior between 2.4.10 and 2.4.12. We use c-ares for DNS resolution. On Windows 7, at least, and probably anything since, the 'localhost' hostname does not appear in the Windows hosts file and is instead handled special inside Window's name resolution code. Because c-ares does it's own DNS lookups (and uses the hosts file), localhost will only work if your DNS servers specifically resolve it.

The quick fix is to just use 127.0.0.1 instead of localhost.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
Post Reply