[FIXED]Can't connect to any remote servers w/0.4.13+ client

auouymous
Member
 
Posts: 88
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

[FIXED]Can't connect to any remote servers w/0.4.13+ client

by auouymous » Mon May 16, 2016 20:17

This was caused by a problem in the server code and is fixed in https://github.com/est31/minetest/commi ... 4163592b8b . The following patch can be applied to clients (experiencing the problem) connecting to servers that don't yet have the fix.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
--- a/src/network/connection.cpp
+++ b/src/network/connection.cpp
@@ -1742,7 +1742,7 @@ void ConnectionSendThread::connect(Address address)
    // Send a dummy packet to server with peer_id = PEER_ID_INEXISTENT
    m_connection->SetPeerID(PEER_ID_INEXISTENT);
    NetworkPacket pkt(0,0);
-   m_connection->Send(PEER_ID_SERVER, 0, &pkt, true);
+//   m_connection->Send(PEER_ID_SERVER, 0, &pkt, true);
 }
 
 void ConnectionSendThread::disconnect()


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

When I connect to remote servers using 0.4.13 or 0.4.14 I only see the sky color, a black hand and it shows my position as (x:0.5 y:-0.5 z:0.0). I am able to connect to a local server just fine with those clients and I can connect to remote servers if I use 0.4.12 or below. I tried deleting the entire ~/.minetest directory (config and cache), didn't help. The problem happens on about 99 out of every 100 connects, so not quite 100% of the time. I have a 50Mbps connection that is very stable and behind a NAT, neither are the problem since 0.4.12 works fine.

I did a git bisect and traced the problem to https://github.com/minetest/minetest/co ... 90bdca60b9. Everything works fine if I change LATEST_PROTOCOL_VERSION to 24 in src/network/networkprotocol.h and recompile.

A good connection with 0.4.14 (w/ protocol 24) shows:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
VERBOSE[ConnectionSend]: con(15/1339)RE-SENDING timed-out RELIABLE to x.x.x.x(t/o=0.1): from_peer_id=1339, channel=0, seqnum=65501
VERBOSE[ConnectionReceive]: con(15/1339)WARNING: ACKed packet not in outgoing queue
INFO[Main]: Client: TOCLIENT_INIT_LEGACY received with server_ser_ver=26
...
INFO[Main]: Client: time_of_day=13087 time_speed=72 dr=1000
INFO[Main]: Client got TOCLIENT_MOVE_PLAYER pos=(4156.84,-255,-13541.7) pitch=-1.09 yaw=97.18
INFO[Main]: Client: Privileges updated: home interact shout


And a failed connection with 0.4.14 (w/ protocol 27) shows:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
VERBOSE[ConnectionSend]: con(15/1218)RE-SENDING timed-out RELIABLE to x.x.x.x(t/o=0.1): from_peer_id=0, channel=0, seqnum=65500
VERBOSE[ConnectionSend]: con(15/1218)RE-SENDING timed-out RELIABLE to x.x.x.x(t/o=0.1): from_peer_id=0, channel=0, seqnum=65500
VERBOSE[ConnectionReceive]: con(15/1218)WARNING: ACKed packet not in outgoing queue
VERBOSE[ConnectionReceive]: con(15/1218)WARNING: ACKed packet not in outgoing queue
INFO[Main]: Client: TOCLIENT_HELLO received with serialization_ver=26, auth_mechs=1, proto_ver=27, compression_mode=0. Doing auth with mech 1
INFO[Main]: Client: Recieved TOCLIENT_SRP_BYTES_S_B.
...
INFO[Main]: Client: time_of_day=17819 time_speed=72 dr=1000


It never receives the TOCLIENT_MOVE_PLAYER or privs packets.

I am using Gentoo Linux and here is the cmake output:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
cmake --no-warn-unused-cli -C /var/tmp/portage/games-action/minetest-0.4.14/work/minetest-0.4.14_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SERVER=ON -DBUILD_CLIENT=ON -DCUSTOM_BINDIR=/usr/bin -DCUSTOM_DOCDIR=/usr/share/doc/minetest-0.4.14
-DCUSTOM_LOCALEDIR=/usr/share/locale -DCUSTOM_SHAREDIR=/usr/share/minetest -DENABLE_CURL=ON -DENABLE_FREETYPE=ON -DENABLE_GETTEXT=OFF -DENABLE_GLES=0 -DENABLE_LEVELDB=ON -DENABLE_REDIS=OFF -DENABLE_SPATIAL=no -DENABLE_SOUND=ON -DENABLE_LUAJIT=ON -DRUN_IN_PLACE=0 -DCUSTOM_EXAMPLE_CONF_DIR=/usr/share/doc/minetest-0.4.14 -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_INSTALL_DO_STRIP=OFF -DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/games-action/minetest-0.4.14/work/minetest-0.4.14_build/gentoo_rules.cmake -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/games-action/minetest-0.4.1 /work/minetest-0.4.14_build/gentoo_toolchain.cmake /var/tmp/portage/games-action/minetest-0.4.14/work/minetest-0.4.14

Not searching for unused variables given on the command line.
loading initial cache file /var/tmp/portage/games-action/minetest-0.4.14/work/minetest-0.4.14_build/gentoo_common_config.cmake
-- The C compiler identification is GNU 4.9.3
-- The CXX compiler identification is GNU 4.9.3
-- Check for working C compiler: /usr/lib/ccache/bin/i686-pc-linux-gnu-gcc
-- Check for working C compiler: /usr/lib/ccache/bin/i686-pc-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/i686-pc-linux-gnu-g++
-- Check for working CXX compiler: /usr/lib/ccache/bin/i686-pc-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- *** Will build version 0.4.14 ***
-- Found Irrlicht: /usr/lib/libIrrlicht.so
-- Using SHAREDIR=/usr/share/minetest
-- Using BINDIR=/usr/bin
-- Using DOCDIR=/usr/share/doc/minetest-0.4.14
-- Using EXAMPLE_CONF_DIR=/usr/share/doc/minetest-0.4.14
-- Using LOCALEDIR=/usr/share/locale
-- Found CURL: /usr/lib/libcurl.so
-- cURL support enabled.
-- GetText disabled.
-- Found OpenAL: /usr/lib/libopenal.so
-- Found VORBIS: /usr/include
-- Sound enabled.
-- Found Freetype: /usr/lib/libfreetype.so (found version "2.5.5")
-- Freetype enabled.
-- Found LuaJit: /usr/lib/libluajit-5.1.so
-- Using GMP provided by system.
-- Found GMP: /usr/lib/libgmp.so
-- Looking for cbreak in /usr/lib/libncursesw.so
-- Looking for cbreak in /usr/lib/libncursesw.so - found
-- Found Ncursesw: /usr/lib/libncursesw.so
-- ncurses console enabled.
-- LevelDB backend enabled.
-- Found SQLite3: /usr/lib/libsqlite3.so
-- Using bundled JSONCPP library.
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/libX11.so
-- Found OpenGL: /usr/lib/libGL.so
-- Found JPEG: /usr/lib/libjpeg.so
-- Found BZip2: /usr/lib/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so - found
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.8")
-- Found PNG: /usr/lib/libpng.so (found version "1.6.19+apng")
-- Looking for include file endian.h
-- Looking for include file endian.h - found
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
-- <<< Gentoo configuration >>>
Build type      Gentoo
Install path    /usr
Compiler flags:
C               -O2 -march=core2 -pipe
C++             -O2 -march=core2 -pipe
Linker flags:
Executable       -Wl,-O1 -Wl,--as-needed
Module           -Wl,-O1 -Wl,--as-needed
Shared           -Wl,-O1 -Wl,--as-needed


Any ideas how to fix this without using protocol 24? Or is it a bug in minetest that seems to only bite me?
Last edited by auouymous on Thu May 19, 2016 17:44, edited 1 time in total.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Can't connect to any remote servers with 0.4.13+ client

by sfan5 » Mon May 16, 2016 22:22

How many different servers did you try?
Which version were they running?
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

auouymous
Member
 
Posts: 88
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

Re: Can't connect to any remote servers with 0.4.13+ client

by auouymous » Mon May 16, 2016 23:18

xanadu, amhi, telesight and some others from the list. Those ones all use 0.4.13 or 0.4.13-dev.
 

KCoombes
Member
 
Posts: 278
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt or Rudilyn

Re: Can't connect to any remote servers with 0.4.13+ client

by KCoombes » Mon May 16, 2016 23:35

I believe Xanadu is using 0.4.14
 

est31
Member
 
Posts: 172
Joined: Mon Dec 29, 2014 01:49

Re: Can't connect to any remote servers with 0.4.13+ client

by est31 » Wed May 18, 2016 07:54

This seems to relate to reorder early in the init process: https://github.com/minetest/minetest/issues/4138

At least I know how to fix it, but I want to have a full theory of how the bug happens before I call my PR ready for merge.
 

User avatar
kaadmy
Member
 
Posts: 627
Joined: Thu Aug 27, 2015 23:07
GitHub: kaadmy
IRC: KaadmY
In-game: KaadmY kaadmy NeD

Re: Can't connect to any remote servers with 0.4.13+ client

by kaadmy » Wed May 18, 2016 14:32

I thought 0.4.13 and higher have a different, incompatible network protocol from 0.4.12?
Never paint white stripes on roads near Zebra crossings.
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: Can't connect to any remote servers with 0.4.13+ client

by MineYoshi » Wed May 18, 2016 21:06

kaadmy wrote:I thought 0.4.13 and higher have a different, incompatible network protocol from 0.4.12?

Nope, i connected many servers with 0.4.13 version with a 0.4.12 client, don't happen anything, only there are the new things from 0.4.13 or 0.4.14, as the blocks or the formspecs
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 3 guests

cron