linux – 我收到一个错误,说套接字绑定失败:/var/run/renderd/renderd.sock如果我是普通用户,其他一切正常吗?

前端之家收集整理的这篇文章主要介绍了linux – 我收到一个错误,说套接字绑定失败:/var/run/renderd/renderd.sock如果我是普通用户,其他一切正常吗?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试按照switch2osm.org上的说明手动构建地图服务器.我配置了一切.我有一个数据库mayank由用户mayank拥有,我试图使用renderd但我得到此错误套接字绑定失败:/var/run/renderd/renderd.sock.现在,如果我切换到root并执行相同操作它完全没有直接权限问题,因为我已经递归地更改了目录的所有者.但可能存在一些中间许可问题.我无法以root身份运行它,因为我正在使用psql而我的所有者为数据库mayank是我的用户mayank,这导致没有tile被渲染.我不想重新安装我的操作系统,但要认真理解这个问题的原因.请帮助我是openstreetmaps和 Linux的新手.
以下是我的流程的确切代码
mayank@DC050:~$renderd
socket bind Failed for: /var/run/renderd/renderd.sock
mayank@DC050:~$sudo renderd
sudo: /var/lib/sudo owned by uid 1000,should be uid 0
[sudo] password for mayank: 
mayank@DC050:~$

mayank@DC050:~$renderd -f -c /usr/local/etc/renderd.conf
renderd[9178]: Rendering daemon started
renderd[9178]: Initiating reqyest_queue
iniparser: Syntax error in /usr/local/etc/renderd.conf (8):
-> ;[renderd01]
iniparser: Syntax error in /usr/local/etc/renderd.conf (15):
-> ;[renderd02]
iniparser: Syntax error in /usr/local/etc/renderd.conf (33):
-> ;** config options used by mod_tile,but not renderd **
iniparser: Syntax error in /usr/local/etc/renderd.conf (42):
-> ;[style2]
iniparser: Syntax error in /usr/local/etc/renderd.conf (49):
-> ;** config options used by mod_tile,but not renderd **
renderd[9178]: Parsing section renderd
renderd[9178]: Parsing render section 0
renderd[9178]: Parsing section mapnik
renderd[9178]: Parsing section default
renderd[9178]: config renderd: unix socketname=/var/run/renderd/renderd.sock
renderd[9178]: config renderd: num_threads=4
renderd[9178]: config renderd: num_slaves=0
renderd[9178]: config renderd: tile_dir=/var/lib/mod_tile
renderd[9178]: config renderd: stats_file=/var/run/renderd/renderd.stats
renderd[9178]: config mapnik:  plugins_dir=/usr/local/lib/mapnik/input
renderd[9178]: config mapnik:  font_dir=/usr/local/lib64/mapnik/fonts
renderd[9178]: config mapnik:  font_dir_recurse=1
renderd[9178]: config renderd(0): Active
renderd[9178]: config renderd(0): unix socketname=/var/run/renderd/renderd.sock
renderd[9178]: config renderd(0): num_threads=4
renderd[9178]: config renderd(0): tile_dir=/var/lib/mod_tile
renderd[9178]: config renderd(0): stats_file=/var/run/renderd/renderd.stats
renderd[9178]: config map 0:   name(default) file(/home/mayank/src/mapnik-style/osm.xml) uri(/osm_tiles/) htcp() host(localhost)
renderd[9178]: Initialising unix server socket on /var/run/renderd/renderd.sock
socket bind Failed for: /var/run/renderd/renderd.sock

下面是root用户,但是这个过程没有生成任何tile,可能是因为数据库的事情

renderd -f -c /usr/local/etc/renderd.conf
renderd[9347]: Rendering daemon started
renderd[9347]: Initiating reqyest_queue
iniparser: Syntax error in /usr/local/etc/renderd.conf (8):
-> ;[renderd01]
iniparser: Syntax error in /usr/local/etc/renderd.conf (15):
-> ;[renderd02]
iniparser: Syntax error in /usr/local/etc/renderd.conf (33):
-> ;** config options used by mod_tile,but not renderd **
renderd[9347]: Parsing section renderd
renderd[9347]: Parsing render section 0
renderd[9347]: Parsing section mapnik
renderd[9347]: Parsing section default
renderd[9347]: config renderd: unix socketname=/var/run/renderd/renderd.sock
renderd[9347]: config renderd: num_threads=4
renderd[9347]: config renderd: num_slaves=0
renderd[9347]: config renderd: tile_dir=/var/lib/mod_tile
renderd[9347]: config renderd: stats_file=/var/run/renderd/renderd.stats
renderd[9347]: config mapnik:  plugins_dir=/usr/local/lib/mapnik/input
renderd[9347]: config mapnik:  font_dir=/usr/local/lib64/mapnik/fonts
renderd[9347]: config mapnik:  font_dir_recurse=1
renderd[9347]: config renderd(0): Active
renderd[9347]: config renderd(0): unix socketname=/var/run/renderd/renderd.sock
renderd[9347]: config renderd(0): num_threads=4
renderd[9347]: config renderd(0): tile_dir=/var/lib/mod_tile
renderd[9347]: config renderd(0): stats_file=/var/run/renderd/renderd.stats
renderd[9347]: config map 0:   name(default) file(/home/mayank/src/mapnik-style/osm.xml) uri(/osm_tiles/) htcp() host(localhost)
renderd[9347]: Initialising unix server socket on /var/run/renderd/renderd.sock
renderd[9347]: Created server socket 5
renderd[9347]: Renderd is using mapnik version 2.0.3
renderd[9347]: Unable to open font directory: /usr/local/lib64/mapnik/fonts
Running in foreground mode...
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[9347]: 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[9347]: Using web mercator projection settings
renderd[9347]: Using web mercator projection settings
renderd[9347]: Using web mercator projection settings
renderd[9347]: Using web mercator projection settings

解决方法

我遇到了几乎同样的问题.据我所知,这背后可能有两个原因.尝试再次运行
sudo -u 'username' renderd -f -c /usr/local/etc/renderd.conf

在应用建议的解决方案之一后.将’username’替换为运行renderd的用户名

导致#1缺少写作权

您可能没有/var/run/renderd/renderd.sock文件的书面权限.

您的解决方案是更改目录的所有者:

sudo chown 'username' /var/run/renderd

和/或通过键入来更改文件的所有者

sudo chown 'username' /var/run/renderd/renderd.sock

,’username’代表将运行renderd的用户.

原因#2缺少目录

我有几乎相同的错误信息.

在我的情况下,我错过了/ var / run / renderd目录.我的解决方案是创建/ var / run / renderd目录,然后更改其所有者:

sudo mkdir /var/run/renderd
sudo chown 'username' /var/run/renderd

,’username’是user,将运行renderd.

猜你在找的Linux相关文章