Log in

View Full Version : Linux Servers not on Server List after LS Downtime


trevius
08-10-2008, 10:24 PM
Every time that the login server is down for any extended amount of time, it seems that some servers never reconnect to the Login Server unless they are restarted. I think this is only an issue on Linux, as many servers that are probably running Windows seem to show up just fine automatically once the Login Server comes back up. I don't know if it is all builds of Linux, but I know for sure that it happens on Debian Linux, as my server (Storm Haven), and EZ Server which now runs Debian Linux as well both don't show up on the server list after the Login Server has been down for a while.

It seems like it tries to connect over and over for a while and then if no connection is made, it eventually just stops trying and won't automatically connect after that point. This has become a more noticeable issue in the past couple of weeks due to the frequency of extended down times on the Login Server.

If anyone knows how to correct this, or possibly some source code changes to keep the server trying to connect to the Login Server indefinitely (never giving up), they would be much appreciated. I have looked through the source some and wasn't able to find any particular limiting settings for reconnect attempts.

AndMetal
08-11-2008, 12:18 AM
It's kinda funny cause I was just thinking the same thing right before I pulled up the forums :-D

I haven't had a chance to look, but I wonder if this has something to do with the differences in a WIN32 build vs everything else (all of the #ifdef WIN32 in the source). Here are some excerpts from the source with the Windows stuff in Blue and the Debian stuff in Red:
world/LoginServer.h (http://eqemulator.cvs.sourceforge.net/eqemulator/EQEmuCVS/Source/world/LoginServer.h?view=markup)

29 #ifdef WIN32
30 void AutoInitLoginServer(void *tmp);
31 #else
32 void *AutoInitLoginServer(void *tmp);
33 #endif


world/LoginServer.cpp (http://eqemulator.cvs.sourceforge.net/eqemulator/EQEmuCVS/Source/world/LoginServer.cpp?view=markup)

28 #ifdef WIN32
29 #include <process.h>
30 #include <windows.h>
31 #include <winsock.h>
32
33 #define snprintf _snprintf
34 #define vsnprintf _vsnprintf
35 #define strncasecmp _strnicmp
36 #define strcasecmp _stricmp
37 #else // Pyro: fix for linux
38 #include <sys/socket.h>
39 #ifdef FREEBSD //Timothy Whitman - January 7, 2003
40 #include <sys/types.h>
41 #endif
42 #include <netinet/in.h>
43 #include <arpa/inet.h>
44 #include <pthread.h>
45 #include <unistd.h>
46 #include <errno.h>
47
48 #include "../common/unix.h"
49
50 #define SOCKET_ERROR -1
51 #define INVALID_SOCKET -1
52 extern int errno;
53 #endif

188 #ifdef WIN32
189 void AutoInitLoginServer(void *tmp) {
190 #else
191 void *AutoInitLoginServer(void *tmp) {
192 #endif

197 #ifndef WIN32
198 return 0;
199 #endif


I think it might have to do with AutoInitLoginServer, but I'm not really sure.

trevius
08-11-2008, 01:06 AM
Ya, that was the only thing that stood out to me when I was looking through the source for it. But, I can't make heads or tails of why it would cause that. I wouldn't imagine that Linux itself would stop the reconnects from trying, so I have to assume it is set somewhere in the source.