NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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

asked 13 Jul '17, 10:23

taras's gravatar image

taras
11124
accept rate: 0%

edited 21 May '19, 10:11

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?

(13 Jul '17, 10:31) SomeoneElse ♦

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.

(13 Jul '17, 10:49) taras
1

I followed the switch2osm guide one in one. I succeeded with everything that was before in that guide.

(13 Jul '17, 10:52) taras
1

I am using Ubuntu 16.04 LTS, does it make any sense?

(13 Jul '17, 10:53) taras

(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.

(13 Jul '17, 10:54) SomeoneElse ♦

Someone will need to try and reproduce the problem, I think.

(13 Jul '17, 10:55) SomeoneElse ♦

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/ ?

(13 Jul '17, 11:27) taras

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 program gdb to be installed.

(13 Jul '17, 11:49) scai ♦

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.

(13 Jul '17, 12:32) taras

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).

(13 Jul '17, 13:09) SomeoneElse ♦
showing 5 of 10 show 5 more comments

I fixed my first issue with

plugins_dir=/usr/lib/mapnik/3.0/input switch into plugins_dir=/usr/local/lib/mapnik/input

but now new issues appeared...((

Running in foreground mode... renderd[22429]: 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[22429]: Loading parameterization function for renderd[22429]: Loading parameterization function for debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile renderd[22429]: Loading parameterization function for debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile renderd[22429]: Loading parameterization function for Mapnik LOG> 2017-07-13 14:12:38: Unable to process some data while parsing '/home/taras/Documents/projects/luxembourg/src/openstreetmap-carto/mapnik.xml': * attribute 'minimum-scale-denominator' with value '750000' at line 268

Is it okay if it unable to process some data ??

permanent link

answered 13 Jul '17, 13:13

taras's gravatar image

taras
11124
accept rate: 0%

edited 13 Jul '17, 13:19

I did wonder why you had libmapnik 2 in there :)

Bit confused about the error at line 268 in the xml stylesheet though - are you perhaps using a different stylesheet?

I've tried updating a server to the latest version of everything and it "just works" (with OSM's "standard" style and Azerbaijan data).

(13 Jul '17, 13:34) SomeoneElse ♦

I am using stylesheet provided by git clone git://github.com/gravitystorm/openstreetmap-carto.git and converted into xml format with a command carto project.mml > mapnik.xml

(13 Jul '17, 13:48) taras

@SomeoneElse, could you tell me, please if these issues are crucial? e.g. Mapnik LOG> 2017-07-13 14:12:39: Unable to process some data while parsing '/home/taras/Documents/projects/luxembourg/src/openstreetmap-carto/mapnik.xml': * attribute 'minimum-scale-denominator' with value '750000' at line 268 Thank you

(13 Jul '17, 13:56) taras

Well it works for me - I wonder if something's still trying to use old libraries? The "build from source" of some things will probably look around at what libraries are available.

Does it actually work? Do any map layers appear?

(13 Jul '17, 14:08) SomeoneElse ♦

@SomeoneElse, yes a general map of entire world appears, nevertheless the map of Luxembourg did not appeared yet...((

means some problems still exist... which I need to solve

Thank you so much

(13 Jul '17, 14:14) taras

I think a lot of issues still exist, because I am quite anxious about this messages in the Terminal:

Running in foreground mode... ... renderd[32745]: Loading parameterization function for renderd[32745]: An error occurred while loading the map layer 'ajt': Postgis Plugin: Bad connection Connection string: ' dbname=lux connect_timeout=4' encountered during parsing of layer 'landcover-low-zoom' in Layer at line 525 of '/home/taras/Documents/projects/luxembourg/src/openstreetmap-carto/mapnik.xml' ... renderd[32745]: An error occurred while loading the map layer 'ajt': Postgis Plugin: Bad connection Connection string: ' dbname=lux connect_timeout=4' encountered during parsing of layer 'landcover-low-zoom' in Layer at line 525 of '/home/taras/Documents/projects/luxembourg/src/openstreetmap-carto/mapnik.xml'

BUT the 525 string looks okay as for me srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">

(13 Jul '17, 14:20) taras

The switch2osm instructions suggest a database name of "gis" (which used to be the default in many OSM programs). Perhaps you've imported data in there but renderd is trying to access one called "lux"?

(13 Jul '17, 14:38) SomeoneElse ♦

Could be...

But when I check my system I do have only this:

Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+-------------+-------------+----------------------- lux | taras | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres (4 rows)

(13 Jul '17, 14:45) taras

Maybe I need to set PostgreSQL login method to "trust" in pg_hba.conf file. I just do not know how to perform that... I know the command sudo nano /etc/postgresql/9.5/main/pg_hba.conf, but what exactly I need to change I have no idea literally...

(13 Jul '17, 14:53) taras
showing 5 of 9 show 4 more comments

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×204
×105
×44
×36
×20

question asked: 13 Jul '17, 10:23

question was seen: 3,452 times

last updated: 21 May '19, 10:11

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum