alpine-sqs icon indicating copy to clipboard operation
alpine-sqs copied to clipboard

Feat: upgrade to Alpine OpenJDK + last release of ElasticMQ and sqs-insight

Open bartleboeuf opened this issue 5 years ago • 9 comments

Feat: upgrade to Alpine OpenJDK + last release of ElasticMQ and sqs-insight

bartleboeuf avatar Nov 14 '19 20:11 bartleboeuf

Maybe it's because of the upgraded sqs-insights but this also fixes #39 (CPU stuck at 100% if queues are not empty)

rciorba avatar Mar 25 '20 14:03 rciorba

This also fixes #49, openjdk:8-jre-alpine has ARM64 builds where alpine-java does not.

lkb2k avatar Jan 30 '21 22:01 lkb2k

@roribio any chance of this PR getting merged? Or the main docker file getting updated to Alpine OpenJDK?

lkb2k avatar Feb 19 '21 01:02 lkb2k

Would really like to see this happen if it fixes the 100 CPU issue

plocke-certn avatar May 27 '21 00:05 plocke-certn

As a workaround until this gets merged, you can use https://hub.docker.com/r/rciorba/alpine-sqs It's built from the code in this MR.

rciorba avatar May 27 '21 09:05 rciorba

+1

NielsKSchjoedt avatar Jun 08 '21 11:06 NielsKSchjoedt

@rciorba I just tried your build, unfortunately it does not work on my M1 mac: When I run it with docker run --name alpine-sqs -p 9324:9324 -p 9325:9325 -d rciorba/alpine-sqs

2021-06-08 12:15:38,004 INFO Included extra file "/etc/supervisor/conf.d/elasticmq.conf" during parsing
2021-06-08 12:15:38,006 INFO Included extra file "/etc/supervisor/conf.d/insight.conf" during parsing
2021-06-08 12:15:38,006 INFO Included extra file "/etc/supervisor/conf.d/sqs-init.conf" during parsing
2021-06-08 12:15:38,006 INFO Set uid to user 0 succeeded
2021-06-08 12:15:38,034 INFO RPC interface 'supervisor' initialized
2021-06-08 12:15:38,034 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2021-06-08 12:15:38,034 INFO supervisord started with pid 1
2021-06-08 12:15:39,045 INFO spawned: 'sqs-init' with pid 12
2021-06-08 12:15:39,056 INFO spawned: 'elasticmq' with pid 14
2021-06-08 12:15:39,064 INFO spawned: 'insight' with pid 16
cp: can't stat '/opt/custom/*.conf': No such file or directory
2021-06-08 12:15:40,137 INFO success: sqs-init entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-06-08 12:15:40,138 INFO success: elasticmq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-06-08 12:15:40,138 INFO success: insight entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-06-08 12:15:40,150 INFO exited: sqs-init (exit status 0; expected)
> [email protected] start /opt/sqs-insight
> node index.js
Loading config file from "/opt/sqs-insight/lib/../config/config.json"
Unable to load queues for undefined
Config contains 0 queues.
listening on port 9325
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined

As seen there are no queues found for some reason. If I try to run: aws --region ec-central-1 --endpoint-url http://localhost:9324 sqs send-message --queue-url http://localhost:9324/queue/default --message-body "Hello, queue" All I get is:

Connection was closed before we received a valid response from endpoint URL: "http://localhost:9324/".

Any idea why this happens?

NielsKSchjoedt avatar Jun 08 '21 12:06 NielsKSchjoedt

@rciorba I just tried your build, unfortunately it does not work on my M1 mac: When I run it with docker run --name alpine-sqs -p 9324:9324 -p 9325:9325 -d rciorba/alpine-sqs

2021-06-08 12:15:38,004 INFO Included extra file "/etc/supervisor/conf.d/elasticmq.conf" during parsing
2021-06-08 12:15:38,006 INFO Included extra file "/etc/supervisor/conf.d/insight.conf" during parsing
2021-06-08 12:15:38,006 INFO Included extra file "/etc/supervisor/conf.d/sqs-init.conf" during parsing
2021-06-08 12:15:38,006 INFO Set uid to user 0 succeeded
2021-06-08 12:15:38,034 INFO RPC interface 'supervisor' initialized
2021-06-08 12:15:38,034 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2021-06-08 12:15:38,034 INFO supervisord started with pid 1
2021-06-08 12:15:39,045 INFO spawned: 'sqs-init' with pid 12
2021-06-08 12:15:39,056 INFO spawned: 'elasticmq' with pid 14
2021-06-08 12:15:39,064 INFO spawned: 'insight' with pid 16
cp: can't stat '/opt/custom/*.conf': No such file or directory
2021-06-08 12:15:40,137 INFO success: sqs-init entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-06-08 12:15:40,138 INFO success: elasticmq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-06-08 12:15:40,138 INFO success: insight entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-06-08 12:15:40,150 INFO exited: sqs-init (exit status 0; expected)
> [email protected] start /opt/sqs-insight
> node index.js
Loading config file from "/opt/sqs-insight/lib/../config/config.json"
Unable to load queues for undefined
Config contains 0 queues.
listening on port 9325
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined
Unable to load queues for undefined

As seen there are no queues found for some reason. If I try to run: aws --region ec-central-1 --endpoint-url http://localhost:9324 sqs send-message --queue-url http://localhost:9324/queue/default --message-body "Hello, queue" All I get is:

Connection was closed before we received a valid response from endpoint URL: "http://localhost:9324/".

Any idea why this happens?

It's happening here too... in roribio/alpine-sqs. Did you find a solution?

danielapsmaior avatar Mar 18 '22 14:03 danielapsmaior

In case it helps others on M1 macs, I have been able to run rciorba's and roribio's versions of this container on my M1 Mac. I have rosetta emulation on which I think is what is allowing it to run. I've seen rosetta perform really well for other AMD images too.

I can also confirm that @rciorba's image works for removing the cpu issue 🙏

Worth a shot turning it on @NielsKSchjoedt and @danielapsmaior, on the off-chance you're still wanting to run this a couple years on 😅

image

gondalez avatar Aug 23 '23 07:08 gondalez