Skip to content

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

Open
bartleboeuf wants to merge 2 commits into
roribio:masterfrom
bartleboeuf:master
Open

Feat: upgrade to Alpine OpenJDK + last release of ElasticMQ and sqs-insight#37
bartleboeuf wants to merge 2 commits into
roribio:masterfrom
bartleboeuf:master

Conversation

@bartleboeuf

Copy link
Copy Markdown

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

@rciorba

rciorba commented Mar 25, 2020

Copy link
Copy Markdown

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

@lkb2k

lkb2k commented Jan 30, 2021

Copy link
Copy Markdown

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

@lkb2k

lkb2k commented Feb 19, 2021

Copy link
Copy Markdown

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

@plocke-certn

Copy link
Copy Markdown

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

@rciorba

rciorba commented May 27, 2021

Copy link
Copy Markdown

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.

@NielsKSchjoedt

Copy link
Copy Markdown

+1

@NielsKSchjoedt

Copy link
Copy Markdown

@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)
> sqs-insight@0.3.0 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?

@danielapsmaior

danielapsmaior commented Mar 18, 2022

Copy link
Copy Markdown

@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)
> sqs-insight@0.3.0 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?

@gondalez

gondalez commented Aug 23, 2023

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants