AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 560518
Accepted
ali haider
ali haider
Asked: 2013-12-11 13:55:21 +0800 CST2013-12-11 13:55:21 +0800 CST 2013-12-11 13:55:21 +0800 CST

HA 代理无法在 Ubuntu 13 上启动

  • 772

我正在尝试通过 sudo 在 ubuntu 13 VM 上启动 HA 代理 1.4.24。我的 haproxy.cfg 文件复制如下。但是,当我使用sudo service haproxy start或尝试sudo /etc/init.d/haproxy start 时,进程无法启动。有关故障排除的任何想法都会有所帮助。配置文件似乎通过了配置测试(sudo haproxy -f haproxy.cfg -c导致“配置文件有效”)。
此外, /etc/init.d 中 haproxy 文件中的Enabled标志设置为 1。端口 80 似乎没有被任何其他服务绑定。

更新: 我在 /etc/init.d/haproxy 文件中将启用标志设置为 1,而不是在 /etc/default/haproxy 文件中 - 修复此更改允许我正常运行 haproxy。

global
    maxconn     25000 # Total Max Connections. This is dependent on ulimit
    daemon
    nbproc      4 # Number of processing cores. Dual Dual-core Opteron is 4 cores for example.

defaults
    mode        http
    clitimeout  60000
    srvtimeout  30000
    contimeout  4000
    timeout http-request 5s  # added to tackle slow http requests
        option abortonclose
        option forwardfor


listen  http_proxy *:80
        #bind *:80
    balance roundrobin # Load Balancing algorithm
    option httpchk
    option forwardfor # This sets X-Forwarded-For
        default_backend bk_web

# Dynamic part of the application
backend bk_web
    ## Define your servers to balance
    balance roundrobin ## change to URL hashing
    cookie MYSRV insert indirect nocache  ## check this NOTE TO SELF
    server server1 0.0.0.0:81 weight 1 maxconn 512 check
    server server2 0.0.0.0:82 weight 1 maxconn 512 check
haproxy
  • 1 1 个回答
  • 3625 Views

1 个回答

  • Voted
  1. Best Answer
    Kindule
    2013-12-11T14:30:29+08:002013-12-11T14:30:29+08:00

    你应该使用

    sh -x /etc/init.d/haproxy start
    

    这将打印调试信息。你错了。

    • 9

相关问题

  • 具有动态路由的代理服务器

  • nginx 访问日志忽略某些请求

  • HAProxy 和“分片”

  • 带有 HAProxy 的远程 IP

  • SSL 网站的高可用性

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve