We are using a Redash AMI hosted on an ec2 instance, and suddenly while executing a query our instance got crashed, After rebooting the instance the Redash server was up and running but now while running queries we started getting this could not send SSL negotiation packet: Resource temporarily unavailable error.
We tried connecting the database from the instance using psql command but it is also not working.
We have checked the security groups of the RDS - PSQL, it already have the IP whitelisted of redash instance.
It would be great if someone can help us in fixing the problem.
Related
I have a server on AWS platform running an app. The database is on postgreSQL. The authentication is with .pem archives.
A few days ago, I was reported that the space of database was reaching the asigned quota, so I increase the quota through the RDS module on the cloud.
After doing it, I can't log in through pgAdmin to check the database. Nothing else was modified.
When I try to log in at the database I get this message:"Failed to create the SSH tunnel. Error: Could not establish session to SSH gateway"
The loggin configuration has always been like this (before increasing the quota I was able lo log in without any problems):
Use SSH tunneling: yes
Tunnel host: the IP assigned is the same and is still available.
Tunnel port: the port number is specified
Username: the username is specified
Authentication: Identity File
Identity file: It exist at the local route on my PC.
How can I fix this problem?
Thanks in advance.
I've created an AKS cluster and Flexible PostgreSQL database.
The postgresql database is public, and I made firewall entry while setting up the DB to allow local connection from my IP - which worked fine.
When I then tried to connect from AKS, I was unable to - I was getting timeouts.
Eventually, I clicked the setting to allow access from everywhere on azure
That fixed the timeouts, and I can now connect, but I get a new error:
no pg_hba.conf entry for host "**.**.***.203"
What am I doing wrong?
Problem
In general, there have been a ton of issues in connecting a remote service to a PostgreSQL database. The documentation for most services doesn't really have documentation for this since the task of connecting to a PostgreSQL database requires the Admin to modify both the postgresql.conf and pg_hba.conf files.
The current scenario is giving AppSmith remote access to the given server.
PostgreSQL needs to allow the following IP addresses at the pg_hba.conf: 18.223.74.85 and 3.131.104.27
Research SSL Connections and if one would be required in this case
Success Criteria:
Appsmith is able to connect to given database
Appsmith is able to read/write data to given database
Resolution Research
Allowing the above IP addresses to connect to the PostgreSQL database in the pg_hba.conf file and changing the postgresql.conf file to allow remote connections using listening_addresses = '*' did not resolve the issue. Appsmith is unable to connect to the database.
SSL Connection: SSL stands for Secure Sockets Layer and, in short, it's the standard technology for keeping an internet connection secure and safeguarding any sensitive data that is being sent between two systems, preventing criminals from reading and modifying any information transferred, including potential personal details.
SSL proved to be a dead-end for this issue with no resolution.
In order to create an SSL connection, the following steps must be followed (PostgreSQL SSL documentation: https://www.postgresql.org/docs/9.1/ssl-tcp.html):
OpenSSL needs to be installed on the host server (https://fedingo.com/how-to-install-openssl-in-ubuntu/). Determined that OpenSSL is already installed on the host server using openssl version -a.
Following the above steps from the postgresql documentation does not produce the desired result.
Following steps from https://www.cyberciti.biz/faq/postgresql-remote-access-or-connection/ does not work either.
Error in all cases on Appsmith: Failed to initialize pool: The connection attempt failed
Next-steps
Consult with the Stackoverflow community to see if anyone else is having a similar issue.
Similar issues have been found, but Appsmith documentation and the Stackoverflow community did not have the information needed to fulfill this issue. I will post the full case to the community.
I resolved this problem using ngrok to make a tcp tunnel on your localhost.
Donwload and conifg ngrok and create a new tunnel on terminal, just run ngrok tcp 5432 at terminal
After this, get the host/port and insert at Appsmith PostgreSQL Connection.
make sure your username/password is correct.
Image from host/port create on ngrok
Image to how config this host/port on Appsmith
I'm trying to connect my app running on AWS EC2 to mlab endpoint. I can easily connect using the same code base from my local machine to mlab endpoint. However, when I run on AWS, I get the following error.
{ name: 'MongoError', message: 'connect ECONNREFUSED' }
I have tried increasing connectionTimeMS to 30 seconds, but I still get the same error.
From EC2 instance, I can ping the DB server and netcat is also successful.
My EC2 instance is configured to receive and send all traffic on all ports from any IP address.
I think issue might be related to outgoing traffic, but do not know how to configure.
Thanks
Turned out to be environment issue.
I was setting my mlab endpoint using the command
export MONGOLAB_URL='xxxx'
and then running my app
sudo node server.js
this sequence does not set my local environment.
All I had to do in the end was to use the following command
sudo MONGOLAB_URI='xxxxxx' node server.js
I'm new to MongoDB. I'm trying to connect to my remote mongo database from my work machine( I tried for both mongohq as well as mongolab). I'm getting the error listed below. When I run the same command from my home machine it runs fine and does connect to remove mongo database. I'm not sure what is messed up on my work machine but I'd like to fix it. Thanks for you help.
MongoDB shell version: 2.4.9
connecting to: linus.mongohq.com:10097/mydb
Thu Jan 16 04:16:02.689 Error: couldn't connect to server linus.mongohq.com:10097
at src/mongo/shell/mongo.js:147
exception: connect failed
As per question comments, your mongo shell client can't connect to the mongo instance. Assuming that your internet connectivity is fine, the most common reason for the failure is that the ports are blocked on your network.
Some ISPs automatically block these ports by default as an additional security protection for users that don't need them open. Contact your ISP or network admin, they should be able to help you out.