Python脚本抛出502.2,但在描述中没有显示错误

2024-04-20 13:01:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我所有的python脚本在调用时运行并返回结果。但是,在本例中,我通过单击第一个脚本中的链接并将参数传递给第二个脚本来调用第一个脚本中的第二个脚本。在过去,在另一台服务器上,它可以完美地工作。暂停之后,这个项目正在重新启动。但是现在第二个脚本抛出了一个502.2,但是没有显示任何实际的错误条件或状态,只有大量的脚本。见下文。如果我在屏幕转储之后立即注释掉行,然后重新运行脚本,直到更远的地方。这一次,它在从Splunk搜索读取数据的循环中中途停止。它在停止前返回3 1/2条记录。我在事件日志中找不到任何内容,也看不到脚本代码本身有任何问题。这是屏幕转储。它似乎不是真的超时,但我不能肯定。它似乎运行良好,然后只是无缘无故地大便了

指定的CGI应用程序没有返回一组完整的HTTP报头,因此行为不正常。 它返回的标题是“服务器场2 Johnstown<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;服务器场#2约翰斯顿<;br/>;内容-Type:text\html<;html>&书信电报;头部>&书信电报;标题>;中端统计信息</标题>&书信电报;链接rel='stylesheet'href='css/table.css'/>&书信电报;样式>;表{字体:0.8em Arial,Helvetica,sans-serif;边框-collapse:collapse; 背景:#e8eef7;颜色:#000;}#它的表{height:280px; overflow:auto; 背景:#c6dbff;填充-bottom:3px; 宽度:635px;}#它的表头{overflow:auto; 背景:#c6dbff;填充-bottom:3px; 宽度:635px;}标题{height:102px; 字体-size:000000.1em; 颜色:#c6dbff;背景:#c6dbff;}caption:hover{字体-size:000000.1em; 颜色:#c6dbff;background:transparent; } th{字体-weight:300;} tr th,tr td{边框-bottom:1px solid #ccc;}表a,表a:链接{text-decoration:none; 颜色:#666;}表a:访问{颜色:#999;}tbody tr th{width:80px; 垂直-align:top; 左填充:50px;background:transparent; } tbody tr td{height:1.7em; 垂直-align:top; 填充-left:10px; background:transparent; } 背景:#fff;}tr th+td+td+td+td{width:60px; 填充-left:20px; 字体-size:0.9em; background:transparent; } tr.odd{背景:#FFFFFF;}tfoot th,tfoot td{height:105px; 字体-weight:bold; height:2.0em; 填充-left:10px; 垂直对齐:top;}t启动{height:102px; 背景:#c6dbff;}t脚部td{height:102px; 背景:#c6dbff;}</样式></头部>&书信电报;车身bgcolor='lightSteelBlue'>&书信电报;h3>&书信电报;div id='content'>&书信电报;img src='images\john2srv.PNG'宽度=75高度=85对齐='中间'/>;服务器场#2约翰斯顿</h3>&书信电报;表>&书信电报;tr bgcolor='lightSteelBlue'>;'

OK, Here


The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are 
"Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Server Farm #2 Johnstown <br />
 Content-Type:text\html <html>
<head>
<title>Mid-Tier Stats</title>
<link rel='stylesheet' href='css/table.css' />
<style> table {
 font: 0.8em Arial, Helvetica, sans-serif;
 border-collapse:collapse;
 background:#e8eef7;
 color:#000;
 }
 #itsthetable {
 height:280px;
 overflow:auto;
 background:#c6dbff;
 padding-bottom:3px;
 width: 635px;
 }
 #itsthetableheader {
 overflow:auto;
 background:#c6dbff;
 padding-bottom:3px;
 width: 635px;
 }
 caption {
 height:102px;
 font-size:000000.1em;
 color:#c6dbff;
 background:#c6dbff;
 }
 caption:hover{
 font-size:000000.1em;
 color:#c6dbff;
 background:transparent;
 }
 th {
font-weight:300;
}
 tr th, tr td {
border-bottom:1px solid #ccc;
}
 table a, table a:link {
text-decoration:none;
 color:#666;
}
 table a:visited {
color:#999;
}
 tbody tr th {
 width:80px;
 vertical-align:top;
 padding-left: 50px;
 background:transparent;
 }
 tbody tr td {
 height:1.7em;
 vertical-align:top;
 padding-left:10px;
 background:transparent;
 }
 thead {
 background:#fff;
}
 tr th + td + td + td + td {
 width:60px;
 padding-left:20px;
 font-size:0.9em;
 background:transparent;
 }
 tr.odd {
 background: #FFFFFF;
 }
 tfoot th, tfoot td {
 height:105px;
 font-weight:bold;
 height:2.0em;
 padding-left:10px;
 vertical-align: top;
 }
 tfoot th{
 height:102px;
 background:#c6dbff;
 }
 tfoot td {
height:102px;
 background:#c6dbff;
 }
</style>
</head>
<body bgcolor='lightSteelBlue' ><h3>
<div id='content'>
<img src='images\john2srv.PNG' width=75 height=85 align='middle' />Server Farm #2 Johnstown </h3>
<table><tr bgcolor='lightSteelBlue'> ".

Tags: brltgt服务器servertrtdbackground