why the Listener in Oracle XE database does not start upon the initialization of the Docker container?

0

I've setup my Oracle XE database on a docker container, but when i start the container even though i get this message on logs Database ready to use. Enjoy! ;) and i can connect to the database successfully obviously, i cannot connect to it from DataGrip. when i exec bash to the container and check the Listener, it is not started for some reason. I have to start the Listener myself.

this is the Dockerfile im using.

FROM ubuntu:14.04

MAINTAINER Maksym Bilenko <sath891@gmail.com>

# get rid of the message: "debconf: unable to initialize frontend: Dialog"
ENV DEBIAN_FRONTEND noninteractive

ADD chkconfig /sbin/chkconfig
ADD oracle-install.sh /oracle-install.sh
ADD init.ora /
ADD initXETemp.ora /

# Prepare to install Oracle
RUN apt-get update && apt-get install -y -q libaio1 net-tools bc curl rlwrap && \
apt-get clean && \
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* &&\
ln -s /usr/bin/awk /bin/awk &&\
mkdir /var/lock/subsys &&\
chmod 755 /sbin/chkconfig &&\
/oracle-install.sh

# see issue #1
ENV ORACLE_HOME /u01/app/oracle/product/11.2.0/xe
ENV PATH $ORACLE_HOME/bin:$PATH
ENV ORACLE_SID=XE
ENV DEFAULT_SYS_PASS oracle

EXPOSE 1521
EXPOSE 8080
VOLUME ["/u01/app/oracle"]

ENV processes 500
ENV sessions 555
ENV transactions 610

ADD entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
CMD [""]

konstantinos

Posted 2019-04-10T08:38:01.290

Reputation: 1

Without knowing how that image is built there is no telling why it wouldn't be started. If you can connect it doesn't look like the listener is needed. – Seth – 2019-04-10T09:00:51.053

1@Seth yes, the problem is not that i cant connect to the database itself, it is that i cannot connect from inside the DataGrip tool. it says that the Listener is down, so i have to always get into container to start it over again. – konstantinos – 2019-04-10T12:15:19.540

Did you try to add the start of the listener to the entrypoint.sh or to include a check for the listener in it? – Seth – 2019-04-11T05:35:07.160

@Seth no actually i didn't but why should i try to start the listener myself? isn't something that should start automatically? i mean, its the first time i encounter something like this. – konstantinos – 2019-04-11T07:53:40.170

Acccording to this "In Oracle 10g release 2, the dbstart command includes an automatic start of the listener,". It's unclear what your entrypoint.sh is doing. If you need to start it manually every time it seems obvious that it doesn't start automatically or some error log should contain information as to why it terminates.You will have to look into the Oracle documentation as to whenever it should be starting automatically with your configuration. – Seth – 2019-04-11T09:04:52.933

No answers