在本地mac上工作时,curl POST在cloud linux实例中返回错误503
描述错误 curl POST请求在云(数字海洋)Ubuntu18.04实例中使用503失败,而在本地mac(10.13.4)上使用相同的设置 是否存在导致错误代码的特定于云的内容 复制 打开2个端子 1) 启动奇偶校验以太坊节点,并使JSON-RPC端口侦听localhost:18545在本地mac上工作时,curl POST在cloud linux实例中返回错误503,curl,ethereum,digital-ocean,http-status-code-503,Curl,Ethereum,Digital Ocean,Http Status Code 503,描述错误 curl POST请求在云(数字海洋)Ubuntu18.04实例中使用503失败,而在本地mac(10.13.4)上使用相同的设置 是否存在导致错误代码的特定于云的内容 复制 打开2个端子 1) 启动奇偶校验以太坊节点,并使JSON-RPC端口侦听localhost:18545 $ parity --light --jsonrpc-port 18545 --jsonrpc-hosts="all" 2) 使用启动代理 $ lighttpd -f misc/lighttpd.conf
$ parity --light --jsonrpc-port 18545 --jsonrpc-hosts="all"
2) 使用启动代理
$ lighttpd -f misc/lighttpd.conf
,它将传入的IPV6端口8545请求转发到IPV4 18545,并将HTTP分块编码转换为内容长度。然后执行:
$ curl -X POST --header "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":987}' [::1]:8545
预期结果
在本地mac上:
{"jsonrpc":"2.0","result":"Parity-Ethereum//v2.5.0-beta-b52ac2066-20190408/x86_64-macos/rustc1.33.0","id":987}
实际结果
在(数字海洋)Ubuntu 18.04上:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>503 - Service Not Available</title>
</head>
<body>
<h1>503 - Service Not Available</h1>
</body>
</html>
503-服务不可用
503-服务不可用
附加上下文
-如果我杀死奇偶校验进程,然后执行curl,我在mac中也会遇到同样的错误
-