Help with cronjob and remote FTP

Status
Not open for further replies.

fragzone

New Member
Messages
9
Reaction score
0
Points
0
Hi there,

I'm currently having a problem with running Psychostats. After I found out the stats weren't working and there were cron errors I received support from the Psychostats forums. It has been diagnosed that "perhaps something between the webhost and the game server is blocking the data channel of the FTP connection. Ask your web host if they block any ports. You can try and explain to them that you have an application that is losing connection when it tries to get a directory listing from a remote FTP site."

Psychostats involves a cronjob remotely reading log files and processing them into stats, but recently it stopped working and according to the admin error log it finds no new logs on the other server which has the logs it needs to read.

It was working for a few months but then suddenly this happens. Can anyone help on this matter?

Thanks
 

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
Moved to level two support
The connections are probably being blocked.
 

Fedlerner

Former Adm & Team Manager
Community Support
Messages
12,934
Reaction score
6
Points
38
You connect from your x10hosting account to an external FTP? There should be no problem with this. The only problem that it could be is that if you're trying to access from an external website, content of your x10hosting account, and the Firewall may block it.

Did it stopped working from one day to another? Did you make any changes before it stop working?
 

fragzone

New Member
Messages
9
Reaction score
0
Points
0
You connect from your x10hosting account to an external FTP? There should be no problem with this. The only problem that it could be is that if you're trying to access from an external website, content of your x10hosting account, and the Firewall may block it.

Did it stopped working from one day to another? Did you make any changes before it stop working?

Yes, it is trying to connect to an external FTP (the IP of the gameserver) when it attemps to get the logs and process them.

I started getting cron errors into my email address and I'm sure I didn't make any changes to make it stop working.
 
Last edited:

Fedlerner

Former Adm & Team Manager
Community Support
Messages
12,934
Reaction score
6
Points
38
What are the errors you're getting and how have you set-up the cron jobs?
 

fragzone

New Member
Messages
9
Reaction score
0
Points
0
Right well the cron output errors are:

[FATAL]* Called from PS::Game(733)->PS::player(220)->PS::player(301)->PS::DB(262)->PS::DB(598) >>>
Error executing DB query:
INSERT INTO ps_plr (`skill`, `lastdecay`, `prevskill`, `uniqueid`, `firstseen`, `activity`, `plrid`) VALUES ('100', '1211779765', '100', 'H@R!Bø', '1211779765', '100', '93')
Duplicate entry 'H@R!B' for key 2
--end of error--

Basically, the Psychostats process ends without doing anything (particuarly useful anyway).
Here is an example:
2008-06-06 14:00:06 info - PsychoStats v3.1 exiting (elapsed: 00:00:04, logs: 0, lines: 0)
2008-06-06 14:00:05 info - Connected to ftp://fragtony@89.145.98.156. HOME=/, CWD=/89.145.98.156_port_27015/cstrike/logs
2008-06-06 14:00:03 info - Connecting to ftp://fragtony@89.145.98.156:21 ...
2008-06-06 14:00:02 info - PsychoStats v3.1 initialized.

I've set it up to run the cronjob every 15 minutes, it consists of:

Code:
/usr/bin/perl /home/fragzone/xxxxxx/xxxxxxxxxxx/stats.pl
 
Last edited:

Fedlerner

Former Adm & Team Manager
Community Support
Messages
12,934
Reaction score
6
Points
38
By the error is giving you (Duplicate entry 'H@R!B' for key 2) I think it's trying to insert a value that already exists on your table and that can't be repeated.
Can you check this?
 

Fedlerner

Former Adm & Team Manager
Community Support
Messages
12,934
Reaction score
6
Points
38
We do not block ports. PM me the IP of the server you're trying to connect and I'll add the IP to the firewall allow list. I don't know if this will help but we can try.
 

fragzone

New Member
Messages
9
Reaction score
0
Points
0
The problem seems to be with the connection to the FTP, since I tried it here and it started downloading the logs and processing them when I was testing them, which it doesn't do here.
 

Fedlerner

Former Adm & Team Manager
Community Support
Messages
12,934
Reaction score
6
Points
38
The problem might be on the other server, and not in x10hosting. We do not block FTP port as I said before, and you should be able to connect.
Try asking the other server if this could be a problem in their end.
 

fragzone

New Member
Messages
9
Reaction score
0
Points
0
Well I was able to connect to it personally when I tried running a web server so I don't know why it wouldn't work on x10.

I'll get in contact with them though.
 
Status
Not open for further replies.
Top