omniti-labs / pg_amqp

AMQP Support for Postgres
https://labs.omniti.com/labs/pg_amqp
206 stars 63 forks source link

Problem connecting to CloudAMQP #34

Open ninomllr opened 3 years ago

ninomllr commented 3 years ago

I try to use pg_amqp to publish messages on my CloudAMQP instance but when I call the following command: SELECT amqp.publish(1, 'amqp.direct', '', 'message'); I always get an error message that I don't understand 2021-08-02 12:50:51.919 UTC [32] WARNING: amqp[mycloudamqp] login socket/connect failed: No such file or directory.

When I check the c Code for this error message I don't really understand what kind of a file is missing.

I am pretty sure that I installed the extension in a wrong way as the official documentation was not right anymore and I started to tinker around. Did I forget to copy something into the right place?

Dockerfile

FROM postgres:12.5
RUN apt update -y
RUN apt install git -y
RUN apt install build-essential -y
RUN apt install postgresql-server-dev-12 -y

RUN git clone https://github.com/omniti-labs/pg_amqp.git
WORKDIR pg_amqp
RUN make
RUN make install -n  | grep pg_amqp.so
RUN cp pg_amqp.so /usr/lib/postgresql/12/lib/pg_amqp.so
RUN cp amqp.control /usr/share/postgresql/12/extension/amqp.control
RUN cp sql/amqp--0.4.2.sql /usr/share/postgresql/12/extension/
ninomllr commented 3 years ago

Ok, I could resolve this by creating the queue on CloudAMQP and sending it in this way: SELECT amqp.publish(1, '', 'pg_amqp-test', 'message');

Anyway now I get the 2021-08-02 13:28:26.230 UTC [32] WARNING: amqp[url:port] login failed on broker 1 error which is also not so helpful. Does anyone have an idea?

KondratevAD commented 2 years ago

Yes I have the same problem, HELP!