Score:0

grpc_pass nginx configuration

gr flag

When I do the same with resolver and set grpc_pass it fails:

    `server {
        listen 443 http2:
        server _name opc.org.com;
        ssl....;
        location / {
            resolver 127.0.0.11 valid=30s;
            set $https_webui https://dev_webui;
            proxy_pass $https_webui;
        }  
        location /App.Room.Api.Contract.ApiService/UpdateOpcDaTags {
            resolver 127.0.0.11 valid=30s;
            set $grpc_webui grpcs://dev_webui;
            grpc_pass $grpc_webui;
        }`

The error I'm getting on grpc-client is:

    `[Microsoft.Extensions.Hosting.Internal.Host)
    [BackgroundServiceFaulted status   BackgroundServledGrpc.Co.RpcException
    (StatusCode="Unknown", Detail="Bad gRPC response. HTTP status code: 500")`

When you have a configuration similar to this (example) it works

        `location /App.Room.Api.Contract.ApiService/UpdateOpcDaTags {
         grpc_pass grpcs://dev_webui;
         }`

Version nginx; nginx version: nginx/1.23.2

Score:0
gr flag

After a long review of the materials and tests, the error was discovered.

If we are using variables in the configuration, grpc_pass should have a port on which this grpc can be listened, in this example https and grpcs will use port 443.

So the working configuration for me is:

`server {
    listen 443 http2:
    server _name opc.org.com;
    ssl....;
    location / {
        resolver 127.0.0.11 valid=30s;
        set $https_webui https://dev_webui;
        proxy_pass $https_webui;
    }  
    location /App.Room.Api.Contract.ApiService/UpdateOpcDaTags {
        resolver 127.0.0.11 valid=30s;
        set $grpc_webui grpcs://dev_webui:443;
        grpc_pass $grpc_webui;
    }`

Interestingly, for proxy_pass port is not necessary to specify, I think due to the indication of https://

With this configuration, any stack that nginx maintains can be wiped out of the available stacks, and nginx will not send host not found in upstream message when restarted

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.