Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apollo-portal 使用统一前缀/apollo以后,创建集群失败 #5139

Open
xworks opened this issue May 4, 2024 · 1 comment
Open

apollo-portal 使用统一前缀/apollo以后,创建集群失败 #5139

xworks opened this issue May 4, 2024 · 1 comment

Comments

@xworks
Copy link

xworks commented May 4, 2024

描述bug
portal站点统一使用路径前缀/apollo,创建集群失败

复现

通过如下步骤可以复现:

  1. portal站点统一使用路径前缀/apollo,创建集群

期望

创建成功

截图
截图显示路径不对,404

image

额外的细节和日志

  • 版本:2.2.0
  • 错误日志
  • 配置:
  • 平台和操作系统
Copy link

dosubot bot commented May 4, 2024

It looks like the issue with creating clusters when using the /apollo path prefix might be due to incorrect reverse proxy configuration or the Apollo Portal application not being properly set up to handle the /apollo context path. Here's a more focused approach to troubleshoot and resolve this issue:

  1. Ensure Apollo Portal is Configured for /apollo Context Path: Make sure the Apollo Portal application is configured to recognize the /apollo context path. This can be done by setting the system property -Dserver.servlet.context-path=/apollo or the equivalent environment variable SERVER_SERVLET_CONTEXT_PATH=/apollo.

  2. Configure Reverse Proxy Correctly: If you're using a reverse proxy like nginx, ensure it's configured to forward requests to the Apollo Portal application correctly. An example nginx configuration would be:

    location /apollo/ {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8070/apollo/;
    }

    This configuration ensures that requests to /apollo are forwarded correctly, including the path prefix.

  3. Check for Existing Clusters with the Same Name: The error might also occur if a cluster with the specified name already exists. The Apollo system throws a BadRequestException for duplicate cluster names during creation.

  4. Verify Request Payload and Permissions: Ensure that the request payload for creating a cluster is correctly formatted and includes all required fields. Also, verify that the user account used for the operation has the necessary permissions.

  5. Review Logs and Error Messages: Look into the Apollo Portal's log files for any error messages or stack traces related to the cluster creation process. This can provide more specific insights into what might be going wrong.

By following these steps, you should be able to identify and resolve the issue with creating clusters when using the /apollo path prefix. If the problem persists, providing more detailed information such as error logs, request payloads, and the specific configurations you're using can help further diagnose the issue.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant