Jump to content

Recommended Posts

Hello i have a bug about disconnecting

If im playing in locale nothing happens but when my friend enter the server everything go well but randomly he get disconnected

i ve looked at sysser of ch db e auth but nothing is said specificaly

we using hamachi free

hamachi can limit the connection? and makes crash ? 

 

in sysser db there is this error spammed:

query: REPLACE INTO offline_shop_item(owner_pid, position, vnum, count, socket0, socket1, socket2, socket3, socket4, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, price, transmutation, soulbind) VALUES(16, 62, 70057, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000000, 0, 0)
SYSERR: Jun  3 00:03:28 :: ChildLoop: AsyncSQL::ChildLoop : mysql_query error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2):

ch1 :

Jun  3 00:34:30 :: GLOBAL_TIME: Jun  3 00:34:30 time_gap 0
Jun  3 00:34:31 :: SYSTEM: closing socket. DESC #24
Jun  3 00:34:31 :: DISCONNECT: paky (DESC::~DESC)

ch1 dev.log 

0603 00:33.00.2903 INFO (block_country.cpp, 128,is_blocked_country_ip   ) BLOCKED_COUNTRY_IP (25.36.252.127) : NO
0603 00:33.00.2903 DEB0 (input_login.cpp, 167,LoginByKey              ) check_blocked_country_end
0603 00:33.00.6924 DEB0 (desc_manager.cpp, 413,ConnectAccount          ) BBBB ConnectAccount(xrt)
0603 00:34.31.4517 DEB0 (desc_manager.cpp, 419,DisconnectAccount       ) BBBB DisConnectAccount(xrt)

 

Edited by mrscale
Link to comment
https://metin2.dev/topic/33768-random-disconnect/
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

From DB its pretty obvious that something is up with your MySQL server... its not running or crashed... however i'dont think its related to your random disconnect issue, the other logs you've sent are normal.

mysql_query error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2):

 

Edited by Matteo

🖥️ SysAdmin — Government (HU)
🛠️ Freelance Metin2 Dev • DevOps
🐧 FreeBSD / Linux | 🛡️ Security & WAF | 🚀 Performance | 🔥 Firewalls | ⚙ Automation
Open to work - Contact me on Discord @matteo_r

Link to comment
https://metin2.dev/topic/33768-random-disconnect/#findComment-171005
Share on other sites

  • Active Member

Hamachi is faking a lan. It can disconnect others players as conection drops, but should not affect server locally. Check mysql. I usually get that error when particular socket is already in use (incorrect server restart etc).

spacer.png

Link to comment
https://metin2.dev/topic/33768-random-disconnect/#findComment-171008
Share on other sites

On 6/3/2025 at 9:18 AM, Matteo said:

From DB its pretty obvious that something is up with your MySQL server... its not running or crashed... however i'dont think its related to your random disconnect issue, the other logs you've sent are normal.

mysql_query error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2):

 

i fixed this one.

but my friend in hamachi still disconnecting randomly 

im gonna try with zerotier but idk how to install it manually because my freebsd dont let me install pkg 

17 hours ago, florinx09 said:

Hamachi is faking a lan. It can disconnect others players as conection drops, but should not affect server locally. Check mysql. I usually get that error when particular socket is already in use (incorrect server restart etc).

localy never disconnect, i do thinks is some limitation of hamachi

Link to comment
https://metin2.dev/topic/33768-random-disconnect/#findComment-171016
Share on other sites

@ florinx09@Matteo

an update about the situation

ive succed in installing zero tier on the machine and it wroks 

in locale the server works fine with the ip of zerotier 

but when i try to connect from another pc at the char select i get disconnected

ports are open (last time i had this problem this was the solution) 

logs  of core1 ch1

Jun  5 04:34:48 :: SYSTEM: new connection from [10.244.228.247] fd: 21 handshake 119021615 output input_len 0, ptr 0x39e11300
Jun  5 04:34:48 :: Packet Analyze [Header 206][bufferLeft 1] 
Jun  5 04:34:49 :: SYSTEM: closing socket. DESC #21

what could be? in my config i have bind-internal-public ip with the ip of zerotier (tried with auth also but nothing, db NO)

Link to comment
https://metin2.dev/topic/33768-random-disconnect/#findComment-171025
Share on other sites

  • Active Member

Firewall exceptions added?

Also, for eg. on radmin you need to allow which app can connect through or allow all. Add the client to the exception (this is for the players that are not local). For you portmap, vm, etc. Maybe zero tier has something like this?

"but when i try to connect from another pc at the char select i get disconnected" - this indicate to me that you can connect from outside until the char.select and that there is a connection betwen the client and the server, so maybe server related? 40k you need to edit the source and recompile, but on older serverfiles you need a launcher or a sf which works with hamachi by default.

Don't forget to use .100 in the client and config acordingly. As for the cores, may be different, but I don't mess with it unless it is on an vps and change it from local to ip.

spacer.png

Link to comment
https://metin2.dev/topic/33768-random-disconnect/#findComment-171034
Share on other sites

@ florinx09 servefiles are pretty recent 2023 if im right 

i have deactived the firewall on windows and windows of my friend

you say that i got to put .100 to the ip? i tought this was onyl for hamachi (just for say .100 in hamachi didnt work for me)

idk if its about the source because hamachi was connecting 

in my config  core1 ch1 (and the others)

INTERNAL_IP

BIND_IP

PUBLIC_iP 

are all on the zerotier ip, take it from ifconfig in bsd

 

do you know what i should look in the source? 

btw thanks for the interesting

i really wanna fix this problem z.z

Edited by mrscale
Link to comment
https://metin2.dev/topic/33768-random-disconnect/#findComment-171037
Share on other sites

  • Bot
20 hours ago, mrscale said:

@ florinx09 servefiles are pretty recent 2023 if im right 

i have deactived the firewall on windows and windows of my friend

you say that i got to put .100 to the ip? i tought this was onyl for hamachi (just for say .100 in hamachi didnt work for me)

idk if its about the source because hamachi was connecting 

in my config  core1 ch1 (and the others)

INTERNAL_IP

BIND_IP

PUBLIC_iP 

are all on the zerotier ip, take it from ifconfig in bsd

 

do you know what i should look in the source? 

btw thanks for the interesting

i really wanna fix this problem z.z

Bro we live in 2025. Get some cheap Server for 3-5$ and all your friends can join.

english_banner.gif

Link to comment
https://metin2.dev/topic/33768-random-disconnect/#findComment-171050
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.