I am new to Apache technologies and renderd. I am following stages written in a manual: switch2osm | Manually building a tile server (16.04.2 LTS).
But on a stage of "Running renderd for the first time"
I got problems.
When I execute next command sudo -u taras renderd -f -c /usr/local/etc/renderd.conf
I received next reply in my Terminal:
renderd[24791]: Rendering daemon started
renderd[24791]: Initiating reqyest_queue
renderd[24791]: Parsing section renderd
renderd[24791]: Parsing render section 0
renderd[24791]: Parsing section mapnik
renderd[24791]: Parsing section ajt
renderd[24791]: config renderd: unix socketname=/var/run/renderd/renderd.sock
renderd[24791]: config renderd: num_threads=2
renderd[24791]: config renderd: num_slaves=0
renderd[24791]: config renderd: tile_dir=/var/lib/mod_tile
renderd[24791]: config renderd: stats_file=/var/run/renderd/renderd.stats
renderd[24791]: config mapnik: plugins_dir=/usr/lib/mapnik/3.0/input
renderd[24791]: config mapnik: font_dir=/usr/share/fonts/truetype
renderd[24791]: config mapnik: font_dir_recurse=1
renderd[24791]: config renderd(0): Active
renderd[24791]: config renderd(0): unix socketname=/var/run/renderd/renderd.sock
renderd[24791]: config renderd(0): num_threads=2
renderd[24791]: config renderd(0): tile_dir=/var/lib/mod_tile
renderd[24791]: config renderd(0): stats_file=/var/run/renderd/renderd.stats
renderd[24791]: config map 0: name(ajt) file(/home/taras/Documents/projects/luxembourg/src/openstreetmap-carto/mapnik.xml) uri(/hot/) htcp() host(localhost)
renderd[24791]: Initialising unix server socket on /var/run/renderd/renderd.sock
renderd[24791]: Created server socket 5
renderd[24791]: Renderd is using mapnik version 2.2.0
renderd[24791]: DEBUG: Loading font: /usr/share/fonts/truetype/lohit-punjabi/Lohit-Punjabi.ttf
... (some very similar code with no errors)
renderd[24791]: DEBUG: Loading font: /usr/share/fonts/truetype/tlwg/TlwgTypewriter-Bold.ttf
renderd[24791]: DEBUG: Loading font: /usr/share/fonts/truetype/tlwg/Purisa.ttf
renderd[24791]: DEBUG: Loading font: /usr/share/fonts/truetype/olga/GFSOlga.otf
Running in foreground mode...
renderd[24791]: Starting stats thread
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
renderd[24791]: Loading parameterization function for
renderd[24791]: Loading parameterization function for
**Segmentation fault**
What does it mean Segmentation fault and what should I do?
Also, when I open my browser http://myIP/mod_tile/0/0/0.png I got the next reply on the black background:
The image “http://myIP/mod_tile/0/0/0.png” cannot be displayed, because it contains errors.
After execution of the next code: sudo -u taras gdb -batch -ex run -ex bt --args renderd -f -c /usr/local/etc/renderd.conf
I received a long reply from a system, where 12 issues are indicated:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
renderd[15977]: Rendering daemon started
renderd[15977]: Initiating reqyest_queue
renderd[15977]: Parsing section renderd
renderd[15977]: Parsing render section 0
renderd[15977]: Parsing section mapnik
renderd[15977]: Parsing section ajt
renderd[15977]: config renderd: unix socketname=/var/run/renderd/renderd.sock
renderd[15977]: config renderd: num_threads=4
renderd[15977]: config renderd: num_slaves=0
renderd[15977]: config renderd: tile_dir=/var/lib/mod_tile
renderd[15977]: config renderd: stats_file=/var/run/renderd/renderd.stats
renderd[15977]: config mapnik: plugins_dir=/usr/lib/mapnik/3.0/input
renderd[15977]: config mapnik: font_dir=/usr/share/fonts/truetype
renderd[15977]: config mapnik: font_dir_recurse=1
renderd[15977]: config renderd(0): Active
renderd[15977]: config renderd(0): unix socketname=/var/run/renderd/renderd.sock
renderd[15977]: config renderd(0): num_threads=4
renderd[15977]: config renderd(0): tile_dir=/var/lib/mod_tile
renderd[15977]: config renderd(0): stats_file=/var/run/renderd/renderd.stats
renderd[15977]: config map 0: name(ajt) file(/home/taras/Documents/projects/luxembourg/src/openstreetmap-carto/mapnik.xml) uri(/hot/) htcp() host(localhost)
renderd[15977]: Initialising unix server socket on /var/run/renderd/renderd.sock
renderd[15977]: Created server socket 5
renderd[15977]: Renderd is using mapnik version 2.2.0
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/lohit-punjabi/Lohit-Punjabi.ttf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/didot-classic/GFSDidotClassic.otf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/ebgaramond/EBGaramond12-Italic.ttf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/ebgaramond/EBGaramond-InitialsF2.ttf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/ebgaramond/EBGaramond-Initials.ttf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/ebgaramond/EBGaramond08-Regular.ttf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/ebgaramond/EBGaramond08-SC.ttf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/ebgaramond/EBGaramond-InitialsF1.ttf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/ebgaramond/EBGaramond08-Italic.ttf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/ebgaramond/EBGaramond12-Regular.ttf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/adf/GilliusADF-Regular.otf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/adf/AccanthisADFStdNo3-Italic.otf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/adf/GilliusADFNo2-Bold.otf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/adf/AccanthisADFStdNo2-Bold.otf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/adf/AccanthisADFStdNo3-BoldItalic.otf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/adf/AccanthisADFStd-Regular.otf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/adf/GilliusADFNo2Cd-Italic.otf
renderd[15977]: DEBUG: Loading font: /usr/share/fonts/truetype/adf/UniversalisADFStd-BoldOblique.otf
(...everything abount fonts..I skip this long part)
Running in foreground mode...
[New Thread 0x7fffdd164700 (LWP 15981)]
renderd[15977]: Starting stats thread
[New Thread 0x7fffdc963700 (LWP 15982)]
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
renderd[15977]: Loading parameterization function for
[New Thread 0x7fffd7fff700 (LWP 15983)]
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
renderd[15977]: Loading parameterization function for
[New Thread 0x7fffd77fe700 (LWP 15984)]
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
renderd[15977]: Loading parameterization function for
[New Thread 0x7fffd6ffd700 (LWP 15985)]
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
renderd[15977]: Loading parameterization function for
Thread 3 "renderd" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdc963700 (LWP 15982)]
0x00007ffff7910700 in std::pair<boost::unordered::iterator_detail::iterator<boost::unordered::detail::ptr_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<boost::interprocess::mapped_region> > > >, bool> boost::unordered::detail::table_impl<boost::unordered::detail::map<std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<boost::interprocess::mapped_region> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::shared_ptr<boost::interprocess::mapped_region>, boost::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::emplace_impl<boost::unordered::detail::emplace_args1<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<boost::interprocess::mapped_region> > > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::unordered::detail::emplace_args1<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<boost::interprocess::mapped_region> > > const&) () from /usr/local/lib/libmapnik.so.2.2
#0 0x00007ffff7910700 in std::pair<boost::unordered::iterator_detail::iterator<boost::unordered::detail::ptr_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<boost::interprocess::mapped_region> > > >, bool> boost::unordered::detail::table_impl<boost::unordered::detail::map<std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<boost::interprocess::mapped_region> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::shared_ptr<boost::interprocess::mapped_region>, boost::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::emplace_impl<boost::unordered::detail::emplace_args1<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<boost::interprocess::mapped_region> > > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::unordered::detail::emplace_args1<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<boost::interprocess::mapped_region> > > const&) () from /usr/local/lib/libmapnik.so.2.2
#1 0x00007ffff790dd57 in mapnik::mapped_memory_cache::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) () from /usr/local/lib/libmapnik.so.2.2
#2 0x00007fffe983858b in shape_io::shape_io(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) () from /usr/lib/mapnik/3.0/input/shape.input
#3 0x00007fffe982bfce in shape_datasource::shape_datasource(mapnik::parameters const&) () from /usr/lib/mapnik/3.0/input/shape.input
#4 0x00007fffe982d581 in create () from /usr/lib/mapnik/3.0/input/shape.input
#5 0x00007ffff78327ce in mapnik::datasource_cache::create(mapnik::parameters const&) () from /usr/local/lib/libmapnik.so.2.2
#6 0x00007ffff789caaf in mapnik::map_parser::parse_layer(mapnik::Map&, mapnik::xml_node const&) () from /usr/local/lib/libmapnik.so.2.2
#7 0x00007ffff78a1864 in mapnik::map_parser::parse_map_include(mapnik::Map&, mapnik::xml_node const&) () from /usr/local/lib/libmapnik.so.2.2
#8 0x00007ffff78a35f6 in mapnik::map_parser::parse_map(mapnik::Map&, mapnik::xml_node const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/local/lib/libmapnik.so.2.2
#9 0x00007ffff78a44a1 in mapnik::load_map(mapnik::Map&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) () from /usr/local/lib/libmapnik.so.2.2
#10 0x000000000040a334 in render_thread (arg=<optimised out>) at src/gen_tile.cpp:361
#11 0x00007ffff665e6ba in start_thread (arg=0x7fffdc963700) at pthread_create.c:333
#12 0x00007ffff63943dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Per https://github.com/openstreetmap/mod_tile/issues/165#issuecomment-315023234 (which I suspect overlapped with you asking here) - what OS and version are you using and are there any other variations from the switch2osm guide?
Thank you for reply. Could you be so kind and specify what do you mean by "OS and version", please? I want to be as specific as possible for other people and write explicit question.
I followed the switch2osm guide one in one. I succeeded with everything that was before in that guide.
I am using Ubuntu 16.04 LTS, does it make any sense?
(your second comment answers it, but just to clarify) I was wondering whether you were running a different version of Ubuntu, or a different version of Linux.
Someone will need to try and reproduce the problem, I think.
Does it mean that I need to go through steps from a guide for a lower version of OS, e.g. https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/ ?
We don't know. Segmentation faults can be caused by various issues. You could try to run the following command and show us your output:
sudo -u taras gdb -batch -ex run -ex bt --args renderd -f -c /usr/local/etc/renderd.conf
. It requires the programgdb
to be installed.Thank you so much! I added results of debugging to the end of my initial question. As I can see there are 12 issues were found in my system.
When you ran "make" after "Install mod_tile and renderd" what output did you get? I suspect that some dependancies might have changed (within Ubuntu - the version of mod_tile referenced has not changed).