You are not logged in.

#1 2020-02-27 13:24:51

Bytechanger
Member
Registered: 2009-06-17
Posts: 77

Error on own render machine?!

Hi,

I´ve try to set up my own rendering machine:

https://switch2osm.org/serving-tiles/ma … 18-04-lts/

It doesn´t works. But I´ve got some problems on setting up the different accounts....

in Apache error.log there is:
[Thu Feb 27 12:05:53.877588 2020] [tile:warn] [pid 68476:tid 140683188856576] [client 192.168.1.168:54102] socket connect failed for: /var/run/renderd/renderd.sock with reason: Connection refused
[Thu Feb 27 12:05:53.877631 2020] [tile:notice] [pid 68476:tid 140683188856576] [client 192.168.1.168:54102] Failed to connect to renderer
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
[Thu Feb 27 12:08:04.859798 2020] [tile:warn] [pid 68476:tid 140683163678464] [client 192.168.1.168:54106] socket connect failed for: /var/run/renderd/renderd.sock with reason: Connection refused
[Thu Feb 27 12:08:04.859835 2020] [tile:notice] [pid 68476:tid 140683163678464] [client 192.168.1.168:54106] Failed to connect to renderer
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
[Thu Feb 27 12:16:47.429907 2020] [tile:warn] [pid 68476:tid 140683146893056] [client 192.168.1.168:54131] socket connect failed for: /var/run/renderd/renderd.sock with reason: Connection refused
[Thu Feb 27 12:16:47.429944 2020] [tile:notice] [pid 68476:tid 140683146893056] [client 192.168.1.168:54131] Failed to connect to renderer
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile


Can someone help me?

Greets

Byte

Offline

#2 2020-02-27 13:37:50

SomeoneElse
Member
Registered: 2010-10-13
Posts: 1,496

Re: Error on own render machine?!

Permissions perhaps?  Can you check the ownership of /var/run/renderd/renderd.sock and compare that with the account that you are trying to access it with?  If you're following those instructions I'd expect both to be "renderaccount".

Offline

#3 2020-02-27 13:52:57

Bytechanger
Member
Registered: 2009-06-17
Posts: 77

Re: Error on own render machine?!

Hi,


ls -la /var/run/renderd/renderd.sock
srwxrwxrwx 1 renderaccount renderaccount 0 Feb 27 12:43 /var/run/renderd/renderd.sock


>and compare that with the account that you are trying to access it with?
That´s my problem, apache2 is accessing the data, correct?
Where can I see with wich account?
I think it is www-data. On howto, there is no change of user, correct?

Greets

Byte

Last edited by Bytechanger (2020-02-27 13:54:40)

Offline

#4 2020-02-27 14:08:10

SomeoneElse
Member
Registered: 2010-10-13
Posts: 1,496

Re: Error on own render machine?!

Bytechanger wrote:

I think it is www-data. On howto, there is no change of user, correct?

The "Running renderd in the background" talks about /etc/init.d/renderd (and the systemd service file that references it).  In there is a "RUNASUSER" setting.  On a server of mine:

ps -ef | grep -i renderd
rendera+  1883     1  0 Feb23 ?        00:44:42 /usr/local/bin/renderd -c /usr/local/etc/renderd.conf

matches

grep RUNASUSER= /etc/init.d/renderd
RUNASUSER=renderaccount

Offline

#5 2020-02-27 14:26:07

Bytechanger
Member
Registered: 2009-06-17
Posts: 77

Re: Error on own render machine?!

I run renderd manualy in putty,

so I´m logged in as renderaccount, start renderd with

renderd -f -c /usr/local/etc/renderd.conf

when I access over http to apache http://ip/hot/0/0/0.png
I get following output in renderd:

Mapnik LOG> 2020-02-27 13:41:12: warning: unable to find face-name 'HanaMinB Regular' in FontSet 'fontset-2'
Mapnik LOG> 2020-02-27 13:41:12: warning: unable to find face-name 'unifont Medium' in FontSet 'fontset-2'
renderd[18016]: An error occurred while loading the map layer 'ajt': Postgis Plugin: ERROR:  permission denied for relation plan                                et_osm_polygon
in executeQuery Full sql was: 'SELECT ST_SRID("way") AS srid FROM planet_osm_polygon WHERE "way" IS NOT NULL LIMIT 1;'
  encountered during parsing of layer 'landcover-low-zoom' in Layer at line 822 of '/home/renderaccount/src/openstreetmap-carto/                                mapnik.xml'
renderd[18016]: An error occurred while loading the map layer 'ajt': Postgis Plugin: ERROR:  permission denied for relation plan                                et_osm_polygon
in executeQuery Full sql was: 'SELECT ST_SRID("way") AS srid FROM planet_osm_polygon WHERE "way" IS NOT NULL LIMIT 1;'
  encountered during parsing of layer 'landcover-low-zoom' in Layer at line 822 of '/home/renderaccount/src/openstreetmap-carto/                                mapnik.xml'
renderd[18016]: DEBUG: Got incoming connection, fd 8, number 1
renderd[18016]: DEBUG: Got incoming request with protocol version 2
renderd[18016]: DEBUG: Got command RenderPrio fd(8) xml(ajt), z(0), x(0), y(0), mime(image/png), options()
renderd[18016]: Received request for map layer 'ajt' which failed to load
renderd[18016]: DEBUG: Sending render cmd(4 ajt 0/0/0) with protocol version 2 to fd 8
renderd[18016]: DEBUG: Connection 0, fd 8 closed, now 0 left

===================================================================================================
EDIT:
Now setting als background-service:

ps -ef | grep -i renderd
rendera+  17048      1  0 13:30 ?        00:00:00 /usr/local/bin/renderd -c /usr/local/etc/renderd.conf

grep RUNASUSER= /etc/init.d/renderd
RUNASUSER=renderaccount
After that, I get no error.log error, but no tile picture!

systemctl status renderd shows

An error occurred while loading the map layer 'ajt': Postgis Plugin: ERROR:  permission denied for relation planet_osm_polyg
                                    in executeQuery Full sql was: 'SELECT ST_SRID("way") AS srid FROM planet_osm_polygon WHERE "way" IS NOT NULL LIMIT 1;'
                                      encountered during parsing of layer 'landcover-low-zoom' in Layer at line 822 of '/home/renderaccount/src/openstreetmap-ca


Now it seems, that I have also problems with accessing database:

osm2pgsql -d gis --create --slim  -G --hstore --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua -C 2500 --number-processes 1 -S ~/src/openstreetmap-carto/openstreetmap-carto.style ~/data/azerbaijan-latest.osm.pbf
osm2pgsql version 1.2.0 (1.2.0-265-gb686bf2) (64 bit id space)

Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=2500MB, maxblocks=40000*65536, allocation method=11
Mid: pgsql, cache=2500
Setting up table: planet_osm_nodes
SQL command failed: ERROR:  must be owner of relation planet_osm_nodes

Full query: DROP TABLE IF EXISTS planet_osm_nodes CASCADE
node cache: stored: 0(0.00%), storage efficiency: 0.00% (dense blocks: 0, sparse nodes: 0), hit rate: 0.00%
Osm2pgsql failed due to ERROR: Executing SQL



Greets

Byte

Last edited by Bytechanger (2020-02-27 15:46:54)

Offline

#6 2020-02-27 16:31:14

SomeoneElse
Member
Registered: 2010-10-13
Posts: 1,496

Re: Error on own render machine?!

I'm guessing that "permission denied for relation planet_osm_polygon" means that there are still some permissions issues in there somewhere?  Maybe try reloading the data (just a small area first) and see if you can render that?

Offline

#7 2020-02-27 16:56:22

Bytechanger
Member
Registered: 2009-06-17
Posts: 77

Re: Error on own render machine?!

OK,
I will try.

How do I drop data in database?

I think my steps are:
1. drop database (how??)
2. osm2pgsql -d gis --create --slim  -G --hstore --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua -C 2500 --number-processes 1 -S ~/src/openstreetmap-carto/openstreetmap-carto.style ~/data/azerbaijan-latest.osm.pbf
with rederaccount user ?

Greets

Byte

Offline

#8 2020-02-27 20:46:53

SomeoneElse
Member
Registered: 2010-10-13
Posts: 1,496

Re: Error on own render machine?!

Doing the "osm2pgsql -d gis --create" will throw away the previous contents of the database.  If you don't get any errors writing to it as renderaccount you probably won't get any reading it later.

If you need  to explicitly drop it (and perhaps redo some earlier steps) then there's some Postgres documentation over at https://www.postgresql.org/docs/12/sql- … abase.html .

Offline

#9 2020-04-24 03:20:49

JooWoo
New Member
Registered: 2020-04-24
Posts: 1

Re: Error on own render machine?!

Hi

I'm really having the same problem

How did you solve it?

Nothing is written as 404error...............

Offline

Board footer

Powered by FluxBB