Jump to content

[40250] Reference Serverfile + Client + Src [15 Available Languages]


TMP4

Recommended Posts

  • Contributor
35 minutes ago, TonisBoss said:

Thank you,did all steps, but i have one more question. I get this error :
INTERNAL_IP: 10.xx.xx.xx interface vtnet0
Can not get public ip address.
Any way to solve this?

10.xx.xx.xx? Then your vps have a private IP address.

At game/src/config.cpp you can find this else if (!strncmp(netip, "10.", 3))
Edit the number 10 to any other number but keep the size (or edit the 3) like: else if (!strncmp(netip, "00.", 3)

It is some dirty fix for Ymir's "great" logic.

You have to recompile the game file. You can only compile in a x32 system, you can use the provided vm, then upload the game file to your vps.

Also you probably interested in the PROXY_IP since you'll get kicked out after charselect since that 10.x ip is a private ip, you have to proxy the players to the vps's public ip. In every CONFIG file you'll find #BIND_IP: x and #PROXY_IP: x. Uncomment those (remove the #) and set the BIND_IP value to your private ip, and PROXY_IP value to your public ip.

Edited by TMP4
Link to comment
Share on other sites

30 minutes ago, TMP4 said:

10.xx.xx.xx? Then your vps have a private IP address.

At game/src/config.cpp you can find this else if (!strncmp(netip, "10.", 3))
Edit the number 10 to any other number but keep the size (or edit the 3) like: else if (!strncmp(netip, "00.", 3)

It is some dirty fix for Ymir's "great" logic.

You have to recompile the game file. You can only compile in a x32 system, you can use the provided vm, then upload the game file to your vps.

Also you probably interested in the PROXY_IP since you'll get kicked out after charselect since that 10.x ip is a private ip, you have to proxy the players to the vps's public ip. In every CONFIG file you'll find #BIND_IP: x and #PROXY_IP: x. Uncomment those (remove the #) and set the BIND_IP value to your private ip, and PROXY_IP value to your public ip.

Did the steps, not solved
 spacer.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

9 hours ago, TMP4 said:

 

Hi TMP4! Quick question - does it have any impact whether I use mysql80 or mysql55?
Thanks!

 

My name is Martin Musil, I am 23 years old and currently live in the Czech Republic.

◈ I am Technical Game Designer who specializes in Unreal Engine.
◈ Lead Developer for ELVERA - Indie Third-Person Multiplayer Action RPG distributed via Steam.
◈ I have a solid foundation in C++ programming and Unreal's Blueprint system.

My portfoliohttps://www.martinmusil.com

Link to comment
Share on other sites

  • Contributor
48 minutes ago, Muska said:

Hi TMP4! Quick question - does it have any impact whether I use mysql80 or mysql55?
Thanks!

Yes it does. MySQL80 is not supported. Please read this if you want to get some clue about upgrading:

 

1 hour ago, TonisBoss said:

Did the steps, not solved
 spacer.png

If you recompiled the game then you can not get the same error since it will never step into that else if (that's why I said dirty fix).
So please recompile it. (In a x32 system, or in the provided vm then upload the /usr/metin2/server/share/bin/game file to the vps)

gameclean	 or	cd /usr/metin2/src/game/src && gmake clean
gamecompile	 or	cd /usr/metin2/src/game/src && gmake -j9

And since you are using some kind if virtualization in your vps then set BIND_IP & PROXY_IP with your private & public IP address.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 3
Link to comment
Share on other sites

18 minutes ago, TMP4 said:

Yes it does. MySQL80 is not supported. Please read this if you want to get some clue about upgrading:

 

If you recompiled the game then you can not get the same error since it will never step into that else if (that's why I said dirty fix).
So please recompile it. (In a x32 system, or in the provided vm then upload the /usr/metin2/server/share/bin/game file to the vps)

gameclean	 or	cd /usr/metin2/src/game/src && gmake clean
gamecompile	 or	cd /usr/metin2/src/game/src && gmake -j9

And since you are using some kind if virtualization in your vps then set BIND_IP & PROXY_IP with your private & public IP address.

Alright, I see - just wanted to make sure.

Unfortunately, I am still having the same issue with "unsupported file layout" despite our little talk.
I followed the instructions, but still it doesn't seem to work.

Screenshot:

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal

 

My name is Martin Musil, I am 23 years old and currently live in the Czech Republic.

◈ I am Technical Game Designer who specializes in Unreal Engine.
◈ Lead Developer for ELVERA - Indie Third-Person Multiplayer Action RPG distributed via Steam.
◈ I have a solid foundation in C++ programming and Unreal's Blueprint system.

My portfoliohttps://www.martinmusil.com

Link to comment
Share on other sites

32 minutes ago, TMP4 said:

Yes it does. MySQL80 is not supported. Please read this if you want to get some clue about upgrading:

 

If you recompiled the game then you can not get the same error since it will never step into that else if (that's why I said dirty fix).
So please recompile it. (In a x32 system, or in the provided vm then upload the /usr/metin2/server/share/bin/game file to the vps)

gameclean	 or	cd /usr/metin2/src/game/src && gmake clean
gamecompile	 or	cd /usr/metin2/src/game/src && gmake -j9

And since you are using some kind if virtualization in your vps then set BIND_IP & PROXY_IP with your private & public IP address.

Solved. Thank you very much.

  • Good 1
Link to comment
Share on other sites

  • Contributor
1 hour ago, Muska said:

Alright, I see - just wanted to make sure.

Unfortunately, I am still having the same issue with "unsupported file layout" despite our little talk.
I followed the instructions, but still it doesn't seem to work.

Screenshot:

Your problem is that you are using an x64 system and you installed the packages what contains the x64 version of the libs, but the sources are not upgraded to the x64 platform (and will not be). Why I know it? Because that exact lib only exists there if you installed the package, probably it's a dependency of DevIL. Even if you uploaded the libs from Libs.zip, your x64 libs in /usr/local/lib will be loaded first.

Solution: Remove the packages via pkg delete packagename and only use the libs from Libs.zip.
(Or migrate the source to the x64 platfrom, then you can install & use x64 packages with their libs, but I cannot help with that.)

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

39 minutes ago, TMP4 said:

Your problem is that you are using an x64 system and you installed the packages what contains the x64 version of the libs, but the sources are not upgraded to the x64 platform (and will not be). Why I know it? Because that exact lib only exists there if you installed the package, probably it's a dependency of DevIL. Even if you uploaded the libs from Libs.zip, your x64 libs in /usr/local/lib will be loaded first.

Solution: Remove the packages via pkg delete packagename and only use the libs from Libs.zip.
(Or migrate the source to the x64 platfrom, then you can install & use x64 packages with their libs, but I cannot help with that.)

I guess that was it! I did delete the packages before and it still didn't work, so now I did fresh reinstall of the whole VPS and the error is gone!
However, now "connect: Connection refused" keeps appearing when starting the server.

I might have made some small mistake somewhere since I haven't slept for 27h straight now trying to understand and figure out what's going on ?
I will check everything tomorrow for any mistakes I might have made during the creating, can't seem to focus anymore due to the lack of sleep.

Attaching the screenshot in case you want to check it out - 

Thank you so much for the help you provided, it really means a lot for me, you are great ?

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal

 

My name is Martin Musil, I am 23 years old and currently live in the Czech Republic.

◈ I am Technical Game Designer who specializes in Unreal Engine.
◈ Lead Developer for ELVERA - Indie Third-Person Multiplayer Action RPG distributed via Steam.
◈ I have a solid foundation in C++ programming and Unreal's Blueprint system.

My portfoliohttps://www.martinmusil.com

Link to comment
Share on other sites

  • Contributor
43 minutes ago, Muska said:

I guess that was it! I did delete the packages before and it still didn't work, so now I did fresh reinstall of the whole VPS and the error is gone!
However, now "connect: Connection refused" keeps appearing when starting the server.

I might have made some small mistake somewhere since I haven't slept for 27h straight now trying to understand and figure out what's going on ?
I will check everything tomorrow for any mistakes I might have made during the creating, can't seem to focus anymore due to the lack of sleep.

Attaching the screenshot in case you want to check it out - 

Thank you so much for the help you provided, it really means a lot for me, you are great ?

Check db's and auth's syserr, I guess db is not running (you can check it with the ps command) because it could not connect to the databse.

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

20 hours ago, TMP4 said:

Check db's and auth's syserr, I guess db is not running (you can check it with the ps command) because it could not connect to the databse.

Thanks for the tips!

So, as far as I understand, auth is returning an error that it can't connect to the database - I checked the database syserr and found out, that Table "player.mob_proto" doesn't exist, so the query keeps failing.
I went to check the Mysql Player Table and found out, that there has been an error while executing the SQL dumps from your files - other tables seems to be fine though.

So... I am not sure why there is any error while trying to use the Player Dump (player.sql).

There is the error - 

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal

 

My name is Martin Musil, I am 23 years old and currently live in the Czech Republic.

◈ I am Technical Game Designer who specializes in Unreal Engine.
◈ Lead Developer for ELVERA - Indie Third-Person Multiplayer Action RPG distributed via Steam.
◈ I have a solid foundation in C++ programming and Unreal's Blueprint system.

My portfoliohttps://www.martinmusil.com

Link to comment
Share on other sites

  • Contributor
18 minutes ago, Muska said:

Thanks for the tips!

So, as far as I understand, auth is returning an error that it can't connect to the database - I checked the database syserr and found out, that Table "player.mob_proto" doesn't exist, so the query keeps failing.
I went to check the Mysql Player Table and found out, that there has been an error while executing the SQL dumps from your files - other tables seems to be fine though.

So... I am not sure why there is any error while trying to use the Player Dump (player.sql).

When you run the sql, and if it fails, it gives you some outup, regardless what mysql client you use, because it is coming from the server. What was that?
If you don't know, re-run at least the mob_proto table (the sql file is a text file, open it with notepad++ and copy the mob_proto part and re-run)

Edited by TMP4
  • Love 1
Link to comment
Share on other sites

3 minutes ago, TMP4 said:

When you run the sql, and if it fails, it gives you some outup, regardless what mysql client you use, because it is coming from the server. What was that?
If you don't know, re-run at least the mob_proto table (the sql file is a text file, open it with notepad++ and copy the mob_proto part and re-run)

I have attached the screenshot link in the second you sent your response, so you can check it out if you didn't notice.
Is that the error you asked for? It says something about overly sized packet.

I guess I can increase the size of packets that the client & server accept, but I'm not sure if this error isn't an underlying issue of something else, since this shouldn't happen in normal circumstances, right?

EDIT(1): So I increased the size of acceptable packets and managed to upload it successfully. I also eliminated like 99% of the connection refuse errors, however, there is still 1 or 2 going around. Currently checking any other potential issues.

EDIT(2): So, the issue with missing table seems to be fixed, however, the auth still can't connect.
AUTH SYSSER:
SYSERR: Dec 15 17:08:15 :: socket_connect: HOST 127.0.0.1:15000, could not connect.

DB SYSSER:
SYSERR: Dec 15 17:08:13 :: Start: TABLE_POSTFIX not configured use default
SYSERR: Dec 15 17:08:55 :: Process: FDWATCH: peer null in event: ident 23 
(found on the forum that this is not exactly the error)

EDIT(3): So, I tried to check the my.cnf file to see if there is everything alright in the Mysql settings, but I can't seem to even locate it in my files? That might be the reason why it can't connect to 127.0.0.1 I guess? The thing is, Mysql seems to run fine, so it's pretty confusing.

 

My name is Martin Musil, I am 23 years old and currently live in the Czech Republic.

◈ I am Technical Game Designer who specializes in Unreal Engine.
◈ Lead Developer for ELVERA - Indie Third-Person Multiplayer Action RPG distributed via Steam.
◈ I have a solid foundation in C++ programming and Unreal's Blueprint system.

My portfoliohttps://www.martinmusil.com

Link to comment
Share on other sites

  • Contributor
41 minutes ago, Muska said:

I have attached the screenshot link in the second you sent your response, so you can check it out if you didn't notice.
Is that the error you asked for? It says something about overly sized packet.

I guess I can increase the size of packets that the client & server accept, but I'm not sure if this error isn't an underlying issue of something else, since this shouldn't happen in normal circumstances, right?

EDIT(1): So I increased the size of acceptable packets and managed to upload it successfully. I also eliminated like 99% of the connection refuse errors, however, there is still 1 or 2 going around. Currently checking any other potential issues.

EDIT(2): So, the issue with missing table seems to be fixed, however, the auth still can't connect.
AUTH SYSSER:
SYSERR: Dec 15 17:08:15 :: socket_connect: HOST 127.0.0.1:15000, could not connect.

DB SYSSER:
SYSERR: Dec 15 17:08:13 :: Start: TABLE_POSTFIX not configured use default
SYSERR: Dec 15 17:08:55 :: Process: FDWATCH: peer null in event: ident 23 
(found on the forum that this is not exactly the error)

Does your db running? You can check it with the ps command in FreeBSD.
If so maybe the db is not yet fully started before start.sh starts auth. (Happens in low tier vps)
Edit start.sh and give more time for the db to start if that's the case. (default is 2 sec)

Spoiler

db_start() # Run db
{
    echo -e "\033[31mStarting db..\033[0m"
    cd $ROOT/db && sh run.sh
    sleep 2
    clear
}

If db not running then we have to find out why. You can debug db.core or check syslog too where does it killed.

(db != database but the db binary next to your game file what connects to the database 🙂 )

Link to comment
Share on other sites

17 minutes ago, TMP4 said:

Does your db running? You can check it with the ps command in FreeBSD.
If so maybe the db is not yet fully started before start.sh starts auth. (Happens in low tier vps)
Edit start.sh and give more time for the db to start if that's the case. (default is 2 sec)

  Reveal hidden contents

db_start() # Run db
{
    echo -e "\033[31mStarting db..\033[0m"
    cd $ROOT/db && sh run.sh
    sleep 2
    clear
}

If db not running then we have to find out why. You can debug db.core or check syslog too where does it killed.

(db != database but the db binary next to your game file what connects to the database ? )

Thanks for the response!

So, I have tried 5 and then 10 seconds delay for the database start - it just delayed the connection error by a few seconds.
I also checked the process list, db is most likely not running?

NOTE - As I mentioned above, I can't seem to find my.cnf file (not even /usr/local/etc/mysql folder at all) to check the settings.
Screenshots - 

Correction: db delay, not the database

EDIT(1): I found it in the /etc/rc.conf directory

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal

 

My name is Martin Musil, I am 23 years old and currently live in the Czech Republic.

◈ I am Technical Game Designer who specializes in Unreal Engine.
◈ Lead Developer for ELVERA - Indie Third-Person Multiplayer Action RPG distributed via Steam.
◈ I have a solid foundation in C++ programming and Unreal's Blueprint system.

My portfoliohttps://www.martinmusil.com

Link to comment
Share on other sites

  • Contributor
14 minutes ago, Muska said:

Thanks for the response!

So, I have tried 5 and then 10 seconds delay for the database start - it just delayed the connection error by a few seconds.
I also checked the process list, db is most likely not running?

NOTE - As I mentioned above, I can't seem to find my.cnf file (not even /usr/local/etc/mysql folder at all) to check the settings.
Screenshots - 

Correction: db delay, not the database

Use the ps command after you started the server because you want to check if db running or not, so you have to start first.
(Because in your screenshot nothing is running, no game(channel) no auth, no db, nothing)

my.cnf have nothing to do with your error. Or does your mysql-server crashes too?

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

4 minutes ago, TMP4 said:

Use the ps command after you started the server because you want to check if db running or not, so you have to start first.
(Because in your screenshot nothing is running, no game(channel) no auth, no db, nothing)

my.cnf have nothing to do with your error. Or does your mysql-server crashes too?

Oh, right, I'm so dumb - forgot I used that without starting it.
Correct PS output - 

Looks like DB is running for a few seconds and then when the connection error occurs, it crashes.

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal

 

My name is Martin Musil, I am 23 years old and currently live in the Czech Republic.

◈ I am Technical Game Designer who specializes in Unreal Engine.
◈ Lead Developer for ELVERA - Indie Third-Person Multiplayer Action RPG distributed via Steam.
◈ I have a solid foundation in C++ programming and Unreal's Blueprint system.

My portfoliohttps://www.martinmusil.com

Link to comment
Share on other sites

  • Contributor
2 minutes ago, Muska said:

Oh, right, I'm so dumb - forgot I used that without starting it.
Correct PS output - 

Looks like DB is running for a few seconds and then when the connection error occurs, it crashes.

As I see other cores are crashing too in your vps.
So it runs for a few secs then 3 game core and the db crashes.

Honestly I only saw similar when someone wanted to run on a 1gb ram and low tier cpu vps.
I can't really say more, even if your vps was not a budget option. (But if it was, then try at least a 4gb ram - 2vcore one)

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

30 minutes ago, TMP4 said:

As I see other cores are crashing too in your vps.
So it runs for a few secs then 3 game core and the db crashes.

Honestly I only saw similar when someone wanted to run on a 1gb ram and low tier cpu vps.
I can't really say more, even if your vps was not a budget option. (But if it was, then try at least a 4gb ram - 2vcore one)

Yeah, that was the issue!
There was lack of memory to support it.

Everything now works as expected, lovely.

What would I do without you TMP4 - thank you so much, you are the best.
💜💜💜

  • Love 1

 

My name is Martin Musil, I am 23 years old and currently live in the Czech Republic.

◈ I am Technical Game Designer who specializes in Unreal Engine.
◈ Lead Developer for ELVERA - Indie Third-Person Multiplayer Action RPG distributed via Steam.
◈ I have a solid foundation in C++ programming and Unreal's Blueprint system.

My portfoliohttps://www.martinmusil.com

Link to comment
Share on other sites

55 minutes ago, Arvydas said:

What is the minimum vps system requirements to run the server file? Is 2GB of ram enough?

I believe it should be more than 2gb of ram as i have tried it before and get the error connection refused where a core goes down due to the lack of ram. Contabo offers some nice vps for a decent price

Link to comment
Share on other sites

1 hour ago, Arvydas said:

What is the minimum vps system requirements to run the server file? Is 2GB of ram enough?

I used this virtual machine with 1024 MB ram but the compilation takes too long, with 2048MB ram it works decently and the compilation and the game server started if everything that can be updated is updated. Now I have the server and the sources on my real machine an older amd phenom2 with 4 gb ram, still in testing. I'm very frustrated by the 32 bit limitation to 4 gb ram and I really don't like to compile in the virtual machine and then move to the real server. Anyway on 32bit 4 gb ram is maximum.

Link to comment
Share on other sites

  • Contributor
23 hours ago, I bims 1 WLAN said:

Hey, how can i refresh my Quests?

 

questcompile
cd /usr/metin2/server/share/locale/english/quest && python2.7 make.py

---------------------

2021.12.18: - Added ENABLE_AUTODETECT_INTERNAL_IP so the internal ip fix is cleaner now. (config.cpp)
            - Added a FAQ.txt with the most common questions what I got over the months.
Edited by TMP4
  • Good 3
Link to comment
Share on other sites

Announcements



×
×
  • Create New...

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.