-
Notifications
You must be signed in to change notification settings - Fork 549
The log-manager cannot work well with Nginx reverse proxy. #5260
Comments
Forgive my carelessness. Just after I submitted this issue, I saw that the key in the configuration file was uri instead of url, so the problem was solved. The new configuration file is as follows.
|
@siaimes Can you follow this? #5252 (comment) |
@Binyang2014 Thank you for your reply. I can't fully understand the solution you gave me in this issue. I tried to add Another situation is that because I want to access the k8s dashboard, I have configured a self-signed certificate for openpai on the LAN. |
This means that I use a self-signed certificate to access openpai on the LAN and a CA certificate to access openpai on the Internet. |
Okay, this seems to require me to modify the source code and hard-write the domain name into the source code. If I understand correctly, it will put a particularly heavy service pressure on my DMZ server, because all log requests in the LAN will be proxied by the DMZ server instead of being sent directly to the master node. |
You are correct. But since log stored inside the cluster, and for your environment, client can not connect PAI cluster directly. All requests must pass through the gateway. From our practice, the traffic is not too heavy and we limited the bandwidth usage for each log request. |
What I mean by this is that most of my client requests come from the LAN. These requests do not actually need to be sent to the DMZ server but can be sent directly to the master node. You know, many services will be deployed on the DMZ server, not just openpai, so I hope to save bandwidth as much as possible. |
I hope I understand your question correctly. Most of your client access the openPAI form LAN. The client in LAN works correctly and can see the logs. If so, you should add rules in your reverse proxy. You can refer nginx subfilter: http://nginx.org/en/docs/http/ngx_http_sub_module.html#sub_filter This a workaround we will solve this in future release |
Yes, this is exactly what I need. I just modified the configuration of Nginx, the new configuration file is as below.
However, this does not seem to solve the problem. I looked at the console and found that its link was not replaced correctly. |
http-sub-module-sub-filter-of-nginx-and-reverse-proxy-not-working @Binyang2014 The problem has been solved, thank you very much for your help. If there are related optimizations in subsequent versions, I hope you will remind me in this issue so that I can delete related useless nginx configurations. |
Organization Name:
Short summary about the issue/question:
The marketplace cannot work well with Nginx reverse proxy.
Brief what process you are following:
My master node does not have an Internet IP, and I am configuring it to be accessible by clients on the Internet. So I configured nginx on a server located in a demilitarized zone.
My nginx configuration file for openpai is as follows:
Everything is behaving normally, except for the marketplace.
The market cannot be opened on the Internet, and if I am on the LAN, I can open the market, but the lock in front of the URL of the Chrome browser turns red (it was black before accessing the market).
I know this is because I wrote the IP instead of the domain name for the marketplace part in the
services-configuration.yaml
configuration file like is.Because when using Nginx as a reverse proxy, Nginx will rewrite the host filed in the web page to the current host. However, most of the host filed of openpai can be modified except for the marketplace. Therefore, I think that the source code of the marketplace may violate some regulations.
How to reproduce it:
OpenPAI Environment:
uname -a
): Linux devbox 4.15.0-123-generic Removing private SSH key #126~16.04.1-Ubuntu SMP Wed Oct 21 13:48:05 UTC 2020 x86_64 x86_64 x86_64 GNU/LinuxAnything else we need to know:
The text was updated successfully, but these errors were encountered: