php - 无法仅在 ovh serverurcloud 上连接到服务器
问题描述
我在 OVH (cloudweb) 有一台服务器。我在 symfony 下有一个调用 API 的脚本。
当我在本地测试时,我没有错误,但是当我在服务器上的生产环境中运行脚本时,我遇到了这个错误:
11:40:45 CRITICAL [控制台] 运行命令“'app:check-trans'”时引发错误。消息:“无法连接到“https://api-eu1.tatum.io/v3/ethereum/account/transaction/0xFB0AbEce6D2a9ec6E7Fd2B6CE049EfE88bb07377?pageSize=50”的服务器。” ["exception" => Symfony\Component\HttpClient\Exception\TransportException^ { …},"command" => "'app:check-trans'","message" => "无法连接到服务器 "https ://api-eu1.tatum.io/v3/ethereum/account/transaction/0xFB0AbEce6D2a9ec6E7Fd2B6CE049EfE88bb07377?pageSize=50"."] {"message":"命令 "'app:check-trans'" 以代码 "1" 退出","context":{"command":"'app:check-trans'","code":1},"
在 ErrorChunk.php 第 65 行:
无法连接到“https://api-eu1.tatum.io/v3/ethereum/accoun
t/transaction/0xFB0AbEce6D2a9ec6E7Fd2B6CE049EfE88bb07377?pageSize=50”的服务器。
在 CurlResponse.php 第 317 行:
无法连接到“https://api-eu1.tatum.io/v3/ethereum/accoun
t/transaction/0xFB0AbEce6D2a9ec6E7Fd2B6CE049EfE88bb07377?pageSize=50”的服务器。
这是脚本的一部分:
public function getTransactionsEth()
{
$url = $this->baseUrl . 'ethereum/account/transaction/' . $this->addressEth . '?pageSize=50';
$response = $this->client->request(
'GET',
$url,
[
'headers' => [
'x-api-key' => $this->apiKey,
],
]);
$content = $response->getContent();
return $content;
}
解决方案
推荐阅读
- javascript - 如何从 Node.js Outlook 加载项中的 Outlook 邮件中获取附件内容?
- javascript - DOM 事件和 sencha 事件之间的事件顺序
- flutter - 收到此错误: BoxConstraints(0.0<=w<=Infinity, h=Infinity),但我有 Container( 高度:88,宽度:375,
- java - Java Google guava multimap:获取所有列表条目
- reactjs - 在使用带有父组件和 react.js/typescript 的基本组件的组合时面临问题
- google-bigquery - 如何在标准 SQL 的 WHERE 子句中使用 WITH 子查询作为选项列表
- javascript - Javascript 中的网络摄像头图像更新
- reactjs - 有没有办法将 Flask 的 SHAP 或 LIME 输出渲染到 React?
- python - 计算 np float 64 中的小数位数
- godot - 如何为此添加阻力?