Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Contact Information

3162475700@qq.com

1Panel Version

2.0.15

Problem Description

最近在使用API实现部署SSL证书的过程中,遇到了同一脚本在不同平台上出现返回结果不一致的问题。

Steps to Reproduce

首先执行脚本:

#!/bin/bash
set -euo pipefail

ONEPANEL_URL="https://1p.example.com"
ONEPANEL_APIKEY="密钥"
ONEPANEL_SSLID="2"
ONEPANEL_NODE_NAME="节点名称"

timestamp=$(date +%s)
token=$(echo -n "1panel${ONEPANEL_APIKEY}${timestamp}" | md5sum | awk '{print $1}')

echo "== Debug 信息 =="
echo "URL: ${ONEPANEL_URL}/api/v2/websites/ssl/${ONEPANEL_SSLID}"
echo "Timestamp: $timestamp"
echo "Token: $token"
echo

response=$(curl -k -v -s -X GET \
  "${ONEPANEL_URL}/api/v2/websites/ssl/${ONEPANEL_SSLID}" \
  -H "CurrentNode: ${ONEPANEL_NODE_NAME}" \
  -H "1Panel-Timestamp: $timestamp" \
  -H "1Panel-Token: $token")

echo "== 返回内容 =="
echo "$response"

在linux环境下,非同一机器,经过测试可以正常获取到证书,如下:

Image

但是在Windows下,脚本不变,执行后确获得了500的请求:

Image

尝试在服务器内部查找日志进行调试,却发现,日志中的请求结果为200:

Image

请问这个具体是什么问题呢?

该问题在Certimate程序部署中似乎也能复现(个人),不确定其他机器是否有同样的问题。

我的面板反代使用了1panel面板的网站功能,通过Openresty实现。

The expected correct result

各种环境下均可以正常获取到证书,而不会返回500,我想理解这个500的报错是怎么回事。

Related log output

Additional Information

No response

You must be logged in to vote

Replies: 2 comments

Comment options

这个报错是节点找不到 检查一下你的节点名称

You must be logged in to vote
0 replies
Comment options

您好,我已经检查过,节点名称存在,并且完全同样的名称在Windows下执行脚本确实无法获取到。

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #11309 on December 12, 2025 02:49.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.