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

i installed mapnik and other scripts for render the map

now i run the sample command "sudo render_list -n 3 -z 0 -Z 1 -a" and dont create any image in /var/lib/mod_tile folder

and i got the output:

peiman@map:~$ sudo render_list -n 3 -z 0 -Z 1 -a
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
Rendering client
Starting 3 rendering threads
Rendering all tiles from zoom 0 to zoom 1
Rendering all tiles for zoom 0 from (0, 0) to (0, 0)
Rendering all tiles for zoom 1 from (0, 0) to (1, 1)
Waiting for rendering threads to finish
rendering failed with command 4, pausing.
rendering failed with command 4, pausing.

*****************************************************
*****************************************************
Total for all tiles rendered
Meta tiles rendered: Rendered 2 tiles in 10.00 seconds (0.20 tiles/s)
Total tiles rendered: Rendered 128 tiles in 10.00 seconds (12.80 tiles/s)
Total tiles handled: Rendered 2 tiles in 10.00 seconds (0.20 tiles/s)
*****************************************************
*****************************************************

how can i debug my process? this is my rendered config file

peiman@map:~$ sudo cat /etc/renderd.conf
[renderd]
stats_file=/var/run/renderd/renderd.stats
socketname=/var/run/renderd/renderd.sock
num_threads=4
tile_dir=/var/lib/mod_tile

[mapnik]
plugins_dir=/usr/lib/mapnik/3.0/input
font_dir=/usr/share/fonts
font_dir_recurse=true

[default]
URI=/osm_tiles/
TILEDIR=/var/lib/mod_tile

XML=/home/peiman/src/openstreetmap-carto/style.xml
DESCRIPTION=This is the standard osm mapnik style


;ATTRIBUTION=&copy;<a href=\"http://www.openstreetmap.org/\">OpenStreetMap</a> and <a href=\"http://wiki.openstreetmap.org/w\
;iki/Contributors\">contributors</a>, <a href=\"http://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>
HOST=localhost
TILESIZE=256

;SERVER_ALIAS=http://a.tile.openstreetmap.org
;SERVER_ALIAS=http://b.tile.openstreetmap.org
;HTCPHOST=proxy.openstreetmap.org

also some scripts and versions

peiman@map:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic
peiman@map:~$ mapnik-config -v
3.0.22
peiman@map:~$ mapnik-config --input-plugins
/usr/lib/mapnik/3.0/input
peiman@map:~$ carto -v
1.2.0

/var/log/syslog

Mar 10 05:38:17 map renderd[1559]: Starting stats thread
Mar 10 05:38:17 map renderd[1559]: Loading parameterization function for
Mar 10 05:38:17 map renderd[1559]: message repeated 3 times: [ Loading parameterization function for]
Mar 10 05:38:17 map renderd[1559]: An error occurred while loading the map layer 'default': Postgis Plugin: FATAL:  role "www-data" does not exist#012Connection string: ' dbname=gis connect_timeout=4'#012  encountered during parsing of $
Mar 10 05:38:17 map renderd[1559]: message repeated 3 times: [ An error occurred while loading the map layer 'default': Postgis Plugin: FATAL:  role "www-data" does not exist#012Connection string: ' dbname=gis connect_timeout=4'#012  en$
Mar 10 05:38:17 map cloud-init[1565]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 running 'modules:final' at Tue, 10 Mar 2020 05:38:17 +0000. Up 23.51 seconds.
Mar 10 05:38:17 map cloud-init[1565]: Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~18.04.1 finished at Tue, 10 Mar 2020 05:38:17 +0000. Datasource DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net].  Up 23.73 seconds
Mar 10 05:38:18 map systemd[1]: Started Execute cloud user/final scripts.
Mar 10 05:38:18 map systemd[1]: Reached target Cloud-init target.
Mar 10 05:38:18 map systemd[1]: Startup finished in 3.616s (kernel) + 20.190s (userspace) = 23.806s.
Mar 10 05:38:27 map systemd[1]: Created slice User Slice of peiman.
Mar 10 05:38:27 map systemd[1]: Starting User Manager for UID 1000...
Mar 10 05:38:27 map systemd[1]: Started Session 1 of user peiman.
Mar 10 05:38:27 map systemd[1617]: Reached target Timers.
Mar 10 05:38:27 map systemd[1617]: Reached target Paths.
Mar 10 05:38:27 map systemd[1617]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Mar 10 05:38:27 map systemd[1617]: Listening on GnuPG cryptographic agent and passphrase cache.
Mar 10 05:38:27 map systemd[1617]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Mar 10 05:38:27 map systemd[1617]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Mar 10 05:38:27 map systemd[1617]: Listening on REST API socket for snapd user session agent.
Mar 10 05:38:27 map systemd[1617]: Listening on GnuPG network certificate management daemon.
Mar 10 05:38:27 map systemd[1617]: Reached target Sockets.
Mar 10 05:38:27 map systemd[1617]: Reached target Basic System.
Mar 10 05:38:27 map systemd[1617]: Reached target Default.
Mar 10 05:38:27 map systemd[1617]: Startup finished in 197ms.
Mar 10 05:38:27 map systemd[1]: Started User Manager for UID 1000.
Mar 10 05:38:19 map systemd-timesyncd[599]: Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com).
Mar 10 05:39:30 map renderd[1559]: DEBUG: Got incoming connection, fd 7, number 1
Mar 10 05:39:30 map renderd[1559]: DEBUG: Got incoming connection, fd 8, number 2
Mar 10 05:39:30 map renderd[1559]: DEBUG: Got incoming connection, fd 9, number 3
Mar 10 05:39:30 map render_list: DEBUG: Sending render cmd(6 default 0/0/0) with protocol version 2 to fd 4
Mar 10 05:39:30 map render_list: DEBUG: Sending render cmd(6 default 1/0/0) with protocol version 2 to fd 3
Mar 10 05:39:30 map renderd[1559]: DEBUG: Got incoming request with protocol version 2
Mar 10 05:39:30 map renderd[1559]: DEBUG: Got command RenderBulk fd(8) xml(default), z(0), x(0), y(0), mime(image/png), options()
Mar 10 05:39:30 map renderd[1559]: DEBUG: Got incoming request with protocol version 2
Mar 10 05:39:30 map renderd[1559]: Received request for map layer 'default' which failed to load
Mar 10 05:39:30 map renderd[1559]: DEBUG: Got command RenderBulk fd(7) xml(default), z(1), x(0), y(0), mime(image/png), options()
Mar 10 05:39:30 map renderd[1559]: DEBUG: Sending render cmd(4 default 0/0/0) with protocol version 2 to fd 8
Mar 10 05:39:30 map renderd[1559]: DEBUG: Failed to read cmd on fd 9
Mar 10 05:39:30 map renderd[1559]: DEBUG: Connection 2, fd 9 closed, now 2 left
Mar 10 05:39:30 map renderd[1559]: Received request for map layer 'default' which failed to load
Mar 10 05:39:30 map renderd[1559]: DEBUG: Sending render cmd(4 default 1/0/0) with protocol version 2 to fd 7
Mar 10 05:39:30 map render_list: DEBUG: Got incoming request with protocol version 2
Mar 10 05:39:30 map render_list: DEBUG: Got incoming request with protocol version 2
Mar 10 05:39:40 map renderd[1559]: DEBUG: Failed to read cmd on fd 7
Mar 10 05:39:40 map renderd[1559]: DEBUG: Connection 0, fd 7 closed, now 1 left
Mar 10 05:39:40 map renderd[1559]: DEBUG: Failed to read cmd on fd 8
Mar 10 05:39:40 map renderd[1559]: DEBUG: Connection 0, fd 8 closed, now 0 left

asked 09 Mar '20, 15:14

peiman2's gravatar image

peiman2
11223
accept rate: 0%

edited 10 Mar '20, 05:45

1

Errors from the renderer will probably be written here:

 /var/log/syslog
(09 Mar '20, 23:12) SomeoneElse ♦

i added the syslog to my post.thank you

(10 Mar '20, 05:46) peiman2

This seems to be the problem:

Mar 10 05:38:17 map renderd[1559]: An error occurred while loading the map layer 'default': Postgis Plugin: FATAL:  role "www-data" does not exist#012Connection string: ' dbname=gis connect_timeout=4'

The renderd process runs with user www-data, but that user does not have access to the PostGIS database. So either you have to create a user www-data in the database and grant it access permissions to the data it wants to access, or you have to configure a different, existing database user in the PostgreSQL connection string.

permanent link

answered 11 Mar '20, 21:33

hfs's gravatar image

hfs
85151525
accept rate: 17%

In addition, you seem to be trying to run render_list as root - I'm not sure why.

(11 Mar '20, 21:49) SomeoneElse ♦

@someoneElse are talking about sudo or something else? i run command without sudo and also run after su tileserver but nothing changed.

(16 Mar '20, 11:10) peiman2

@hfs why the renderd process use 'www-data' i added tileserver user for connect to database.also at this point i dont have to use mode_tile.i need to create tile images locally and save them to hard disk.

(16 Mar '20, 11:13) peiman2

Yes, "sudo render_list" will run that command as root. You would almost never want to do that here.

(16 Mar '20, 12:37) SomeoneElse ♦

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:

×341
×4

question asked: 09 Mar '20, 15:14

question was seen: 2,898 times

last updated: 16 Mar '20, 12:37

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