我是Bokeh的新手,我试图运行服务器。我跑了命令:
INFO:bokeh.server.tornado:Rejected connection from host 'localhost:5100' because it is not in the --host whitelist
WARNING:tornado.access:403 GET /myapp (::1) 1.71ms
DEBUG:bokeh.server.tornado:[pid 834] 0 clients connected
一个窗口弹出,我不得不退出" Elinks",输出继续:
$equation_x0 = equation ($x0);
$equation_x1 = equation ($x1);
$k=1;
echo '<table colspan = "2" align = "center">';
echo '<tr><th style="width:350px;height:50px">ITERATIONS</th>';
echo '<th style="width:350px;">X</th></tr>';
echo '</table>';
do {
if (abs ($equation_x1-$equation_x0) < $delta) {
echo ' Solution cannot be found. ' . '<br>';
return 0;
}
$dx = ($x0*$equation_x1) - ($x1*$equation_x0);
$d = $equation_x1 - $equation_x0;
$x2 = number_format($dx / $d,5);
$equation_x2 = equation($x2);
$equation_x0 = $equation_x1;
$equation_x1 = $equation_x2;
$x0 = $x1;
$x1 = $x2;
echo '<table colspan = "2" align = "center">';
echo '<tr><td style="width:350px;height:50px" align = "center">' . $k . '</td>';
echo '<td style = "width:350px" align = "center">' . $x2 . '</td></tr>';
echo '</table>';
if ($k == $max_iter) {
break;
}
$k++;
} while (abs($equation_x2) > $delta && $k < $max_iter);
$_SESSION['k'] = $k;
echo $x2;
echo '<h1 align = "center" style = "color:red"><br>The required solution is ' . $x2 . '</h1>' ;
$result = mysqli_query($connect, "SELECT * FROM project ORDER BY id DESC LIMIT 1 ");
$row = mysqli_fetch_assoc($result);
$id='id';
echo $equation;
echo '<br>' . $row['id'];
echo '<br><a href="plotsecant.php?id=' . $row['id'] . ' " >PLOT</a>';
echo '</figure>';
echo '</div>';
}
?>
我用谷歌搜索,我能找到的只是GitHub issue page。我读了它但不了解tornado.py中是否有解决方案。
是否有一些args /参数可以解决这个问题?非常感谢!
答案 0 :(得分:1)
如果您只是在本地运行,那么您不需要--host 127.0.0.1:80
,事实上这是您问题的根源。默认情况下,白名单中的localhost:<PORT>
,除非您已明确提供--host
选项。 --host
选项通常仅在部署时才需要在反向代理之后,您希望防止具有欺骗主机名的请求。