216: Fsockopen() Can't connect to 127.0.0.1:5002

This forum is dedicated to the Aseco/Rasp 2 server records and control script by Flo and Assembler Maniac. Announcements and issues can be discussed in this forum.

Moderators: Flo, f*ckfish, Assembler Maniac, TM-Patrol

Post Reply
Shinoken
pedestrian
pedestrian
Posts: 8
Joined: 04 Jun 2008 15:24
Owned TM-games: TMNF

216: Fsockopen() Can't connect to 127.0.0.1:5002

Post by Shinoken » 08 Jun 2008 17:54

Hello, I have a remote game server (without root access, just a ftp account) and when I start ASeCo, it tries to connect to 127.0.0.1:5002, and gives a Connection Refused fsockopen() error.

The same-setup was directly FTP'd from my pc, with just config.xml edited (the IP to connect to from it's WAN IP -> 127.0.0.1).

xmlrpcport in configure.cfg is 5002.
remote access has been on True & False, both giving the Connection Refused error.

Anyone has a idea? I really wanna have Aseco on the same system. :(

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: 216: Fsockopen() Can't connect to 127.0.0.1:5002

Post by Assembler Maniac » 08 Jun 2008 18:47

Watch the dedicated server startup and see what port it's listening on. If something is configured wrong, you may see that it's not 5002 like you set.

Shinoken
pedestrian
pedestrian
Posts: 8
Joined: 04 Jun 2008 15:24
Owned TM-games: TMNF

Re: 216: Fsockopen() Can't connect to 127.0.0.1:5002

Post by Shinoken » 08 Jun 2008 18:49

From the logs:

Listening for xml-rpc commands on port 5002.
Loading dedicated server configuration...

And it just worked while having Aseco running on my home pc, and the dedi on the game server. With Remote XML-RPC to True

Full Error:

Code: Select all

[Aseco] Try to connect to server on 127.0.0.1:5010
[PHP Warning] fsockopen(): unable to connect to 127.0.0.1:5010 (Connection refused) on line 480 in file /home/game7/includes/GbxRemote.inc.php
[ASECO Error] Connection could not be established! on line 518 in file /home/game7/aseco.php
[06/09,08:43:29] Beginning to shutdown Aseco due to an error ...
Yes, I am testing it on port 5010 now. Also, I suppose it is not Aseco's fault, because when I set its port to 5000, he tries to connect to another dedicated, but there he fails at the password check, as its different on every dedicated on this system.

Here is my dedicated.cfg (removed passwords):

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>

<dedicated>
	<authorization_levels>
		<level>
			<name>SuperAdmin</name>
			<password>******</password>
		</level>
		<level>
			<name>Admin</name>
			<password>****</password>
		</level>
		<level>
			<name>User</name>
			<password>***</password>
		</level>
	</authorization_levels>
	
	<masterserver_account>
		<login>rvp-bot</login>
		<password>***********</password>
		<nation>NED</nation>
	</masterserver_account>

<server_options>
<name>$00fSRC | Racing Tracks</name>
<comment>Powered by http://www.snakeservers.net! Best & Cheapest Game Server Hosting! $00fSpijkenisse Racing Crew$z Server!</comment>
<max_players>24</max_players>
<password></password>
<max_spectators>4</max_spectators>
<password_spectator></password_spectator>
<ladder_mode>forced</ladder_mode>
<enable_p2p_upload>True</enable_p2p_upload>
<enable_p2p_download>True</enable_p2p_download>
<callvote_timeout>60000</callvote_timeout>
<callvote_ratio>0.5</callvote_ratio>
<allow_challenge_download>True</allow_challenge_download>
<autosave_replays>False</autosave_replays>
</server_options>
<system_config>
// tmu server only
<connection_uploadrate>16384</connection_uploadrate> <!-- KBps -->
<connection_donwloadrate>131072</connection_donwloadrate> <!-- KBps -->
// end tmu dedicated server only commands
<connection_type>LAN</connection_type>
<packmask>stadium</packmask>
<server_port>2350</server_port>
<server_p2p_port>3450</server_p2p_port>
<client_port>0</client_port>
<xmlrpc_port>5010</xmlrpc_port>
<xmlrpc_allowremote>False</xmlrpc_allowremote>
<bind_ip_address></bind_ip_address>
<force_ip_address></force_ip_address>
<use_proxy>False</use_proxy>
<proxy_login></proxy_login>
<proxy_password></proxy_password>
<blacklist_url></blacklist_url>
// tmu dedicated server only (leave blank to keep standard values described in this tutorial)
<guestlist_filename></guestlist_filename>
<blacklist_filename></blacklist_filename>
<use_nat_upnp></use_nat_upnp>
// end tmu only commands
</system_config>
</dedicated>

Shinoken
pedestrian
pedestrian
Posts: 8
Joined: 04 Jun 2008 15:24
Owned TM-games: TMNF

Re: 216: Fsockopen() Can't connect to 127.0.0.1:5002

Post by Shinoken » 10 Jun 2008 20:34

BUMP -- Waited 2 days, no one knows what is going on? I've tried several stuff, all failed.

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: 216: Fsockopen() Can't connect to 127.0.0.1:5002

Post by Assembler Maniac » 10 Jun 2008 20:42

Shinoken wrote:BUMP -- Waited 2 days, no one knows what is going on? I've tried several stuff, all failed.
If nobody has ever seen this problem, and all attempts at solving it fail, we're really sorry, but we haven't got a clue what's going on.

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: 216: Fsockopen() Can't connect to 127.0.0.1:5002

Post by Slig » 10 Jun 2008 21:51

i read a post some time ago about someone who noticed that a very recent php version had problem using '127.0.0.1' while 'localhost' worked :? i did not tried myself anyway

Shinoken
pedestrian
pedestrian
Posts: 8
Joined: 04 Jun 2008 15:24
Owned TM-games: TMNF

Re: 216: Fsockopen() Can't connect to 127.0.0.1:5002

Post by Shinoken » 11 Jun 2008 07:25

Didn't work Slig, as I can connect to other tm servers running on the same machine (like trying on port 5000 gives a password error because I use my own password). thanks for your try anyway.

I'm wondering if it couldn't work because in my start.sh stands:

./Aseco.sh
./TrackmaniaServer

Watch the order, Aseco boots up first, but the point is, moving Aseco second doesn't even let it boot up.

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: 216: Fsockopen() Can't connect to 127.0.0.1:5002

Post by Slig » 11 Jun 2008 12:28

Shinoken wrote:./Aseco.sh
./TrackmaniaServer
i don't know if aseco make a delay before connection, but else the server should be started first, and eventually delay a little the start of aseco (for example using a sleep 4)

Shinoken
pedestrian
pedestrian
Posts: 8
Joined: 04 Jun 2008 15:24
Owned TM-games: TMNF

Re: 216: Fsockopen() Can't connect to 127.0.0.1:5002

Post by Shinoken » 11 Jun 2008 13:24

I tried chaging the order, but then aseco didn't even boot up (no new log file created (gave it a new location to test it))

And Slig, thanks for trying to help me.

update:

Code: Select all

#!/bin/sh
while true
do
cd /home/game7
date >> TM.log

./TrackmaniaServer /game=Nations /dedicated_cfg=dedicated.cfg /game_settings=MatchSettings/NationsGreen.txt /internet /nodaemon
sleep 5
./Aseco.sh 
sleep 30
done
This is how start.sh looks..

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: 216: Fsockopen() Can't connect to 127.0.0.1:5002

Post by Slig » 11 Jun 2008 14:06

you can't start the dedicated as "nodaemon" in such script, because it such case the script is waiting it to finish before doing next commands.

Shinoken
pedestrian
pedestrian
Posts: 8
Joined: 04 Jun 2008 15:24
Owned TM-games: TMNF

Re: 216: Fsockopen() Can't connect to 127.0.0.1:5002

Post by Shinoken » 11 Jun 2008 17:21

Updated it (removed /nodeamon) and got this at the dedicated log:

Code: Select all

Starting TmForever v2008-04-16...
Initializing...
Configuration file : dedicated.cfg
Loading system configuration...
...system configuration loaded
Loading cache...
...OK
Listening for xml-rpc commands on port 5010.
Trackmania server daemon started with pid=13541 (parent=13540).
Now it doesn't even read the matchsettings...? Also, aseco.log still didn't created in the directory specified.

Update: I looked in my logs again, and now it keeps looping the start-up process with that message 5x now and it keeps trying and trying.

Post Reply