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

Can't set the shm_size for oracle xe #952

Closed
AlfAtGitHub opened this issue Nov 5, 2018 · 5 comments
Closed

Can't set the shm_size for oracle xe #952

AlfAtGitHub opened this issue Nov 5, 2018 · 5 comments

Comments

@AlfAtGitHub
Copy link

My oracle xe container is currently not starting because of a lack of shared memory:
"A database XE container needs at least 1 GB of shared memory (/dev/shm)."

My problem here: How can I set the shm_size (shmSize) for OracleContainer respectively GenericContainer?

I've already tried: .withCreateContainerCmdModifier(cmd -> cmd.withMemory((long) 4 * 1024 * 1024)).

Also tried some settings within the testcontainers.properties. Unfortunately I've not found what params are available and how to set it here.

Any help welcome. Thanks.

@fzakaria
Copy link
Contributor

fzakaria commented Nov 5, 2018

I am also hitting the exception

Here are the logs from Docker docker logs $ORACLE_CONTAINER -f

/dev/shm (--shm-size) needs to be at least 1G
The Oracle base has been set to /u01/app/oracle
/dev/shm (--shm-size) needs to be at least 1G
The Oracle base has been set to /u01/app/oracle
/dev/shm (--shm-size) needs to be at least 1G
The Oracle base has been set to /u01/app/oracle
/dev/shm (--shm-size) needs to be at least 1G

@kiview
Copy link
Member

kiview commented Nov 6, 2018

The change in #957 makes sense of course.
But is this a change that has been introduced in a more recent Oracle XE image?

It's working for me with image wnameless/oracle-xe-11g@sha256:825ba7 by the way.

@kiview kiview changed the title How to set the shm_size for oracle xe? Can't set the shm_size for oracle xe Nov 6, 2018
@fzakaria
Copy link
Contributor

fzakaria commented Nov 6, 2018

I am not using the wnameless docker image -- i've built my own docker image according to the Oracle GitHub documentation which I've linked in the pull-request;

https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/FAQ.md

Looking at his source; he's commented out

#memory_target=1073741824
(https://github.com/wnameless/docker-oracle-xe-11g/search?q=memory&unscoped_q=memory)

Given that you should be able to provide your own image; I think this is a worthwhile change still.

@rnorth
Copy link
Member

rnorth commented Nov 10, 2018

Yeah, I think it makes sense to do this for the OracleContainer class.
I’m just wondering if the solution should be to keep Testcontainers API as-is, and have the OracleContainer class use the docker-java API specifically to request shared memory...

Sent with GitHawk

@fzakaria
Copy link
Contributor

fzakaria commented Nov 10, 2018 via email

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

No branches or pull requests

4 participants