I am learning rpc&grpc and go now, i was confused by the grpc.
When I was learning the examples on GitHub(https://github.com/grpc/grpc-go/tree/master/examples), I encountered some problems. In server, i use address = "ip:50051" instead of address = ":50051"(ip is my intranet ip), and in client i use address = "ip:50051" instead of address= "localhost:50051", then run the server and the client, in client i get the error:
rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing failed to do connect handshake, response: \"HTTP/1.0 504 Gateway Time-out\\r\\nConnection: close
But when i learn rpc in golang, use my intranet ip in the server and client, it is ok.
So i want to know why it is wrong in the grpc?
It seems the client failed to on proxy (failed to do a HTTP Connect handshake).
If you have proxy enabled in your system (the proxy environment variable, HTTP_PROXY or HTTPS_PROXY, is set), make sure the proxy works.
If you don't need proxy, clear the env variables and try again.
Related
I try to access a graphql api.
The post request goes via a proxy chain of:
local http proxy -> local socks5 proxy -> graphql api host
However, I get java.util.concurrent.ExecutionException: javax.net.ssl.SSLHandshakeException: Failed to create SSL connection in
io.smallrye.graphql.client.vertx.typesafe.VertxTypesafeGraphQLClientProxy#postSync
I did not find any info or method to disable ssl checks, like verify hosts = false etc. in the used TypesafeGraphQLClientBuildernor in the built client.
How to get rid of the ssl checks in this local dev only test setup?
In debug I see that the built client io.smallrye.graphql.client.vertx.typesafe.VertxTypesafeGraphQLClientProxy
has httpClient.options.verifyHost=true which I would like to set to false.
But I don't know how/where to manipulate or replace the httpClient within the VertxTypesafeGraphQLClientProxy.
Any hints please?
I am trying to connect against Cloud SQL with the Cloud SQL Proxy but the problem is that in my company we use a private VPN to connect to Google Services, so I need to have enable the VPN and their proxy.
When I execute
./cloud_sql_proxy -instances=<CONNECTION-NAME>=tcp:5432
If I use a environment variable to declare the proxy and the user and password, it returns me,
errors parsing config:
Get "https://sqladmin.googleapis.com/sql/v1beta4/projects/<PROJECT>/instances/<REGION>~<SQL-INSTANCE>?alt=json&prettyPrint=false": proxyconnect tcp: tls: first record does not look like a TLS handshake
And if I delete the environment variable, it returns,
errors parsing config:
Get "https://sqladmin.googleapis.com/sql/v1beta4/projects/<PROJECT>/instances/<REGION>~<INSTANCE-SQL>?alt=json&prettyPrint=false": dial tcp <IP>:<PORT>: i/o timeout
Anyone resolve to execute the cloud_sql_proxy with another proxy?
I have build a Go server using Echo framework, i get TLS certificades and a domain name, but when i try a request i get the message "Client sent an HTTP request to an HTTPS server." and when i try acces the server from the IP address of the EC2 using the port 443, it says that the connection is not secure:
And when i change the server to the port 80 to acces through the domain name, i get the following error:
I'm starting the server using the StartTLS func
e.Logger.Fatal(e.StartTLS(":80", "/etc/letsencrypt/live/anltcsprod.enrtt.com/fullchain.pem", "/etc/letsencrypt/live/anltcsprod.enrtt.com/privkey.pem"))
Is it something wrong with my domain or certificade?
Port 80, by default, communicates over HTTP. 443 is reserved for HTTPS traffic. Assuming nothing else is wrong, you should be able to simply change your e.StartTLS() to this:
e.Logger.Fatal(e.StartTLS(":443", "/etc/letsencrypt/live/anltcsprod.enrtt.com/fullchain.pem", "/etc/letsencrypt/live/anltcsprod.enrtt.com/privkey.pem"))
For example localhost:4000
Instead use https://localhost:4000
I am new using cloud platform. I trying to deploy a service using go and grpc. I found this tutorial https://github.com/GoogleCloudPlatform/golang-samples/tree/master/endpoints/getting-started-grpc and everything was complete successful until I have to call the service.
In the moment that I use the client to call the service I get this error:
could not greet: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 35.199.74.154:80: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because
connected host has failed to respond.
I would like to know if someone can help me with that problem.
I have a separate Backbone client and a server that it needs to connect to. I'm using socket.io and this is my server config as of now:
var IOServer = require('socket.io')
var port = (process.env.PORT || 9720),
io = new IOServer(port);
From what I've read, heroku assigns you a random port number. But I think it should work if I just put the link
var socket = io.connect('https://thawing-tundra-87100.herokuapp.com');
When I go to the server link above, I get
This thawing-tundra-87100.herokuapp.com page can’t be found
No webpage was found for the web address: https://thawing-tundra-87100.herokuapp.com/
HTTP ERROR 404
But checking the logs, it's running correctly I believe.
So the server is on heroku and I am trying to connect to the server using my localhost instance of the client. However, the client is getting a connection refused
https://thawing-tundra-87100.herokuapp.com:5000/socket.io/?EIO=2&transport=polling&t=1482456831163-0 Failed to load resource: net::ERR_CONNECTION_REFUSED
Is there something else I need to do or am I missing something?