Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bartleboeuf
Copy link

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

@rciorba
Copy link

rciorba commented Mar 25, 2020

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

@lkb2k
Copy link

lkb2k commented Jan 30, 2021

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

@lkb2k
Copy link

lkb2k commented Feb 19, 2021

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

@plocke-certn
Copy link

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

@rciorba
Copy link

rciorba commented May 27, 2021

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

+1

@NielsKSchjoedt
Copy link

@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
Copy link

danielapsmaior commented Mar 18, 2022

@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
Copy link

gondalez commented Aug 23, 2023

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.

None yet

7 participants