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?
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 my oracle cloud database using sqldeveloper with connection type basic but it fails connection with error:
Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection.
Anyone can help how can i connect my oracle db system using sqldevloper with connection type either basic or TNS ??
Have you tried to telnet the server on port 1521?
It sounds likely that the dbsystem is not connected to the internet.
Please check if the dbsystem subnet has:
Security List with a rule to allow port 1521 on your ip address
Routing Table that allows internet access via internet gateway
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.
I am trying to connect to Snowflake which only has port 443 open for communications using JDBC driver. Instead of directly connecting to the snowflake server I want to connect to it via tunnel server. So I've created a ssh tunnel from local machine to snowflake server. And I'm passing the forwarded local address and port as the host for the JDBC connection String. This is my final JDBC string.
jdbc:snowflake://127.0.0.1:21212/?db=TEST_DB&warehouse=LOAD_WH&user=<user>&password=<password>
but the JDBC driver is not able to establish connection and fails during SSL handshake. Since the host address in the JDBC connection string doesn't have the format of that of the CN and SAN present in snowflake's SSL certificate.
Adding the stacktrace along:-
javax.net.ssl.SSLPeerUnverifiedException: Certificate for <10.11.227.124> doesn't match any of the subject alternative names: [*.snowflakecomputing.com, snowflakecomputing.com]
at net.snowflake.client.jdbc.internal.apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:467)
at net.snowflake.client.jdbc.internal.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:397)
at net.snowflake.client.jdbc.internal.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355)
at net.snowflake.client.jdbc.internal.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at net.snowflake.client.jdbc.internal.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359)
at net.snowflake.client.jdbc.internal.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
at net.snowflake.client.jdbc.internal.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at net.snowflake.client.jdbc.internal.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at net.snowflake.client.jdbc.internal.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at net.snowflake.client.jdbc.internal.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at net.snowflake.client.jdbc.internal.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at net.snowflake.client.jdbc.internal.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at net.snowflake.client.jdbc.internal.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at net.snowflake.client.jdbc.internal.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at net.snowflake.client.jdbc.RestRequest.execute(RestRequest.java:141)
at net.snowflake.client.core.HttpUtil.executeRequestInternal(HttpUtil.java:280)
at net.snowflake.client.core.HttpUtil.executeRequest(HttpUtil.java:234)
at net.snowflake.client.core.SessionUtil.openSession(SessionUtil.java:906)
at net.snowflake.client.core.SFSession.open(SFSession.java:330)
at net.snowflake.client.jdbc.SnowflakeConnectionV1.<init>(SnowflakeConnectionV1.java:239)
at net.snowflake.client.jdbc.SnowflakeDriver.connect(SnowflakeDriver.java:344)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:270)
at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:670)
at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
at org.apache.sqoop.tool.EvalSqlTool.run(EvalSqlTool.java:70)
at org.apache.sqoop.Sqoop.run(Sqoop.java:175)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:211)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:250)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:259)
at org.apache.sqoop.Sqoop.main(Sqoop.java:268)
at com.cloudera.sqoop.Sqoop.main(Sqoop.java:57)
Anyone has done similar thing in past and can guide me on how to do that?
By default snowflake JDBC driver will use tls for communication since snowflake is on public cloud, we have to verify certificate to trust the connection. However, in your case, you are trying to connect to a local server (I guess no tls there), you can add turn ssl off in the connection property. You can try
Properties prop = new Properties();
prop.put("account", "testaccount");
...
prop.put("ssl", "off");
Connection conn = DriverManager.getConnection(url, prop);
I am not sure if this would work or not, but I think worth trying.
I have googled and searched all over but I am still having trouble getting connected to a site using the ftpzilla
I am getting this read out when I try to connect to the server using the network connection wizard
Connecting to probe.filezilla-project.org
Response: 220 FZ router and firewall tester ready
USER FileZilla
Response: 331 Give any password.
PASS 3.9.0.6
Response: 230 logged on.
Checking for correct external IP address
Retrieving external IP address from
http://ip.filezilla-project.org/ip.php
Checking for correct external IP address IP 173.56.114.112
bhd-fg-bbe-bbc
Response: 200 OK
PREP 60010
Response: 200 Using port 60010, data token 1063172065
PORT 173,56,114,112,234,106
Response: 200 PORT command successful
LIST
Response: 150 opening data connection
Response: 503 Failure of data connection.
Server sent unexpected reply.
Connection closed
The weird thing is I only get this error for this particular server and the server I use for my personal site (namecheap.com) gives me no such error. Does anyone know why this may be happening? And please try not to point me to the network configuration wiki because I have read through that and I still am at this point.
PORT 173,56,114,112,234,106
....
Response: 503 Failure of data connection.
...
please try not to point me to the network configuration wiki
You are using active mode, that is the ftp client (FileZilla) waits for a connection from the server. Obviously the server can not connect to the client which indicates that something like a firewall restricts the connection.
Since according to your description this happens only with few servers, you either use only these servers with active mode or these servers are protected by firewalls which do not allow active mode. Have you tried with passive mode?
I had a similar issue connecting and made the following changes and had success.
Go to File>>>Site Manager>>>
For my site, I changed the Encryption to "Only use plain FTP(insecure)" and had success. May you find the same success.