Page 1 of 1

IpFilter prevents the addition of several NPCs

Posted: 20 May 2009, 03:51
by jjduran
Hello,

I'm going to continue researching this one, but I haven't found a workaround just yet.

Our config.xml file contains:

Code: Select all

<IpFilter>3</IpFilter>
We are unable to create more than 3 NPCs before we receive null object errors. The obvious solution is to simply remove the IpFilter, but we would prefer to prevent players from connecting more than 3 users from a single IP address.

Is there a simple work around for this?

Thanks.


UPDATE:
I don't know if this is related to the issue, but in the past, we experienced a problem when creating NPCs with the ip address: "127.0.0.1." I used to receive this error:

Code: Select all

NPC Creation failed, due to I/O error.  Local socket connection failed. 
It wasn't a "server ready" problem because we were listening and waiting for the "serverReady" event, and I did have the "<EnableNPC>true</EnableNPC>" tag properly added to the config file.

To eliminate the error, we simply replaced "127.0.0.1" with the actual ip-address of our server. For some reason this resolved the I/O error, but we're still unable to add more than 3 npc users as a result of the IpFilter.

Posted: 20 May 2009, 04:41
by jjduran
Resolved

Turns out this was in fact related to the update mentioned above. Our config file did not bind all available ip addresses using this line:

Code: Select all

<ServerId>*</ServerIp>
Instead, our config was hard-coded to use only the ip address of our server (this was a leftover from an earlier version of SFS).

The next step was to return all of the createNPC functions back to the ip address "127.0.0.1". Now that both of those changes are in place we can add unlimited NPCs.

I'm a fan of quick fixes :!: