Page 1 of 1

Not appearing in server list

PostPosted: Sun Apr 21, 2013 03:13
by Orby
Hello,

I'm trying to get a 0.4.6 server to appear on the in client server list. I am running 64-bit Linux. Here is what I have done so far:

* compiled with -DENABLE_CURL=1
* Added the following lines to my config:
serverlist_url = servers.minetest.net
server_name = "Wazuland II"
server_description = Economy. Lots for sale $20,000
server_address = www.wazuclan.com
server_url = http://www.wazuclan.com
server_announce = 1
server_dedicated = 1

Despite these changes, my server does not appear in the list. Does anyone have any other suggestions? Thanks!

PostPosted: Sun Apr 21, 2013 10:09
by PilzAdam
Are you sure that the server uses this config file when starting?
Try running it with --config path/to/minetest.conf

PostPosted: Sun Apr 21, 2013 11:58
by Traxie21
Are you sure you have the right curl library installed? That was my mistake last time.

PostPosted: Sun Apr 21, 2013 14:54
by Orby
Thanks for your responses. Yes it is definitely using the correct configuration. Which curl library are you using now? I'm using Ubuntu 12.0.4 (if you happen to be using the same and recall the package name). The output of
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
dpkg --get-selections | grep curl

is
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
libcurl3
libcurl3:i386
libcurl3-gnutls
php5-curl


I'm going to try

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
sudo apt-get install libcurl4-openssl-dev


(as per your previous thread) and rebuilding, then I'll get back to you.

--------

Edit:

After installing the libcurl4-openssl-dev package and running
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 . -DENABLE-CURL=1 -DRUN_IN_PLACE=1

again, I received more promising 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
-- *** Will build version 0.4.6 ***
-- IRRLICHT_SOURCE_DIR =
-- IRRLICHT_INCLUDE_DIR = /usr/include/irrlicht
-- IRRLICHT_LIBRARY = /usr/lib/libIrrlicht.a
-- CURL_INCLUDE_DIR = /usr/include/curl
-- CURL_LIBRARY = /usr/lib/x86_64-linux-gnu/libcurl.so
-- cURL support enabled


Apparently, -DENABLE-CURL does nothing, so there is no point in using it. I rebuilt the server and voila! Thanks for the suggestion.

PostPosted: Thu May 16, 2013 22:29
by glomie
Same problem, libcurl4-openssl-dev is installed before compiling
config file is
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
port = 30000
name = globis
server_announce = true
server_name = globis server
server_description = A server with a lot of mods.
server_address = 94.23.33.108:30000
server_url = http://forum.minetest.net/viewtopic.php?pid=89696
liquid_finite = true
max_users = 20
enable_damage = false

default_privs = interact, shout, money, fly, noclip
unlimited_player_transfer_distance = false
enable_pvp = false
static_spawnpoint = 0,20,2500
disallow_empty_password = true

if have in log
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
02:29:36: ACTION[ServerThread]: announcing to servers.minetest.net

but still don't appear...

PostPosted: Fri May 17, 2013 04:54
by sfan5
Try applying this patch: https://gist.github.com/sfan5/5494405
It just uses the command line curl
I had the same problem, either libcurl or Minetest was doing something wrong

PostPosted: Sat May 18, 2013 13:41
by PilzAdam
Hybrid Dog wrote:Why?
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 Warning:
  Manually-specified variables were not used by the project:

    ENABLE-CURL



Its ENABLE_CURL IIRC ("_" not "-").

PostPosted: Sat May 18, 2013 17:10
by glomie
I try to install sfan5 patch, but :
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
error: patch failed: src/serverlist.cpp:259
error: src/serverlist.cpp: patch does not apply

applied manually to have:
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
void sendAnnounce(std::string action, u16 clients, double uptime, std::string gameid) {
    Json::Value server;
    if (action.size())
        server["action"]    = action;
    server["port"] = g_settings->get("port");
        if (action != "del") {
        server["name"]        = g_settings->get("server_name");
        server["description"]    = g_settings->get("server_description");
        server["address"]    = g_settings->get("server_address");
        server["version"]    = VERSION_STRING;
        server["url"]        = g_settings->get("server_url");
        server["creative"]    = g_settings->get("creative_mode");
        server["damage"]    = g_settings->get("enable_damage");
        server["dedicated"]    = g_settings->get("server_dedicated");
        server["password"]    = g_settings->getBool("disallow_empty_password");
        server["pvp"]        = g_settings->getBool("enable_pvp");
        server["clients"]    = clients;
        server["clients_max"]    = g_settings->get("max_users");
        if (uptime >=1) server["uptime"] = (int)uptime;
        if (gameid!="") server["gameid"] = gameid;
       
    }
    if(server["action"] == "start")
        actionstream << "announcing to " << g_settings->get("serverlist_url") << std::endl;
    Json::StyledWriter writer;
    #if 0 // CURL IS BEING DUMB
    CURL *curl;
    curl = curl_easy_init();
    if (curl)
    {
        CURLcode res;
        curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
        curl_easy_setopt(curl, CURLOPT_URL, (g_settings->get("serverlist_url")+std::string("/announce?json=")+curl_easy_escape(curl, writer.write( server ).c_str(), 0)).c_str());
        //curl_easy_setopt(curl, CURLOPT_USERAGENT, "minetest");
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, ServerList::ServerAnnounceCallback);
        //curl_easy_setopt(curl, CURLOPT_WRITEDATA, &liststring);
        curl_easy_setopt(curl, CURLOPT_TIMEOUT, 1);
        curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 1);
        res = curl_easy_perform(curl);
        //if (res != CURLE_OK)
        //    errorstream<<"Serverlist at url "<<g_settings->get("serverlist_url")<<" not found (internet connection?)"<<std::endl;
        curl_easy_cleanup(curl);
    }
    #else
       CURL *curl;
       curl = curl_easy_init();
       system(("curl "+g_settings->get("serverlist_url")+std::string("/announce?json=")+curl_easy_escape(curl, writer.write( server ).c_str(), 0)).c_str());
       curl_easy_cleanup(curl);
       printf("\n");
#endif

recompile with
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
minetest@ks368390:~/minetest-12-05-2013$ cmake . -DENABLE_CURL=1 -DRUN_IN_PLACE=1
CMake Warning at CMakeLists.txt:4 (message):
  CMake/CPack version 2.8.2 will not create working .deb packages!


-- *** Will build version 0.4.6 ***
-- IRRLICHT_SOURCE_DIR =
-- IRRLICHT_INCLUDE_DIR = /usr/include/irrlicht
-- IRRLICHT_LIBRARY = /usr/lib/libIrrlicht.a
-- CURL_INCLUDE_DIR = /usr/include/curl
-- CURL_LIBRARY = /usr/lib/libcurl.so
-- cURL support enabled
-- GetText disabled
-- Sound enabled
-- Using project jthread library
-- Found system sqlite3 header file in /usr/include
-- Found system sqlite3 library /usr/lib/libsqlite3.so
-- Using project jsoncpp library
-- LuaJIT library: LUA_LIBRARY-NOTFOUND
-- LuaJIT headers: LUA_INCLUDE_DIR-NOTFOUND
-- LuaJIT not found, using bundled Lua.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/minetest/minetest-12-05-2013
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
minetest@ks368390:~/minetest-12-05-2013$ make -j2
[  0%] Built target jsoncpp
[ 12%] [ 13%] Built target lua
Built target jthread
Scanning dependencies of target minetestserver
Scanning dependencies of target minetest
[ 13%] Building CXX object src/CMakeFiles/minetestserver.dir/serverlist.cpp.o
[ 13%] Building CXX object src/CMakeFiles/minetest.dir/serverlist.cpp.o
/home/minetest/minetest-12-05-2013/src/serverlist.cpp:231: warning: 'size_t ServerList::ServerAnnounceCallback(void*, size_t, size_t, void*)' defined but not used
/home/minetest/minetest-12-05-2013/src/serverlist.cpp:231: warning: 'size_t ServerList::ServerAnnounceCallback(void*, size_t, size_t, void*)' defined but not used
cc1plus: warning: unrecognized command line option "-Wno-unused-but-set-variable"
cc1plus: warning: unrecognized command line option "-Wno-unused-but-set-variable"
Linking CXX executable ../bin/minetestserver
Linking CXX executable ../bin/minetest
lua/build/liblua.a(loslib.o): In function `os_tmpname':
loslib.c:(.text+0x35): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
[ 49%] Built target minetestserver
lua/build/liblua.a(loslib.o): In function `os_tmpname':
loslib.c:(.text+0x35): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
[100%] Built target minetest

It need time to appear in list ?

PostPosted: Sun Jun 09, 2013 19:08
by glomie
Work with debian wheezy, certainly squeeze seems have too old dependency.

PostPosted: Tue Oct 01, 2013 23:33
by Lunovox
I'm having the same problem. But my serves appears in the list of servers, depending on the time I try to activate the server. I use "Ubuntu 13.04".

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
$ minetest --server --port 30000 --worldname "Craftopoles BR" &
...
19:43:00: ACTION [main]: Server for gameid = "minetest" listening on port 30000.
creative inventory size: 242
19:43:00: ACTION [ServerThread]: announcing to servers.minetest.net
...


I may be wrong, but I have the impression to be a defect in the URL servers.minetest.net that is not giving permission to publish. And without that permission to publish the server may not be online.

Apparently the windows users do not suffer from this problem.

PostPosted: Wed Oct 02, 2013 05:38
by sfan5
I updated my path to apply to the latest HEAD:
Gist
Raw patch (USE THIS WHEN PATCHING)