roribio/alpine-sqs

Queue fails to deliver messages

byeze opened this issue · 1 comments

byeze commented

Hello!

I’m trying to set up the sqs queue but when initializing it, it shows the following logs:

22:31:37.421 [main] INFO  org.elasticmq.server.Main$ - === ElasticMQ server (0.15.0) started in 10675 ms ===
22:35:08.540 [elasticmq-akka.actor.default-dispatcher-8] INFO  akka.actor.DeadLetterActorRef - Message [org.elasticmq.MessageData] from Actor[akka://elasticmq/user/$a/$a#42008919] to Actor[akka://elasticmq/deadLetters] was not delivered. [1] dead letters encountered. If this is not an expected behavior, then [Actor[akka://elasticmq/deadLetters]] may have terminated unexpectedly, This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.

2021-07-21 22:53:08,909 INFO exited: elasticmq (terminated by SIGKILL; not expected)
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
2021-07-21 22:53:09,008 INFO spawned: 'elasticmq' with pid 148
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
2021-07-21 22:53:10,184 INFO success: elasticmq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
22:53:11.533 [main] INFO  org.elasticmq.server.Main$ - Starting ElasticMQ server (0.15.0) ...
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
22:53:13.431 [elasticmq-akka.actor.default-dispatcher-2] INFO  akka.event.slf4j.Slf4jLogger - Slf4jLogger started
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324

Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "default": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
Error on queue "dlq": SQS receive message failed: connect ECONNREFUSED 127.0.0.1:9324
22:53:17.178 [elasticmq-akka.actor.default-dispatcher-4] INFO  o.e.rest.sqs.TheSQSRestServerBuilder - Started SQS rest server, bind address 0.0.0.0:9324, visible server address * (depends on incoming request path) 
22:53:17.435 [elasticmq-akka.actor.default-dispatcher-2] INFO  o.elasticmq.actor.QueueManagerActor - Creating queue QueueData(dlq,MillisVisibilityTimeout(10000),PT5S,PT0S,2021-07-21T22:53:17.285Z,2021-07-21T22:53:17.285Z,None,false,false,None,None,Map())
22:53:17.530 [elasticmq-akka.actor.default-dispatcher-2] INFO  o.elasticmq.actor.QueueManagerActor - Creating queue QueueData(default,MillisVisibilityTimeout(10000),PT5S,PT0S,2021-07-21T22:53:17.529Z,2021-07-21T22:53:17.529Z,Some(DeadLettersQueueData(dlq,3)),false,false,None,None,Map())
22:53:17.541 [main] INFO  org.elasticmq.server.Main$ - === ElasticMQ server (0.15.0) started in 7821 ms ===

12:30:27.979 [elasticmq-akka.actor.default-dispatcher-2] INFO  org.elasticmq.actor.queue.QueueActor - default: Clearing queue

12:30:31.889 [elasticmq-akka.actor.default-dispatcher-8] INFO  akka.actor.DeadLetterActorRef - Message [org.elasticmq.MessageData] from Actor[akka://elasticmq/user/$a/$a#-1665137407] to Actor[akka://elasticmq/deadLetters] was not delivered. [8] dead letters encountered. If this is not an expected behavior, then [Actor[akka://elasticmq/deadLetters]] may have terminated unexpectedly, This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.

12:30:46.067 [elasticmq-akka.actor.default-dispatcher-6] INFO  org.elasticmq.actor.queue.QueueActor - default: Clearing queue

No messages are being delivered to my clients. I’m running this using Docker compose with the following config:

(... other config)
alpine-sqs:
    container_name: transactional-queue
    image: roribio16/alpine-sqs:latest
    # volumes:
    # - /dist/sqs-data:/opt/custom
    restart: always
    ports:
      - '9324:9324'
      - '9325:9325'
byeze commented

Fixed by adding a docker volume pointing to a folder, and then, in that folder adding a elasticmq.conf file with the following content:

include classpath("application.conf")

node-address {
    protocol = http
    host = "*"
    port = 9324
    context-path = ""
}

rest-sqs {
    enabled = true
    bind-port = 9324
    bind-hostname = "0.0.0.0"
    // Possible values: relaxed, strict
    sqs-limits = strict
}

queues {
    default {
        defaultVisibilityTimeout = 10 seconds
        delay = 5 seconds
        receiveMessageWait = 0 seconds
    },
    test {
        defaultVisibilityTimeout = 10 seconds
        delay = 5 seconds
        receiveMessageWait = 0 seconds
    }
}