Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
curl_urls.txt update without restart

#1
I have the following as in my curl_urls.txt:

Code:
map_1.pk3 http://1.2.3.4/xonotic/maps_all/
map_2.pk3 http://1.2.3.4/xonotic/maps_all/
* http://dl.xonotic.co/

So basically I only host the maps unavailable on dl.xonotic.co, which has way better serving capacity than my machine.

When I want to add a map that's hosted on dl.xonotic.co, I do this:

1. Place the map file into the right folder
2. type fs_rescan in the console

However, if I want to add a map that's not available on dl.xonotic.co, I'll have to do the above, plus

3. add a line to curl_urls.txt
4. restart the server

Is there a way to have the server re-read curl_urls.txt without restarting it?

EDIT: http://dl.xonotic.co/ is no longer valid. Use http://dl.xonotic.fps.gratis/ instead.
Reply

#2
Anyway, so far I'm solving this problem by configuring the file server to re-direct. Not an in-xonotic solution but it works for now.
Reply

#3
(11-30-2018, 03:50 PM)BuddyFriendGuy Wrote: I have the following as in my curl_urls.txt:

Code:
map_1.pk3 http://1.2.3.4/xonotic/maps_all/
map_2.pk3 http://1.2.3.4/xonotic/maps_all/
* http://dl.xonotic.co/

So basically I only host the maps unavailable on dl.xonotic.co, which has way better serving capacity than my machine.

When I want to add a map that's hosted on dl.xonotic.co, I do this:

1. Place the map file into the right folder
2. type fs_rescan in the console

However, if I want to add a map that's not available on dl.xonotic.co, I'll have to do the above, plus

3. add a line to curl_urls.txt
4. restart the server

Is there a way to have the server re-read curl_urls.txt without restarting it?
Reply

#4
need little more info maybe correct info as to - correct Contents for ~/Games/Xonotic/data/curl_urls.txt file  what really should it contain
Q: will this correct maps I've copied over to the server when loaded per game type to play only to experience some maps players experience lights out - everything dark black except
weapons and ammo icons for the pickup -  Map textures are gone - how to really address this.
Q: if parts of maps are not correct - does the curl_urls.txt point to a map resource to where - All the Right info is then downloaded to Server and Connecting player clients so they get the right data fill to play maps in full life.  (this is the grease info needed for this curl_urls.txt file yes/no? )

one other eg: hard to really find step methods for setting Mods - ie: good one is MairoSMB mod - seems there's like 4 or 6 "Master.gz" files to all this mod - be nice to know how the right way to unzip/tar xvf these  and set to server up these files and make playable.  Documentation for some of these is hard to follow to find to do.


Q: - does one serving Xonotic Server require to run along side a simple HTTP server - see info per some FTP server etc - how to use be more to need as well.
all helps thx for the some leads to correcting some of these issues (we're closer but not fully operating right yet!).  Reading around the post here - shows many also staggering on cmdline. for right syntax.. 
syntax syntax - its all in the wrist. !
---
ps: a python HTTP server can be fed via cmdline -->
/usr/bin/python -m SimpleHTTPServer 26111   <-- poss get away with just  type ->   python -m SimpleHTTPServer 26111
being run from the /myBigSpace/Games/Xonotic/data  directory same where your server.cfg is contained - this will open up this directory and all the .pk3 files for connected players to sync with  - still few shady details to work thru and make right.  any help speeds up the Laughing part of game play!
connect via any browser now -  serverIP:26111 being the port you offer,   8080 is another more common HTTP port to use.  But will Xonotic Server and connecting Clients get right data fill to play all maps in full texture design etc.   (pss: remember firewalls and ports to open for this)  thx. Browser test works showing me *.pk3 files.

digging more reading ~/Xonotic/Docs/mapping.txt says  ~/Xonotic/data/data/mapname.mapinfo - but here missing ~/Xonotic/data/data/maps/mapname.cache with in too the ~/maps dir is another ~/maps/autogenerated/HereAreMapnames.mapinfo files -  - maps also are now named mapname.pk3  - data is hard to follow to really wobble grey matter.  maybe myBad and me not burning the right grass. dunno. 

if I do not have a ~/data/maps/autogenerated/mynewMap.mapinfo - does this suggest I perform a ls -la |awk '{print $9}' > mapList  and build create a single entry eachmapname.mapinfo file matching and then enter all the necessary game types I wish this map to be played from - this info is not downloaded to Client when playing - yet can see the maps fine there they seem to play locally just not on my server I want my buds to play with along as well. Can see (only dark no lites on type issues).
Diggin more for answers.  thx for leading me BuddyGuy Ace cool dude. Smile
Reply

#5
Sorry I just saw your post now. I thought somebody else would be able to help you. Let me try to answer your questions here. Hopefully it's not too late.

(05-08-2020, 07:43 PM)atomic.kidd Wrote: Q: will this correct maps I've copied over to the server when loaded per game type to play only to experience some maps players experience lights out - everything dark black except
weapons and ammo icons for the pickup -  Map textures are gone - how to really address this.

A blank map is most likely due to the client not having the correct map file.

When entering a game, the server tells the client which map file is needed, if the client has it, great, but if not, the client relies on the server to provide the URL for th client to download the map file. This is assuming the URL works. If the client fails to get the file from the URL (error 403, 404, 500, etc.), it will result a zero-length *.pk3 file. This causes the famous blank map problem.

To make it worse, if the user does not delete this zero-length file, when the user goes to another server, this zero-length file will block any new download.

For myself, I have a little script that I run before each game to find all zero-length files in dlcache/ and delete them. However, I haven't got the time to make it work for all platoforms so it's not in the official code base yet.

Code:
find $user_dir/data/dlcache -type f -size 0 -exec rm -f {} \;


(05-08-2020, 07:43 PM)atomic.kidd Wrote: Q: if parts of maps are not correct - does the curl_urls.txt point to a map resource to where - All the Right info is then downloaded to Server and Connecting player clients so they get the right data fill to play maps in full life.  (this is the grease info needed for this curl_urls.txt file yes/no? )

one other eg: hard to really find step methods for setting Mods - ie: good one is MairoSMB mod - seems there's like 4 or 6 "Master.gz" files to all this mod - be nice to know how the right way to unzip/tar xvf these  and set to server up these files and make playable.  Documentation for some of these is hard to follow to find to do.

Versioning is a long lasting problem in our ecosystem. We rely on mappers and re-mappers to name different versions of their works differently. If they don't, then we have the collision problem.

Which server are you referring to? Perhaps the server admin can work with @Mario about this?



(05-08-2020, 07:43 PM)atomic.kidd Wrote: need little more info maybe correct info as to - correct Contents for ~/Games/Xonotic/data/curl_urls.txt file  what really should it contain

...

Q: - does one serving Xonotic Server require to run along side a simple HTTP server - see info per some FTP server etc - how to use be more to need as well.
all helps thx for the some leads to correcting some of these issues (we're closer but not fully operating right yet!).  Reading around the post here - shows many also staggering on cmdline. for right syntax.. 
syntax syntax - its all in the wrist. !

Here's a working curl_urls.txt (my actual curl_urls involves a custom file server that will try to check whether http://dl.xonotic.fps.gratis can serve the file, and use the local files as the backup. The setup is a bit more involved; I'll keep it simple for clarity instead):

Code:
data*   -
* http://dl.xonotic.fps.gratis/


It basically bans any download of files with names like "data_file.cfg", "data2.txt", etc., and then tells the client to go to http://dl.xonotic.fps.gratis/ for all other files. So it's probably easier to just host files that are also on http://dl.xonotic.fps.gratis/

Or if you want to run your owwn file server, you can change that URL prefix to whatever you like:

Code:
data*   -
* http://your.server.com/maps/


(05-08-2020, 07:43 PM)atomic.kidd Wrote: ps: a python HTTP server can be fed via cmdline -->
/usr/bin/python -m SimpleHTTPServer 26111   <-- poss get away with just  type ->   python -m SimpleHTTPServer 26111
being run from the /myBigSpace/Games/Xonotic/data  directory same where your server.cfg is contained - this will open up this directory and all the .pk3 files for connected players to sync with  - still few shady details to work thru and make right.  any help speeds up the Laughing part of game play!
connect via any browser now -  serverIP:26111 being the port you offer,   8080 is another more common HTTP port to use.  But will Xonotic Server and connecting Clients get right data fill to play all maps in full texture design etc.   (pss: remember firewalls and ports to open for this)  thx. Browser test works showing me *.pk3 files.

Using SimpleHTTPServer or python3's http.server is probably OK as a temporary solution, but be aware that they don't scale well. It's not multi-threaded, meaning if you have more than one user, they have to take turns downloading. Off loading file serving to http://your.server.com/maps/ is a good idea.


(05-08-2020, 07:43 PM)atomic.kidd Wrote: digging more reading ~/Xonotic/Docs/mapping.txt says  ~/Xonotic/data/data/mapname.mapinfo - but here missing ~/Xonotic/data/data/maps/mapname.cache with in too the ~/maps dir is another ~/maps/autogenerated/HereAreMapnames.mapinfo files -  - maps also are now named mapname.pk3  - data is hard to follow to really wobble grey matter.  maybe myBad and me not burning the right grass. dunno. 

if I do not have a ~/data/maps/autogenerated/mynewMap.mapinfo - does this suggest I perform a ls -la |awk '{print $9}' > mapList  and build create a single entry eachmapname.mapinfo file matching and then enter all the necessary game types I wish this map to be played from - this info is not downloaded to Client when playing - yet can see the maps fine there they seem to play locally just not on my server I want my buds to play with along as well. Can see (only dark no lites on type issues).
Diggin more for answers.  thx for leading me BuddyGuy Ace cool dude. Smile

I never had a problems with cache or mapinfo files. You shouldn't have to fix any map files (although it's true that there are a few wcorrupted files out there). On my server, I just download map files from either http://dl.xonotic.fps.gratis/ or the forums, and then serve them to my users, and everything works.

Hope this helps.

EDIT: I had the public map server URL wrong. I missed the "dl" subdomain name. Corrected now.
Reply

#6
(05-27-2020, 03:15 PM)BuddyFriendGuy Wrote: Sorry I just saw your post now. I thought somebody else would be able to help you. Let me try to answer your questions here. Hopefully it's not too late.

(05-08-2020, 07:43 PM)atomic.kidd Wrote: Q: will this correct maps I've copied over to the server when loaded per game type to play only to experience some maps players experience lights out - everything dark black except
weapons and ammo icons for the pickup -  Map textures are gone - how to really address this.

A blank map is most likely due to the client not having the correct map file.

When entering a game, the server tells the client which map file is needed, if the client has it, great, but if not, the client relies on the server to provide the URL for th client to download the map file. This is assuming the URL works. If the client fails to get the file from the URL (error 403, 404, 500, etc.), it will result a zero-length *.pk3 file. This causes the famous blank map problem.

To make it worse, if the user does not delete this zero-length file, when the user goes to another server, this zero-length file will block any new download.

For myself, I have a little script that I run before each game to find all zero-length files in dlcache/ and delete them. However, I haven't got the time to make it work for all platoforms so it's not in the official code base yet.

Code:
find $user_dir/data/dlcache -type f -size 0 -exec rm -f {} \;


(05-08-2020, 07:43 PM)atomic.kidd Wrote: Q: if parts of maps are not correct - does the curl_urls.txt point to a map resource to where - All the Right info is then downloaded to Server and Connecting player clients so they get the right data fill to play maps in full life.  (this is the grease info needed for this curl_urls.txt file yes/no? )

one other eg: hard to really find step methods for setting Mods - ie: good one is MairoSMB mod - seems there's like 4 or 6 "Master.gz" files to all this mod - be nice to know how the right way to unzip/tar xvf these  and set to server up these files and make playable.  Documentation for some of these is hard to follow to find to do.

Versioning is a long lasting problem in our ecosystem. We rely on mappers and re-mappers to name different versions of their works differently. If they don't, then we have the collision problem.

Which server are you referring to? Perhaps the server admin can work with @Mario about this?



(05-08-2020, 07:43 PM)atomic.kidd Wrote: need little more info maybe correct info as to - correct Contents for ~/Games/Xonotic/data/curl_urls.txt file  what really should it contain

...

Q: - does one serving Xonotic Server require to run along side a simple HTTP server - see info per some FTP server etc - how to use be more to need as well.
all helps thx for the some leads to correcting some of these issues (we're closer but not fully operating right yet!).  Reading around the post here - shows many also staggering on cmdline. for right syntax.. 
syntax syntax - its all in the wrist. !

Here's a working curl_urls.txt (my actual curl_urls involves a custom file server that will try to check whether http://xonotic.fps.gratis can serve the file, and use the local files as the backup. The setup is a bit more involved; I'll keep it simple for clarity instead):

Code:
data*   -
* http://xonotic.fps.gratis/


It basically bans any download of files with names like "data_file.cfg", "data2.txt", etc., and then tells the client to go to http://xonotic.fps.gratis/ for all other files. So it's probably easier to just host files that are also on http://xonotic.fps.gratis/

Or if you want to run your owwn file server, you can change that URL prefix to whatever you like:

Code:
data*   -
* http://your.server.com/maps/


(05-08-2020, 07:43 PM)atomic.kidd Wrote: ps: a python HTTP server can be fed via cmdline -->
/usr/bin/python -m SimpleHTTPServer 26111   <-- poss get away with just  type ->   python -m SimpleHTTPServer 26111
being run from the /myBigSpace/Games/Xonotic/data  directory same where your server.cfg is contained - this will open up this directory and all the .pk3 files for connected players to sync with  - still few shady details to work thru and make right.  any help speeds up the Laughing part of game play!
connect via any browser now -  serverIP:26111 being the port you offer,   8080 is another more common HTTP port to use.  But will Xonotic Server and connecting Clients get right data fill to play all maps in full texture design etc.   (pss: remember firewalls and ports to open for this)  thx. Browser test works showing me *.pk3 files.

Using SimpleHTTPServer or python3's http.server is probably OK as a temporary solution, but be aware that they don't scale well. It's not multi-threaded, meaning if you have more than one user, they have to take turns downloading. Off loading file serving to http://your.server.com/maps/ is a good idea.


(05-08-2020, 07:43 PM)atomic.kidd Wrote: digging more reading ~/Xonotic/Docs/mapping.txt says  ~/Xonotic/data/data/mapname.mapinfo - but here missing ~/Xonotic/data/data/maps/mapname.cache with in too the ~/maps dir is another ~/maps/autogenerated/HereAreMapnames.mapinfo files -  - maps also are now named mapname.pk3  - data is hard to follow to really wobble grey matter.  maybe myBad and me not burning the right grass. dunno. 

if I do not have a ~/data/maps/autogenerated/mynewMap.mapinfo - does this suggest I perform a ls -la |awk '{print $9}' > mapList  and build create a single entry eachmapname.mapinfo file matching and then enter all the necessary game types I wish this map to be played from - this info is not downloaded to Client when playing - yet can see the maps fine there they seem to play locally just not on my server I want my buds to play with along as well. Can see (only dark no lites on type issues).
Diggin more for answers.  thx for leading me BuddyGuy Ace cool dude. Smile

I never had a problems with cache or mapinfo files. You shouldn't have to fix any map files (although it's true that there are a few wcorrupted files out there). On my server, I just download map files from either http://xonotic.fps.gratis/ or the forums, and then serve them to my users, and everything works.

Hope this helps.

Lots of Moving Parts:  I did investigate using a Simple HTTP Server - tried ports 8080/8000/26010  - on the Python site is an additional script for running a simple HTTP server - found ie: Security Wise that if the Server cmdline  is run inside the same Serving Maps Directory - I can hold the map copies and possibly serve them from this directory - its actually getting it to lift or work for a customer that joins and does not have the map.  That online find to delete zero base files - is fine nothing wrong there I greatly appreciate all provided and shared.  The work involved with chasing ghosts can be daunting to work thru these issues (lack of real examples with supporting info for how it works is tad lifting to gain the right pieces.  Will divulge this info and attempt more work to making this work -  Again I thank you and all for the share and input.  Possibly I'm just thinking too much bits'n'bytes process and methods.  
example of my install to what how I've set in action:

 server is file set - /myBigSpace/Games/Xonotic
 map copies are placed  /myBigSpace/Games/Xonotic/XonoticMaps   -  I run the  python -m SimpleHTTPServer 8080 here in XonoticMaps - when run I can browser connect to ip:8080 and see all files listed in this directory.    See info as too the   "  *data -  "  as the 1st entry to security preventing all file directories access to connecting client.  Just the *.pk3 files
curl_urls.txt is placed  /myBigSpace/Games/Xonotic/data/curl_urls.txt
my entry per 1st line is the  
curl_url.txt
*data  -
silvercity.pk3  http://192.168.10.14/      
map2              "                    "
map3name.pk3     "              "
http://dl.xonotic.co/
http://xonotic.fps.gratis     << per new info will add this - does can this be issue with the other  dl.xonotic.co/   in file content.
This brings good info per running a simple server  - something to improve on documentation  to understanding - lots of moving parts for sure.  be nice if we can mind meld with implemented parts.
thank you very Very Much for your info - BuddyGuy.  Again awesome.  will do my home work.  cheers.
PS: have this bug in mind per my curl entry above - Question is - do I need to path fill the curl_url info as too
silvercity.pk3 http://192.168.10.14/myBigSpace/Games/Xo...noticMaps/   as the actually full dir path to fit this - either or so far no results as to serving or if it works.  either method to this entry in
curl_urls.txt 

its very funky for sure - can't remember my Quake Days when I served similar.  the Long time ago in a galaxy has now phased me by grey matter packing to dusted corners no longer addressable. The provides interesting challenge.    cheers.  (sucks getting old).   Atomic.K 
EDITED BY ADMIN (Layout): Please watch the quote tags and don't create posts that only quote a single post. Keep it readable.
Reply

#7
Hi atomic.kidd,

First, I'm sorry I made a mistake before: the public map server's URL should be http://dl.xonotic.fps.gratis/ . That's probably why you are having problems. I corrected it in this post, and edited my previous posts.

For our forum discussion, it's a bit hard to read your post without proper formatting. If you use "Preview" in the forum, then you can use some formatting tools to help others read better.

(06-03-2020, 08:49 AM)atomic.kidd Wrote: example of my install to what how I've set in action:

 server is file set - /myBigSpace/Games/Xonotic
 map copies are placed  /myBigSpace/Games/Xonotic/XonoticMaps   -  I run the  python -m SimpleHTTPServer 8080 here in XonoticMaps - when run I can browser connect to ip:8080 and see all files listed in this directory.    See info as too the   "  *data -  "  as the 1st entry to security preventing all file directories access to connecting client.  Just the *.pk3 files
curl_urls.txt is placed  /myBigSpace/Games/Xonotic/data/curl_urls.txt
my entry per 1st line is the  
curl_url.txt
*data  -
silvercity.pk3  http://192.168.10.14/      
map2              "                    "
map3name.pk3     "              "
http://dl.xonotic.co/
http://xonotic.fps.gratis     << per new info will add this - does can this be issue with the other  dl.xonotic.co/   in file content.

I am guessing you can just use the code below, and not worry about setting up your own map server.
Code:
data*   -
* http://dl.xonotic.fps.gratis/
This is because http://dl.xonotic.fps.gratis/ already has silvercity.pk3 so you don't need to serve it -- the file above tells your player to download silvercity.pk3 from http://dl.xonotic.fps.gratis/silvercity.pk3

Don't use http://dl.xonotic.co/ . It's no longer live.

If you really have files that you cannot find on http://dl.xonotic.fps.gratis/ , then yes, you need your own file server.

(06-03-2020, 08:49 AM)atomic.kidd Wrote: PS: have this bug in mind per my curl entry above - Question is - do I need to path fill the curl_url info as too
silvercity.pk3 http://192.168.10.14/myBigSpace/Games/Xo...noticMaps/   as the actually full dir path to fit this - either or so far no results as to serving or if it works.  either method to this entry in
curl_urls.txt 

its very funky for sure - can't remember my Quake Days when I served similar.  the Long time ago in a galaxy has now phased me by grey matter packing to dusted corners no longer addressable. The provides interesting challenge.    cheers.  (sucks getting old).   Atomic.K  

If you have your own special map files, then I recommend you do this:

Code:
data*   -
your_map.pk3 http://192.168.10.14:8080/
your_another_map.pk3 http://192.168.10.14:8080/
your_special_map.pk3 http://192.168.10.14:8080/
* http://dl.xonotic.fps.gratis/


Try it and let us know.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Big Grin Is it possible to change bot names from console, without changing bots.txt? YottaMxt 0 2,427 11-12-2022, 07:57 PM
Last Post: YottaMxt
  Start/stop/restart git version with Webmin shell scripts? end user 13 18,535 10-16-2013, 11:27 PM
Last Post: end user
  How to change gametype inside server without having to reset. neXus 2 8,168 04-18-2012, 06:32 AM
Last Post: neXus
  automatically including current (update) date in server name? JayWalker 2 4,379 02-03-2011, 09:11 PM
Last Post: JayWalker

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-