按照《HAProxy 在 TiDB 中的最佳实践》无法在 aws EC2 instance 上正常启动 haproxy
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 1.2k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 31
Description
Now, please describe your question here:
在haproxy最佳实践的文档中,
-
以下命令在 aws 的 EC2 instance上即使加上 sudo 仍然没有权限执行
echo 'export PATH=/app/haproxy/bin:$PATH' >> /etc/profile -
用上 sudo 和绝对路径启动 haproxy 仍然失败。
$ sudo /home/centos/haproxy/bin/haproxy -f haproxy.cfg.new.cfg
[NOTICE] (7102) : haproxy version is 2.5.0-f2e0833f16
[NOTICE] (7102) : path to executable is /home/centos/haproxy/bin/haproxy
[ALERT] (7102) : [/home/centos/haproxy/bin/haproxy.main()] Cannot chroot(/var/lib/haproxy).
问题:请问以下两个haproxy配置是否有必要,可否去掉已使得最佳实践中的例子足够简单,让客户在不同环境中都能正常启动程序?或者至少补充云上使用的配置文件例子?
chroot /var/lib/haproxy # 更改当前目录并为启动进程设置超级用户权限,从而提高安全性。
pidfile /var/run/haproxy.pid # 将 HAProxy 进程的 PID 写入 pidfile
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the HAProxy best-practices page linked in the issue and review the examples containing chroot and pidfile. Reproduce the reported startup behavior on an AWS EC2 instance or otherwise verify the required paths and permissions. Done means the documentation explains the environment-specific requirements and provides a configuration example that can be followed successfully.
Written by the indexing model from the issue text.
Assessment
- Domain
- devops, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100