Connection to google cloud sql fails on dev - google-cloud-sql

I'm trying to connect to the Dev SQL server on Google's cloud platform.
I used to have no problem at all connecting a few weeks ago but I wanted to upgrade some stuff and suddenly a connection cannot be established..
I've tried connecting via MySQL Workbench first and it keeps getting a connection error 10060. When I test the parameters it goes fine but the connection never succeeds.
So I also tried using code in Java using a code similar to Google's example and this arbitrarily works but mostly doesn't and throws connection link fail exception.
So I know the code and setup is fine since it sometimes succeeds. so the question is: why? When is it fine and when does it fail and why? Also why does it never work via the workbench although it did work in the past?
Is this familiar to anyone?
Any help is greatly appreciated!
Thanks

I'm having the same problem.
I read that it might be the ISP blocking outbound port 3306.
is your IPS is Bezeq International-Ltd by any chance?
when I use my cell phone network it works fine.

It looks like Google are currently having issues with Cloud SQL. See Twitter for example

Related

PowerBI Error : Details: "PostgreSQL: 28001: Cannot connect to the server company.onmicrosoft.com"

I was working on a PowerBI report which I initially connected with the PostgreSQL on the Azure Cloud.
I was able to import the data and work on it till recently. I had whitelisted my earlier IP and hence connection was smooth. Today When I tried to connect from new IP (I have whitelisted this New IP as well) but it is not working. I am getting the following error. Not sure what should be done to continue working with the same report.
Details: "PostgreSQL: 28001: Cannot connect to the server company.onmicrosoft.com"
When I go to edit settings I am not able to change anything there as well. Not sure what should be done. Can Anybody please help on this.
I tried the following but nothing worked
Searched for Answers on PowerBI Community
Searched for Answers on Stack over Flow
Tried to change Internet connection
Whitelisted all possible IP on Azure PostgreSQL
Restarted the server on Azure PostgreSQL
Hi I finally figured out the solution to this problem so thought of posting it here so that it may help others who are stuck with similar problem
So this is what I did,
I checked the credentials it was all fine but I re-entered the server name and added :5432 its Port number in front of the server name.
Then it again asked for username and password, that I provided and it got connected to the data source very well.
Finally after hours of trial and error the issue got resolved

Postgres, Prisma Working Fine One Day, 'P1001 Error: Can't Reach Database' the next

For this project, I am using a prisma / Postgres database. I have made no changes to my code, and I have pulled a coworkers working version of the code to no avail. I am unable to do anything with the database, I cannot migrate, I cannot run mutations, and I cannot even open the psql console, as every command is met with
P1001: Can't reach database server at localhost:5432
Please make sure your database server is running at localhost:5432
I am not sure what I could have possibly done, I don't know enough about ports or even the contents of app.json well enough to have messed anything up. Now, no mutations can go through.
Interestingly enough, this all happened after I ran npx primsa migrate deploy on the deployed database which is on a EC2 VM from AWS. Since then, the native app associated with the database refuses to work, though it is worth nothing that the webapp connects to the deployed database just fine. This being said, nothing works locally, as the database / Port / Server don't exist anymore according to my machine, which makes no sense. I have no idea how to try to re-spin it, or why every single query / mutation from my Native App now ONLy returns Response not successful: Received status code 400 despite it having the same exact syntax it did when it worked, as well as the WebApp having the same syntax and server (ExpressJS). Does anyone have any ideas what could be causing this?
The error code 400 refers to a bad request coming from the client: too large request, malformed syntax, invalid request message framing, etc.
First step: make sure that your database server is indeed running. Try connecting to it with other SQL Clients or Libraries. Sometimes Prisma is just being difficult.
Second thing: are you hosting the database on the local server? I can assume you are because of the localhost. Make sure no other programs are using this port or maybe waiting for it.
Sorry if this doesn't help. Good luck!

CloudRun Suddenly got `Improper path /cloudsql/{SQL_CONNECTION_NAME} to connect to Postgres Cloud SQL instance "{SQL_CONNECTION_NAME}"`

We have been running a service using NestJS and TypeORM on fully managed CloudRun without issues for several months. Yesterday PM we started getting Improper path /cloudsql/{SQL_CONNECTION_NAME} to connect to Postgres Cloud SQL instance "{SQL_CONNECTION_NAME}" errors in our logs.
We didn't make any server/SQL changes around this timestamp. Currently there is no impact to the service so we are not sure if this is a serious issue.
This error is not from our code, and our third party modules shouldn't know if we use Cloud SQL, so I have no idea where this errors come from.
My assumption is Cloud SQL Proxy or any SQL client used in Cloud Run is making this error. We use --add-cloudsql-instances flag when deploying with "gcloud run deploy" CLI command.
Link to the issue here
This log was recently added in the Cloud Run data path to provide more context for debugging CloudSQL connectivity issues. However, the original logic was overly aggressive, emitting this message even for properly working CloudSQL connections. Your application is working correctly and should not receive this warning.
Thank you for reporting this issue. The fix is ready and should roll out soon. You should not see this message anymore after the fix is out.

Cloud Foundry on Bluemix: No network connection when starting new app with binary-buildpack

First, I've finaly found out what the problem was but still, I decided to write this question+answer for others (because I spent 6 hours with this issue).
So, what's the problem...
I have a Cloud Foundry app (on public Bluemix) based on binary-buildpack. Two days ago, everything was OK. But not since yesterday. My app crashed (probably during restaging or something similar) and never started again. I tried to push the app again and still the same result. Really frustrating...
Something about the backend... There is a shell script in my instance that runs one binary application. Generaly, the application should connect to database server (also on public Bluemix).
The problem: Everytime I tried to start the app, it crashed immediately. This is what I found in logs: dial tcp: lookup databaseserverdomain.com on 0.0.0.0:53: server misbehaving.
There are a couple of similar problems on StackOverflow but no answer that would be helpful for me.
So, the error means that something went wrong with TCP connection. Ok, but what exactly? That's the question I'm going to answer myself...
Sounds like your binary isn't capable in properly handling connection problems. I would rather fix that part since I guess it will crash anyway when there is a connection issue.
The solution was actually simple...
I edited my shell script and add ping google.com -count 3 before launching the application to test if there is a stable network connection. This worked.
The application got 2 more seconds and it was enough for network/router/whatever to establish the connection.
Hmm.. It seems that there is something wrong with network routing on Cloud Foundry/Bluemix since yesterday.

VS 2013 Web Deployment Failing - Socket Error 10054

I posted on friday regarding this issue and received no response, however since then some updates have occurred which might affect whether people have an answer to my question or not.
I'm trying to deploy an MVC website to Azure, and in this particular project the web deploy receives a Socket Error 10054 and gives up after 10 attempts saying it was Unable to write data to the transport connection. It makes varying progress in between the socket failures but never completes within the 10 attempts.
I have since had a play around with other projects which are deployed to different url locations within this same Azure Account and they deploy fine! I think this means the problem is not on my end, i.e. port 8172 is open and deployment can be achieved with my current local settings.
What are the problems that can cause this socket error 10054? I saw somewhere that I should enable the "Allow untrusted certificate" option when deploying but I can't find that option within VS 2013.
Any ideas are welcome please,
This issue is driving me mad, it seems there's a real mixed bag of solution ideas which have worked for others but not me.
JK