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 / 问题

问题[503-error](server)

Martin Hope
SRedouane
Asked: 2022-04-05 08:18:58 +0800 CST

具有相同请求的 HAProxy 有时会在后端启动时以 NOSRV 响应

  • 0

我向 haproxy 发出相同的请求(POST /user/oauth),但有时我得到 503,直接向后端发送请求总是有效

这是日志:

  1. local_server~ app/s2 0/0/0/100/100 200 813 - - --VN 1/1/0/0/0 0/0 "POST /user/oauth HTTP/1.1"
  2. local_server~ app/s1 0/0/1/107/108 200 820 - - --NI 1/1/0/0/0 0/0 "POST /user/oauth HTTP/1.1"
  3. local_server~ app/NOSRV 0/-1/-1/-1/0 503 216 - - SCNN 1/1/0/0/0 0/0 "POST /user/oauth HTTP/1.1"
  4. local_server~ app/NOSRV 0/-1/-1/-1/0 503 216 - - SCNN 1/1/0/0/0 0/0 "POST /user/oauth HTTP/1.1"
  5. local_server~ app/s2 0/0/1/106/107 200 831 - - --NI 2/2/0/0/0 0/0 "POST /user/oauth HTTP/1.1"
  6. local_server~ app/s1 0/0/1/3/6206 101 337 - - --NI 3/3/1/1/0 0/0 “GET / HTTP/1.1”
  7. local_server~ app/s1 0/0/1/83/84 200 258 - - --VN 2/2/0/0/0 0/0 "POST /transaction/concludeTransaction HTTP/1.1"
  8. local_server~ app/NOSRV 0/-1/-1/-1/0 503 216 - - SCNN 1/1/0/0/0 0/0 "POST /user/oauth HTTP/1.1"
  9. local_server~ app/s2 0/0/1/107/108 200 831 - - --NI 1/1/0/0/0 0/0 "POST /user/oauth HTTP/1.1"

如您所见,POST /user/oauth 有时会转到 s1,有时会转到 s2,有时会转到 NOSRV。

有时它连续通过 10 次,有时它连续失败 10 次。

这是我的配置:

defaults
log     global
mode    http
option  httplog
option  dontlognull
timeout connect 10000
timeout client  50000
timeout server  50000
retries 3
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http

frontend local_server
bind *:8080 ssl crt /etc/letsencrypt/live/xxx/sslcert.pem
mode http
default_backend app

backend app
balance roundrobin
cookie SERVERID insert indirect nocache
http-send-name-header Host
server s1 172.26.13.134:3000 check cookie s1
server s2 172.26.13.134:3000 check cookie s2
http-request add-header X-Server %b

编辑:

我确实将请求重定向到在本地主机上运行的快速 python 服务器,但问题仍然存在。所以我确实编辑了 haproxy 配置文件,只有服务器 s1 127.0.0.1:8086 检查 cookie s1

并运行 python 脚本: python3 -m http.server 8086 --bind 127.0.0.1&

当我从邮递员那里击中时,我连续获得了 3 次成功,而不是 503。

503-error haproxy
  • 1 个回答
  • 372 Views
Martin Hope
Erich
Asked: 2022-03-05 05:55:22 +0800 CST

Varnish 4.1 - 如何在后端获取时提供缓存副本失败而不是 503

  • 0

我有一个由 apache+tomcat 提供的站点和一个由 Varnish 4.1 提供的缓存

当 apache 关闭时,varnish 总是返回 503 错误。
我希望清漆返回它在缓存中的页面副本,但我对 ttl 和 Grace 的尝试没有成功。
我想我已经阅读了我能找到的所有关于 varnish 4.1 的文档,非常感谢任何帮助。

提前致谢

编辑: varnishlog -g request -q "ReqUrl eq '/'"

卷曲

*   << Request  >> 1410492
-   Begin          req 1410491 rxreq
-   Timestamp      Start: 1646995409.603391 0.000000 0.000000
-   Timestamp      Req: 1646995409.603391 0.000000 0.000000
-   ReqStart       10.xxx.xxx.xxx 57472
-   ReqMethod      GET
-   ReqURL         /
-   ReqProtocol    HTTP/1.1
-   ReqHeader      host: akamai5.rsi.ch
-   ReqHeader      user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0
-   ReqHeader      accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
-   ReqHeader      accept-language: it,en-US;q=0.7,en;q=0.3
-   ReqHeader      accept-encoding: gzip, deflate, br
-   ReqHeader      cookie: wt_rla=292330999892453%2C2%2C1646731482026; _pipe_c=do_not_track; _ga=GA1.2.836346559.1644414441; __gads=ID=453223b8518b57e5-22f191e137cd00c3:T=1644414444:RT=1644414444:S=ALNI_MbCUi8liJ5sbhjlTe68z1BhLhZJCQ; __utma=46365988.836346559.1644414441.16
-   ReqHeader      upgrade-insecure-requests: 1
-   ReqHeader      sec-fetch-dest: document
-   ReqHeader      sec-fetch-mode: navigate
-   ReqHeader      sec-fetch-site: none
-   ReqHeader      sec-fetch-user: ?1
-   ReqHeader      cache-control: max-age=0
-   ReqHeader      x-forwarded-proto: https
-   ReqHeader      x-forwarded-ssl: on
-   ReqHeader      x-forwarded-port: 443
-   ReqHeader      x-forwarded-for: 1178.xxx.xxx.xxx
-   ReqHeader      connection: close
-   ReqUnset       x-forwarded-for: 1178.xxx.xxx.xxx
-   ReqHeader      X-Forwarded-For: 1178.xxx.xxx.xxx, 10.xxx.xxx.xxx
-   VCL_call       RECV
-   ReqUnset       cookie: wt_rla=292330999892453%2C2%2C1646731482026; _pipe_c=do_not_track; _ga=GA1.2.836346559.1644414441; __gads=ID=453223b8518b57e5-22f191e137cd00c3:T=1644414444:RT=1644414444:S=ALNI_MbCUi8liJ5sbhjlTe68z1BhLhZJCQ; __utma=46365988.836346559.1644414441.16
-   ReqHeader      Cookie: wt_rla=292330999892453%2C2%2C1646731482026; _pipe_c=do_not_track; _ga=GA1.2.836346559.1644414441; __gads=ID=453223b8518b57e5-22f191e137cd00c3:T=1644414444:RT=1644414444:S=ALNI_MbCUi8liJ5sbhjlTe68z1BhLhZJCQ; cs_fpid=1645804349272_22538249; wt_geid
-   ReqUnset       Cookie: wt_rla=292330999892453%2C2%2C1646731482026; _pipe_c=do_not_track; _ga=GA1.2.836346559.1644414441; __gads=ID=453223b8518b57e5-22f191e137cd00c3:T=1644414444:RT=1644414444:S=ALNI_MbCUi8liJ5sbhjlTe68z1BhLhZJCQ; cs_fpid=1645804349272_22538249; wt_geid
-   ReqHeader      Cookie: wt_rla=292330999892453%2C2%2C1646731482026; _pipe_c=do_not_track; _ga=GA1.2.836346559.1644414441; __gads=ID=453223b8518b57e5-22f191e137cd00c3:T=1644414444:RT=1644414444:S=ALNI_MbCUi8liJ5sbhjlTe68z1BhLhZJCQ; cs_fpid=1645804349272_22538249; wt_geid
-   ReqUnset       Cookie: wt_rla=292330999892453%2C2%2C1646731482026; _pipe_c=do_not_track; _ga=GA1.2.836346559.1644414441; __gads=ID=453223b8518b57e5-22f191e137cd00c3:T=1644414444:RT=1644414444:S=ALNI_MbCUi8liJ5sbhjlTe68z1BhLhZJCQ; cs_fpid=1645804349272_22538249; wt_geid
-   ReqHeader      Cookie: wt_rla=292330999892453%2C2%2C1646731482026; _pipe_c=do_not_track; _ga=GA1.2.836346559.1644414441; __gads=ID=453223b8518b57e5-22f191e137cd00c3:T=1644414444:RT=1644414444:S=ALNI_MbCUi8liJ5sbhjlTe68z1BhLhZJCQ; cs_fpid=1645804349272_22538249; wt_geid
-   VCL_return     hash
-   ReqUnset       accept-encoding: gzip, deflate, br
-   ReqHeader      Accept-Encoding: gzip
-   VCL_call       HASH
-   VCL_return     lookup
-   Hit            1410469
-   VCL_call       HIT
-   VCL_return     deliver
-   RespProtocol   HTTP/1.1
-   RespStatus     200
-   RespReason     OK
-   RespHeader     Date: Fri, 11 Mar 2022 10:42:05 GMT
-   RespHeader     Server: Apache-Coyote/1.1
-   RespHeader     Content-Type: text/html;charset=UTF-8
-   RespHeader     Set-Cookie: JSESSIONID=F8D07853DF7D90A3F381B316F64FA285; Path=/; HttpOnly
-   RespHeader     X-Varnish: 1410492 1410469
-   RespHeader     Age: 84
-   RespHeader     Via: 1.1 varnish-v4
-   VCL_call       DELIVER
-   RespHeader     X-Cache-Host: rsi-prod-varnish45
-   RespHeader     X-Frame-Options: SAMEORIGIN
-   RespHeader     X-XSS-Protection: 1; mode=block
-   RespHeader     X-Content-Type-Options: nosniff
-   RespHeader     Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval' *
-   RespHeader     X-Cache: HIT
-   RespHeader     X-Cache-Hits: 3
-   RespHeader     X-Grace-Hit: yes
-   VCL_return     deliver
-   Timestamp      Process: 1646995409.603614 0.000222 0.000222
-   RespHeader     Accept-Ranges: bytes
-   RespHeader     Content-Length: 191244
-   Debug          "RES_MODE 2"
-   RespHeader     Connection: close
-   Timestamp      Resp: 1646995409.608024 0.004632 0.004410
-   ReqAcct        1130 0 1130 574 191244 191818
-   End

浏览器

*   << Request  >> 1410496
-   Begin          req 1410495 rxreq
-   Timestamp      Start: 1646995426.730217 0.000000 0.000000
-   Timestamp      Req: 1646995426.730217 0.000000 0.000000
-   ReqStart       10.xxx.xxx.xxx 60908
-   ReqMethod      GET
-   ReqURL         /
-   ReqProtocol    HTTP/1.1
-   ReqHeader      host: www.example.com
-   ReqHeader      user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0
-   ReqHeader      accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
-   ReqHeader      accept-language: it,it-IT;q=0.8,en-US;q=0.5,en;q=0.3
-   ReqHeader      accept-encoding: gzip, deflate, br
-   ReqHeader      cookie: _pipe_c=do_not_track; _ga=GA1.2.1217589648.1620392041; __gads=ID=1a22b33c44d55e6f-1a22b33c44d55e6f:T=1620392042:RT=1620392042:S=ALNI_MYR9nyXrxcQ8QV1Y2pNVDp67Gn9-w; __utma=46365988.1217589648.1620392041.1638545296.1642173864.10; __utmz=46365988.16
-   ReqHeader      upgrade-insecure-requests: 1
-   ReqHeader      cache-control: max-age=0
-   ReqHeader      x-forwarded-proto: https
-   ReqHeader      x-forwarded-ssl: on
-   ReqHeader      x-forwarded-port: 443
-   ReqHeader      x-forwarded-for: 178.xxx.xxx.xxx
-   ReqHeader      connection: close
-   ReqUnset       x-forwarded-for: 178.xxx.xxx.xxx
-   ReqHeader      X-Forwarded-For: 178.xxx.xxx.xxx, 10.xxx.xxx.xxx
-   VCL_call       RECV
-   ReqUnset       cookie: _pipe_c=do_not_track; _ga=GA1.2.1217589648.1620392041; __gads=ID=1a22b33c44d55e6f-1a22b33c44d55e6f:T=1620392042:RT=1620392042:S=ALNI_MYR9nyXrxcQ8QV1Y2pNVDp67Gn9-w; __utma=46365988.1217589648.1620392041.1638545296.1642173864.10; __utmz=46365988.16
-   ReqHeader      Cookie: _pipe_c=do_not_track; _ga=GA1.2.1217589648.1620392041; __gads=ID=1a22b33c44d55e6f-1a22b33c44d55e6f:T=1620392042:RT=1620392042:S=ALNI_MYR9nyXrxcQ8QV1Y2pNVDp67Gn9-w; wt_rla=292330999892453%2C2%2C1646995242972; cs_fpid=1645855325408_55998969; JSESSI
-   ReqUnset       Cookie: _pipe_c=do_not_track; _ga=GA1.2.1217589648.1620392041; __gads=ID=1a22b33c44d55e6f-1a22b33c44d55e6f:T=1620392042:RT=1620392042:S=ALNI_MYR9nyXrxcQ8QV1Y2pNVDp67Gn9-w; wt_rla=292330999892453%2C2%2C1646995242972; cs_fpid=1645855325408_55998969; JSESSI
-   ReqHeader      Cookie: _pipe_c=do_not_track; _ga=GA1.2.1217589648.1620392041; __gads=ID=1a22b33c44d55e6f-1a22b33c44d55e6f:T=1620392042:RT=1620392042:S=ALNI_MYR9nyXrxcQ8QV1Y2pNVDp67Gn9-w; wt_rla=292330999892453%2C2%2C1646995242972; cs_fpid=1645855325408_55998969; JSESSI
-   ReqUnset       Cookie: _pipe_c=do_not_track; _ga=GA1.2.1217589648.1620392041; __gads=ID=1a22b33c44d55e6f-1a22b33c44d55e6f:T=1620392042:RT=1620392042:S=ALNI_MYR9nyXrxcQ8QV1Y2pNVDp67Gn9-w; wt_rla=292330999892453%2C2%2C1646995242972; cs_fpid=1645855325408_55998969; JSESSI
-   ReqHeader      Cookie: _pipe_c=do_not_track; _ga=GA1.2.1217589648.1620392041; __gads=ID=1a22b33c44d55e6f-1a22b33c44d55e6f:T=1620392042:RT=1620392042:S=ALNI_MYR9nyXrxcQ8QV1Y2pNVDp67Gn9-w; wt_rla=292330999892453%2C2%2C1646995242972; cs_fpid=1645855325408_55998969; JSESSI
-   VCL_return     hash
-   ReqUnset       accept-encoding: gzip, deflate, br
-   ReqHeader      Accept-Encoding: gzip
-   VCL_call       HASH
-   VCL_return     lookup
-   VCL_call       MISS
-   VCL_return     fetch
-   Link           bereq 1410497 fetch
-   Timestamp      Fetch: 1646995426.730455 0.000238 0.000238
-   RespProtocol   HTTP/1.1
-   RespStatus     503
-   RespReason     Backend fetch failed
-   RespHeader     Date: Fri, 11 Mar 2022 10:43:46 GMT
-   RespHeader     Server: Varnish
-   RespHeader     Content-Type: text/html; charset=utf-8
-   RespHeader     Retry-After: 5
-   RespHeader     X-Varnish: 1410496
-   RespHeader     Age: 0
-   RespHeader     Via: 1.1 varnish-v4
-   VCL_call       DELIVER
-   RespHeader     X-Cache-Host: rsi-prod-varnish45
-   RespHeader     X-Frame-Options: SAMEORIGIN
-   RespHeader     X-XSS-Protection: 1; mode=block
-   RespHeader     X-Content-Type-Options: nosniff
-   RespHeader     Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval' *
-   RespHeader     X-Cache: HIT
-   RespHeader     X-Cache-Hits: 0
-   RespHeader     X-Grace-Hit: yes
-   VCL_return     deliver
-   Timestamp      Process: 1646995426.730495 0.000278 0.000040
-   RespHeader     Content-Length: 284
-   Debug          "RES_MODE 2"
-   RespHeader     Connection: close
-   Timestamp      Resp: 1646995426.730527 0.000310 0.000032
-   ReqAcct        929 0 929 490 284 774
-   End
**  << BeReq    >> 1410497
--  Begin          bereq 1410496 fetch
--  Timestamp      Start: 1646995426.730367 0.000000 0.000000
--  BereqMethod    GET
--  BereqURL       /
--  BereqProtocol  HTTP/1.1
--  BereqHeader    host: www.example.com
--  BereqHeader    user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0
--  BereqHeader    accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
--  BereqHeader    accept-language: it,it-IT;q=0.8,en-US;q=0.5,en;q=0.3
--  BereqHeader    upgrade-insecure-requests: 1
--  BereqHeader    x-forwarded-proto: https
--  BereqHeader    x-forwarded-ssl: on
--  BereqHeader    x-forwarded-port: 443
--  BereqHeader    X-Forwarded-For: 178.xxx.xxx.xxx, 10.xxx.xxx.xxx
--  BereqHeader    Cookie: _pipe_c=do_not_track; _ga=GA1.2.1217589648.1620392041; __gads=ID=1a22b33c44d55e6f-1a22b33c44d55e6f:T=1620392042:RT=1620392042:S=ALNI_MYR9nyXrxcQ8QV1Y2pNVDp67Gn9-w; wt_rla=292330999892453%2C2%2C1646995242972; cs_fpid=1645855325408_55998969; JSESSI
--  BereqHeader    Accept-Encoding: gzip
--  BereqHeader    X-Varnish: 1410497
--  VCL_call       BACKEND_FETCH
--  VCL_Log        Backend fetch: v_ssl_ece
--  VCL_return     fetch
--  FetchError     Director v_ssl_ece returned no backend
--  FetchError     No backend
--  Timestamp      Beresp: 1646995426.730387 0.000020 0.000020
--  Timestamp      Error: 1646995426.730390 0.000023 0.000003
--  BerespProtocol HTTP/1.1
--  BerespStatus   503
--  BerespReason   Service Unavailable
--  BerespReason   Backend fetch failed
--  BerespHeader   Date: Fri, 11 Mar 2022 10:43:46 GMT
--  BerespHeader   Server: Varnish
--  VCL_call       BACKEND_ERROR
--  BerespHeader   Content-Type: text/html; charset=utf-8
--  BerespHeader   Retry-After: 5
--  VCL_return     deliver
--  Storage        malloc Transient
--  ObjProtocol    HTTP/1.1
--  ObjStatus      503
--  ObjReason      Backend fetch failed
--  ObjHeader      Date: Fri, 11 Mar 2022 10:43:46 GMT
--  ObjHeader      Server: Varnish
--  ObjHeader      Content-Type: text/html; charset=utf-8
--  ObjHeader      Retry-After: 5
--  Length         284
--  BereqAcct      0 0 0 0 0 0
--  End

编辑 2:哈希和 cookie

经过大量调查,我们发现问题出在此配置上:

sub vcl_hash {
  hash_data( req.url );
  if( req.http.host ) {
    hash_data( req.http.host );
  } else {
    hash_data( server.ip );
  }
  # hash cookies for object with auth
  if( req.http.Cookie ) {
    hash_data( req.http.Cookie );
  }
  return( lookup );
}

如果 cookie 从清漆散列中删除,它会正确返回缓存。将 cookie 包含在哈希中是否有用?乍一看,我认为是这样,如果使用 cookie 来跟踪用户身份验证。我们如何才能在散列中只包含某些 cookie(例如来自经过身份验证的会话的那些),而不包含那些对缓存无用的 cookie(例如与分析相关的那些)?

503-error varnish
  • 1 个回答
  • 252 Views
Martin Hope
O. R. Mapper
Asked: 2016-08-17 07:39:08 +0800 CST

如何无痕调试错误 503?

  • 3

我正在开发一个带有 C# 后端的大型 Web 应用程序。在开发设置中,应用程序通过我机器上的 IIS 8.5 实例提供服务。

从最近开始,我不能再登录了。我仍然得到登录表单,但是一旦我在输入我的用户数据后单击登录,Chrome 的网络视图就会显示请求得到了响应,并出现了来自服务器的错误 503 /服务不可用响应。

我在 IIS 管理器中为整个站点启用了 200 到 999 之间的所有状态代码的失败请求跟踪,并且我在 IIS 管理器的站点栏的配置设置中启用了失败的请求跟踪。

与检索登录表单相关的所有请求都已正确记录到,但单击登录按钮C:\inetpub\logs\FailedReqLogFiles\W3SVC1时不会出现单个请求日志文件。

根据公司政策,我无权访问处理登录请求的代码源,并且所有这样做的人目前和未来两周都在暑假 - 但因为没有请求日志,我以某种方式怀疑特定请求永远不会达到甚至触及我们的 Web 应用程序的程度。

如何找出导致 503 响应的原因?

iis 503-error iis-8.5
  • 1 个回答
  • 4687 Views
Martin Hope
igor-so
Asked: 2016-08-03 07:27:04 +0800 CST

Apache 存档返回 http 错误 503

  • 0

我在 Windows Server 2012 R2 下使用 apache Archiva v. 2.2.0。使用 Java 版本 1.8.0_60 一切正常。更新到 1.8.0_101_b13 后,我在访问档案 url: HTTP ERROR: 503 时收到一条错误消息。访问 / 时出现问题。原因:服务不可用,由 Jetty:// 提供支持。

Apache Archiva 服务正在运行。不生成错误日志。重新启动甚至重新安装服务都没有影响。

谢谢你的任何提示。

jetty 503-error
  • 1 个回答
  • 1592 Views
Martin Hope
CGriffin
Asked: 2016-06-06 13:02:33 +0800 CST

Ubuntu Apache Server 503 错误:禁用连接(本地主机)

  • 4

在这里有点束缚。我正在尝试将网站 (www.monkhouselaw.com) 从一家托管公司转移到我的 Digital Ocean VPS。我已将 DNS 设置更改为:

* -> 107.170.29.18
www -> 107.170.29.18
monkhouselaw -> 107.170.29.18

然后这会指向我的 VPS 上的 Apache 虚拟主机。

目前我只是想在我的服务器上加载一个 PHP 索引页面。一旦它工作,我将带来 WordPress 安装。可悲的是,它,好吧,不工作。

当前访问 www.monkhouselaw.com 会返回 503 错误。我根本无法确定为什么。检查 Apache 错误日志显示:

(111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:3000 (localhost) failed
[Sun Jun 05 16:44:46.900331 2016] [proxy:error] [pid 2207] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s
[Sun Jun 05 16:44:46.900339 2016] [proxy_http:error] [pid 2207] [client 108.63.121.42:51559] AH01114: HTTP: failed to make connection to backend: localhost, referer: (long url)

而且,后来,这个:

[Sun Jun 05 16:45:21.841236 2016] [proxy:error] [pid 2198] AH00940: HTTP: disabled connection for (localhost)

我试过检查 localhost 上的端口 3000 是否正在侦听,但不是. 但是,据我了解,应该有一个预先存在的虚拟主机,它将请求重定向到 3000 端口到 80 端口。该文件是 000-default.conf。该文件比以下内容要多得多,但以下是相关位:

<VirtualHost *:80>
    ...

    LoadModule proxy_module {path-to-modules}/mod_proxy.so 
    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/

    ...       
</VirtualHost>

虽然老实说,我不确定为什么它甚至试图访问端口 3000,因为monkhouselaw 的虚拟主机文件被定向到 80 端口:

<VirtualHost *:80>
    DocumentRoot /var/www/monkhouse
    ServerName monkhouselaw.com
    <Directory "/var/www/monkhouse">
        allow from all
        Options None
        Require all granted
    </Directory>
</VirtualHost>

在这一点上,我不知所措。谷歌搜索显示了很多关于 SELinux 的结果,似乎没有安装。例如,我看到了一些建议,可以键入以下内容:

togglesebool httpd_can_network_connect

这只是向我返回了程序“togglesebool”不存在的消息。

从本质上讲,这是一个我需要解决的严重问题,我已经通过两位数的 Google 结果页面试图找到解决方案,但没有运气。

有人可以提供帮助吗?

ubuntu 503-error localhost apache-2.4
  • 1 个回答
  • 23851 Views
Martin Hope
friedkiwi
Asked: 2010-04-07 06:33:54 +0800 CST

Tomcat IIS 7 集成在所有请求上给出 503 错误

  • 2

在多次尝试在 IIS 7 上安装 Tomcat 之后,我终于设法让它工作了。至少我是这么认为的:-S。通过设置正确的权限,我终于消除了 500 个错误。唯一不起作用的是……提供东西:常规的东西(如 ASP、HTML 文件或目录浏览)或 Tomcat 的东西都不起作用。

这是我的配置:

Worker.properties

# The workers that your plugins should create and work with
#
worker.list=worker1

#------ DEFAULT ajp13 WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.worker1.port=8009
worker.worker1.host=127.0.0.1
worker.worker1.type=ajp13

URIWorkerMap.properties

/|/*=worker1
# Exclude the subdirectory static:
!/static|/*=worker1
# Exclude some suffixes:
!*.html=worker1
!*.asp=worker1

服务器.xml

<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
<Server port="8005" shutdown="SHUTDOWN">

  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
  <Listener className="org.apache.catalina.core.JasperListener" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container", 
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">

    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" 
        maxThreads="150" minSpareThreads="4"/>
    -->


    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" />
    -->           
    <!-- Define a SSL HTTP/1.1 Connector on port 8443
         This connector uses the JSSE configuration, when using APR, the 
         connector should be using the OpenSSL style configuration
         described in the APR documentation -->
    <!--
    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />
    -->

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />


    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">         
    --> 
    <Engine name="Catalina" defaultHost="localhost">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->        

      <!-- The request dumper valve dumps useful debugging information about
           the request and response data received and sent by Tomcat.
           Documentation at: /docs/config/valve.html -->
      <!--
      <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
      -->

      <!-- This Realm uses the UserDatabase configured in the global JNDI
           resources under the key "UserDatabase".  Any edits
           that are performed against this UserDatabase are immediately
           available for use by the Realm.  -->
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>

      <!-- Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
       -->
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
        -->

      </Host>
    </Engine>
  </Service>
</Server>

http://localhost:8080正在工作,我可以查看应用程序并在那里配置它们......

我对 IIS 7 很陌生,我曾经使用 IIS 6。

在此先感谢,伊万

tomcat iis-7 503-error isapi
  • 2 个回答
  • 1968 Views
Martin Hope
mobibob
Asked: 2010-01-07 18:15:57 +0800 CST

如何在 server.xml 中为 Apache - Tomcat 集成配置 uriworkermap.properties?

  • 0

我非常接近完成我的第一个自定义安装,我可以“尝尝它”......我正在关注 Apache Tomcat 安装,并且我有两个服务器并排工作。我的 Apache 服务器配置为公共 IP,并将 HTML 和 XML 页面发送到 Internet。

我的 Tomcat 与 localhost:8080 一起工作,我可以执行示例 JSP、Servlet、Applet 等。

现在我正在互连,因此 Tomcat 可以为 Apache 请求提供 JSP 和后端数据库服务。我找到了 Tomcat 连接器,我可以从日志中验证 URL 是否来自 Internet,因为它会记录在 Apache 日志中,然后发送到 Tomcat,因为我可以在其日志中看到 URL 并解析出组件. 到目前为止,一切都很好……没有发生的是回程——响应。

浏览器现在收到 503 Service Not Available 响应(巨大的进度/成功),我可以看到日志中转储的 ascii/hex 响应。

我认为缺少的部分是将规则配置到服务器配置中。这就是安装文档变得非常模糊的地方。我已经搜索了答案,但它都作为 IIS 答案回来了,这不适用于我的 Apache。

我认为规则是正确的,但我需要知道如何“将它们放入服务器配置中”。我假设该文件位于存储了我的 workers.properties 的 conf/ 文件夹中,并且我猜测该引用位于“server.xml”中——这两点是否正确?它进入 server.xml 的哪个部分以及配置节点的格式如何?

如果我的问题需要更多细节,请回击,我会提供更多。

  • 阿帕奇 2.2
  • Windows XP 5.1.26(古老但已安装所有SP)
  • 雄猫 5.2.7
  • Java / JRE / JSDK 等都是 ~1.4.x、1.5.x 和 1.6.x(如果需要,我将不得不为此挖掘更多)。
  • 连接器是 1.7(我认为)配置为 AJP1.3
  • 所有标准端口
  • 防火墙是带有端口转发的 Netgear
  • 用户 ID / 密码不是默认值
  • 其他的东西 ????

此外,如果有更多关于调试/跟踪此问题的提示 - 我想为我的客户记录下来。

tomcat apache-2.2 503-error ajp connector
  • 1 个回答
  • 5660 Views
Martin Hope
Ankur
Asked: 2009-07-12 05:10:18 +0800 CST

Jetty 7 给出 HTTP 错误:503 - 服务不可用

  • 3

当我尝试启动 Jetty 时收到错误 503。有谁知道这可能意味着什么。我正在运行 Jetty 7 并使用 start.jar 文件启动它。

如果有人知道如何将 Jetty 配置为在 Windows 上工作,那将会很有帮助。谢谢。

startup jetty 503-error
  • 2 个回答
  • 29987 Views
Martin Hope
Edward Tanguay
Asked: 2009-05-30 17:18:36 +0800 CST

什么可能导致 apache/php 托管网站上的随机图像/css 丢失、503 错误?

  • 4

我在共享主机上托管我的 PHP 网站。

一年来效果很好。

上周突然开始乱丢图片,有时候不加载CSS文件,经常报503错误。

我的提供商说这是“流量过多”。

但是既然已经开始发生这种情况,当然流量已经大大减少了,而且还在发生,“交通繁忙”是我觉得有点不合逻辑的原因,因为如果是交通繁忙引起的,减少交通就可以解决问题.

这里有16 张屏幕截图,显示了这张全天从网站上 掉下来的随机图片。http://tanguay.info/web/external/tinfoLoadingErrors.jpg (450K .jpg)

我已将我的站点复制到另一个 Apache/PHP 服务器,并且每次加载都很好。

对于那些有托管 Apache/PHP 站点经验的人:

  • 您认为随机图像丢失等的可能原因是什么?
  • 我可以要求我的提供商检查哪些类型的东西?
  • 我可以检查哪些类型的东西来找到这个问题的原因(例如日志文件、创建某种测试站点等)
apache-2.2 web-server 503-error traffic
  • 5 个回答
  • 4292 Views

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