You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "zzzzl13 (via GitHub)" <gi...@apache.org> on 2023/03/24 05:36:41 UTC

[GitHub] [skywalking] zzzzl13 opened a new issue, #10587: [Question] nginx proxy oap server with http2 and ssl

zzzzl13 opened a new issue, #10587:
URL: https://github.com/apache/skywalking/issues/10587

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Apache SkyWalking Component
   
   Python Agent (apache/skywalking-python)
   
   ### What happened
   
   I use nginx to proxy skywalking oap server and try to connect in python agent. But somehow it comes with this exception, seems the agent consider it as a http1 server. Not sure if I set it wrong. It works fine when I not use ssl in nginx
   nginx conf:
   
   ```
   server {
           listen 8070 http2 ssl;
           ssl_certificate ssl.crt;
           ssl_certificate_key ssl.key;
           server_name localhost;
           access_log  D:/access.log;
           location / {
               grpc_pass grpc://skywalking-oap-server:11800;
               grpc_set_header Host $host;
               grpc_set_header X-Real-IP $remote_addr;
               grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           }
           
       }
   ```
   python agent config:
   `config.init(agent_collector_backend_services='localhost:8070', agent_protocol='grpc', agent_name='test', agent_instance_name='grpc_test')`
   
   error:
   grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
           status = StatusCode.UNAVAILABLE
           details = "failed to connect to all addresses; last error: INTERNAL: ipv4:127.0.0.1:8070: Trying to connect an http1.x server"
           debug_error_string = "UNKNOWN:failed to connect to all addresses; last error: INTERNAL: ipv4:127.0.0.1:8070: Trying to connect an http1.x server {created_time:"2023-03-24T03:42:26.522036003+00:00", grpc_status:14}" 
   
   ### What you expected to happen
   
   I expect it could connect to the oap server without error
   
   ### How to reproduce
   
   use the setting I post above
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng closed issue #10587: [Question] nginx proxy oap server with http2 and ssl

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng closed issue #10587: [Question] nginx proxy oap server with http2 and ssl
URL: https://github.com/apache/skywalking/issues/10587


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] Superskyyy commented on issue #10587: [Question] nginx proxy oap server with http2 and ssl

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on issue #10587:
URL: https://github.com/apache/skywalking/issues/10587#issuecomment-1483300895

   As far as I can tell, the NGINX setup looks correct and Python agent merely uses gRPC client to connect to a grpc server without other modifications. 
   Please check few things: 
   0. ngx_http_v2_module is installed in your nginx deployment, its not a default thing.
   1. make sure the ssl certs are valid, or simply remove them and test if things can be connected first. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org