gen_server:handle_common_reply/8 line 805

105 views
Skip to first unread message

Hugo Borda

unread,
May 26, 2022, 10:53:46 AM5/26/22
to vernemq-users
Hi all, I was wondering is anybody run into this?

Environment: Amazon EC2
OS: Amazon Linux 2
Authentication: Amazon RDS PostgreSQL

Steps:
1 - Provisioned a new instance
2 - Installed docker
3 - installed docker compose
4 - create a folder on my home directory to map vernemq.conf file, my docker-compose.yml looks like this:

start ---

version: '3.2'

services:
    vernemq:
        image: vernemq/vernemq:latest
        restart: always
        container_name: 'vernemq1'
        environment:
             - DOCKER_VERNEMQ_ACCEPT_EULA=yes
         volumes:
              - ./vernemq/vernemq.conf:/etc/vernemq/vernemq.conf
         ports:
               - '1883:1883'

end ----

enabled diversity, commented out file base authentication, provide all the necessary postgreSQL variables, added the user to the postgreSQL table.

Then used MQTT explorer and I was able to connect to the the single VerneMQ instance. I was able to publish and subscribe to vernemq

But when I do "docker logs <docker container>" I get a large number of error on it

21:48:43.030 [error] CRASH REPORT Process <0.11436.0> with 0 neighbours exited with reason: timeout in gen_server:handle_common_reply/8 line 805
21:48:43.521 [debug] Replica meta4: Can't initialize AE exchange due to no peer available
21:48:47.685 [debug] Replica meta9: Can't initialize AE exchange due to no peer available
21:48:48.251 [debug] Replica meta10: Can't initialize AE exchange due to no peer available
21:48:48.570 [debug] Replica meta6: Can't initialize AE exchange due to no peer available
21:48:48.595 [warning] Could not connect to postgresql due to timeout
21:48:48.595 [error] gen_server <0.11437.0> terminated with reason: timeout
21:48:48.595 [error] CRASH REPORT Process <0.11437.0> with 0 neighbours exited with reason: timeout in gen_server:handle_common_reply/8 line 805
21:48:48.868 [warning] Could not connect to postgresql due to timeout
21:48:48.868 [error] gen_server <0.11438.0> terminated with reason: timeout
21:48:48.868 [error] CRASH REPORT Process <0.11438.0> with 0 neighbours exited with reason: timeout in gen_server:handle_common_reply/8 line 805
21:48:48.885 [warning] Could not connect to postgresql due to timeout
21:48:48.885 [error] gen_server <0.11439.0> terminated with reason: timeout
21:48:48.885 [error] CRASH REPORT Process <0.11439.0> with 0 neighbours exited with reason: timeout in gen_server:handle_common_reply/8 line 805

I do know vernemq can interact with postgresql since I can pass authentication, I can't understand why the timeout from gen_server:handle_common_reply/8 line 805.

Thanks in advance.

regards

André Fatton

unread,
May 26, 2022, 11:09:20 AM5/26/22
to vernemq-users
Hi Hugo,

I haven't seen this or heard about this. Is it possible that you have a limit on the concurrent connections to RDS Postgres, leading to those timeouts?
For VerneMQ, you can set a connection pool size with "vmq_diversity.postgres.pool_size=15", in the vernemq.conf file. The default is 5, I think.

Please note that commercial use of the EULA based packages requires a paid subscription.

Cheers,
André

Hugo Borda

unread,
May 28, 2022, 7:40:10 AM5/28/22
to vernemq-users
Andre, thanks a lot for getting back to me.

Also thanks for the commercial note, I used VerneQM before the license changed at another company and I did no even think to check, that Thanks again!

Because of the commercial license then I got the image from here micwy/vernemq:1.11.0-alpine.

I'm using the same settings I used with the image from verneqm

------ Start

version: '3.2'


services:

  vernemq:

      image: micwy/vernemq:1.11.0-alpine

      restart: always

      container_name: 'vernemq1'

      environment:

        - DOCKER_VERNEMQ_LOG__CONSOLE=both

        - DOCKER_VERNEMQ_LOG__CONSOLE__LEVEL=debug

        - DOCKER_VERNEMQ_LISTENER__TCP__PROXY_PROTOCOL=on

        - DOCKER_VERNEMQ_ALLOW_ANONYMOUS=off

        - DOCKER_VERNEMQ_PLUGINS__VMQ_PASS=off

        - DOCKER_VERNEMQ_PLUGINS__VMQ_ACL=off

        - DOCKER_VERNEMQ_PLUGINS__VMQ_DIVERSITY=on

        - DOCKER_VERNEMQ_VMQ_DIVERSITY__AUTH_POSTGRES__ENABLED=on

        - DOCKER_VERNEMQ_VMQ_DIVERSITY__POSTGRES__HOST=<database dns>

        - DOCKER_VERNEMQ_VMQ_DIVERSITY__POSTGRES__PORT=<pot>

        - DOCKER_VERNEMQ_VMQ_DIVERSITY__POSTGRES__USER=<postgres user>

        - DOCKER_VERNEMQ_VMQ_DIVERSITY__POSTGRES__PASSWORD=<postgres password>

        - DOCKER_VERNEMQ_VMQ_DIVERSITY__POSTGRES__DATABASE=<database name>

        - DOCKER_VERNEMQ_VMQ_DIVERSITY__POSTGRES__PASSWORD_HASH_METHOD=crypt

      ports:

   - '1883:1883'

------ end

and to my surprise every thing works as it should.

In short there are some difference between the two images, and the alpine works for me.

Thanks again Andre!
Reply all
Reply to author
Forward
0 new messages