Jump to content
Forgot your email address? ×
×
×
  • Create New...
  • 0

Can not start server


arsenlupin

Question

Startet die Datenbank ..
Real Server
Log OffAsyncSQL: connected to localhost (reconnect 1)
Success PLAYER
AsyncSQL: connected to localhost (reconnect 1)
Success ACCOUNT
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
Success COMMON
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
Success HOTBACKUP
Die Datenbank wurde gestartet.
Startet Channel 1 Core 1 ..
INTERNAL_IP: 192.168.0.100 interface em0
Can not get public ip address
Channel 1 Core 1 wurde gestartet.
Startet Channel 1 Core 2 ..
INTERNAL_IP: 192.168.0.100 interface em0
Can not get public ip address
Channel 1 Core 2 wurde gestartet.
Startet Channel 2 Core 1 ..
INTERNAL_IP: 192.168.0.100 interface em0
Can not get public ip address
Channel 2 Core 1 wurde gestartet.
Startet Channel 2 Core 2 ..
INTERNAL_IP: 192.168.0.100 interface em0
Can not get public ip address
Channel 2 Core 2 wurde gestartet.
Startet den neutralen Channel ..
INTERNAL_IP: 192.168.0.100 interface em0
Can not get public ip address
Der neutralen Channel wurde gestartet.
Startet den Mark-Server ..
INTERNAL_IP: 192.168.0.100 interface em0
Can not get public ip address
Der Mark-Server wurde gestartet.
Startet den Loginserver ..
INTERNAL_IP: 192.168.0.100 interface em0
Can not get public ip address
Der Loginserver wurde gestartet.

Link to comment

6 answers to this question

Recommended Posts

  • 0
  • Premium

If you are using source:
 
Open config.cpp and replace 192.168 with 999.999 in the GetIPInfo event.

 
If you are not using source:
 
Open your game with Hex Editor, I prefer HxD and replace 192.168 with 999.999

  • Love 1
Link to comment
  • 0

For game 34083.

 

Insert that dif

0009D2F4: 80 90
0009D30D: 80 90
0009D399: 80 90
001EB4C3: 80 90
001EB4E8: 80 90
001EB50D: 80 90 

and start the game with this argument "-I xxx.xxx.xxx.xxx" ( xxx = Your Official Public IP) u get it by visiting http://whatismyipaddress.com/

 

when you post your "run.sh or start.sh" i can edit it in the right place.

  • Metin2 Dev 1
Link to comment
  • 0

I know, old thread but very useful...

ERROR:  Can not get public ip address

Replace in game SRC config.cpp,  the Block "bool GetIPInfo()"  with this, an it will work

 

bool GetIPInfo()
{
#ifndef __WIN32__
	struct ifaddrs* ifaddrp = NULL;

	if (0 != getifaddrs(&ifaddrp))
		return false;

	for( struct ifaddrs* ifap=ifaddrp ; NULL != ifap ; ifap = ifap->ifa_next )
	{
		struct sockaddr_in * sai = (struct sockaddr_in *) ifap->ifa_addr;

		if (!ifap->ifa_netmask ||  // ignore if no netmask
				sai->sin_addr.s_addr == 0 || // ignore if address is 0.0.0.0
				sai->sin_addr.s_addr == 16777343) // ignore if address is 127.0.0.1
			continue;
#else
	WSADATA wsa_data;
	char host_name[100];
	HOSTENT* host_ent;
	int n = 0;

	if (WSAStartup(0x0101, &wsa_data)) {
		return false;
	}

	gethostname(host_name, sizeof(host_name));
	host_ent = gethostbyname(host_name);
	if (host_ent == NULL) {
		return false;
	}
	for ( ; host_ent->h_addr_list[n] != NULL; ++n) {
		struct sockaddr_in addr;
		struct sockaddr_in* sai = &addr;
		memcpy(&sai->sin_addr.s_addr, host_ent->h_addr_list[n], host_ent->h_length);
#endif

		char * netip = inet_ntoa(sai->sin_addr);

		if (g_szPublicIP[0] == '0')
		{
			strlcpy(g_szPublicIP, netip, sizeof(g_szPublicIP));
#ifndef __WIN32__
			fprintf(stderr, "PUBLIC_IP: %s interface %sn", netip, ifap->ifa_name);
#else
			fprintf(stderr, "PUBLIC_IP: %sn", netip);
#endif
		}
	}

#ifndef __WIN32__
	freeifaddrs( ifaddrp );
#else
	WSACleanup();
#endif

	if (g_szPublicIP[0] != '0')
		return true;
	else
		return false;
}

hope it helps you ! 😉

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • -15% Discount in Metin2 Dev Store (01/10/2021 => 31/12/2021) => Code => 15_PCT_OCT_TO_DEC_2021


  • Read our Rules
  • Activity

    1. 1

      [HELP] Costume bonusing with item not working

    2. 10

      Fix Taskbar Highlight Python

    3. 13

      Reduce server memory usage

    4. 87

      How To Enchant & Transform Costume

    5. 2

      Old m2 function

  • Recently Browsing

    • No registered users viewing this page.

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.