Comments (11)
Which version of PostgreSQL are you using? OS?
Also check your postgres connection uri(postgres://user:pass@host:port
) if it contains reserved characters(like @, #
in pass) you might need to percent encode them.
from pg-amqp-bridge.
Hi,
I'm using PostgreSQL 9.6 on Ubuntu 14.04 LTS.
I initially did have a problem where Postgres on Azure automatically appends @my-server-name
to each username created on Postgres when trying to authenticate, and got a different error message for that (Invalid '@' character
) but after URL-encoding the @
character, this is the only error I get now. There doesn't seem to be anything else that needs to be encoded. There are -
s in the username, would that also need to be URL-encoded?
from pg-amqp-bridge.
Correction: Postgres is version 9.6, but since it's hosted as an Azure service, I'm not sure what OS it runs on. My docker master is running Ubuntu 14.04 and I'm running pg-amqp-bridge
as a docker instance.
from pg-amqp-bridge.
The -
chars should be safe, when the connection fails do you get retrying? Which pg-amqp-bridge version are you using? if it's latest(0.0.6
) at startup there should be a message like:
Attempting to connect to PostgreSQL..
<Error here>
Retrying the PostgreSQL connection in 2 seconds..
<Error here>
Retrying the PostgreSQL connection in 4 seconds..
......
from pg-amqp-bridge.
After upgrading to latest
/ 0.0.6
from Docker Hub, I now get the following:
Attempting to connect to PostgreSQL..
Error(Io(Error { repr: Custom(Custom { kind: InvalidInput, error: StringError("invalid message length") }) }))
Retrying the PostgreSQL connection in 1 seconds..
Error(Io(Error { repr: Custom(Custom { kind: InvalidInput, error: StringError("invalid message length") }) }))
Retrying the PostgreSQL connection in 2 seconds..
Error(Io(Error { repr: Custom(Custom { kind: InvalidInput, error: StringError("invalid message length") }) }))
Retrying the PostgreSQL connection in 4 seconds..
Error(Io(Error { repr: Custom(Custom { kind: InvalidInput, error: StringError("invalid message length") }) }))
Retrying the PostgreSQL connection in 8 seconds..
Error(Io(Error { repr: Custom(Custom { kind: InvalidInput, error: StringError("invalid message length") }) }))
Retrying the PostgreSQL connection in 16 seconds..
from pg-amqp-bridge.
I think I've narrowed down this issue. My PostgreSQL server requires connection over SSL. What should I specify in POSTGRESQL_URI
to be able to connect over SSL?
from pg-amqp-bridge.
Right now there's no SSL connection support, see this line https://github.com/subzerocloud/pg-amqp-bridge/blob/master/src/main.rs#L52 that has TlsMode::None
, that would have to be changed to SslMode:Require
as described in this issue sfackler/r2d2-postgres#7.
from pg-amqp-bridge.
Also you could try temporarily disabling SSL on your Azure potsgres instance with https://docs.microsoft.com/en-us/azure/postgresql/concepts-ssl-connection-security#using-the-azure-portal and see if the connection now works to see if that's indeed the problem.
Reason for double checking is that I've tried to connect to an SSL only Postgres RDS instance and the error message is more clear: no pg_hba.conf entry for host \"xx.xx.xx.xx.xx\", user \"admin\", database \"test\", SSL off
maybe something else is going on in Azure.
from pg-amqp-bridge.
It was pretty strange. At first I received the invalid message length
error, but after restarting the server I started to received an SSL-related error (not the one you mentioned above, but similar). I think it was Azure's custom SSL-must-be-on error message.
Everything started working when I turned off SSL on the Azure instance. It's not ideal though, but I'm limiting access to the server from a specific IP range so it's OK for now. Would you be able to add SSL support to your feature-list?
from pg-amqp-bridge.
The ideal support for this would be to specify the sslmode
in the POSTGRESQL_URI
like postgres://...?sslmode=verify-full
libpq style, so the feature would be a better fit for rust-postgres.
from pg-amqp-bridge.
I see there it's been discussed on that project since 2015 but nothing has come of it. Thanks for all your help. I'm going to close this issue now.
from pg-amqp-bridge.
Related Issues (20)
- When RabbitMQ Restarts... HOT 2
- Not getting Postgres notifications HOT 8
- docker can't connect to amqp HOT 1
- how to connect to default/nameless exchange? HOT 1
- how to add headers and properties to the message? HOT 2
- ERROR: payload string too long HOT 1
- Setup meet a problem in Centos7.6 HOT 2
- Usage HOT 1
- Postgres connection timeout in Docker Swarm
- Could not connect to AMQP: invalid port number HOT 1
- Connect to Postgres using ssl mode HOT 3
- Hearthbeat connection to AMQP proxy HOT 1
- WARN:amqp::channel: basic_publish(mandatory=true) failures are not handled and result in blocked channels! HOT 1
- Pub JSON
- Can messages be lost on network failure? HOT 1
- How to install it and run in Windows? HOT 1
- How to fix: ConnectionRefused? HOT 1
- Add support for persistent delivery mode HOT 4
- running as a docker HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg-amqp-bridge.