我无法在docker容器上启动cassandra,这似乎是一个权限问题。请提出一个替代方案。
引用日志:
*Created container adf1efd4de6eb8030a1963089715a80a0ec8e5f2cc1f1f50d867cab7d33c4920, for #26
19:15:08 Starting container with:
19:15:08 CMD:'',
19:15:08 Entrypoint:
19:15:08 '/bin/sh','/tmp/executor.sh',
19:15:08 Started container adf1efd4de6eb8030a1963089715a80a0ec8e5f2cc1f1f50d867cab7d33c4920
19:15:08 Starting script executor 19:15:08 Creating group... 19:15:09 Creating user...
19:15:09 * Cassandra is not running
19:15:09 /etc/init.d/cassandra: 71: ulimit: error setting limit (Operation not permitted)
19:15:09 /etc/init.d/cassandra: 72: ulimit: error setting limit (Operation not permitted)
19:15:09 install: cannot change owner and permissions of '/var/run/cassandra': No such file or directory
19:15:10 start-stop-daemon: unable to set gid to 106 (Operation not permitted) 19:15:20 * Cassandra is not running
19:15:20 Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})
19:15:20 Removing container adf1efd4de6eb8030a1963089715a80a0ec8e5f2cc1f1f50d867cab7d33c4920*
Docker文件:
FROM hub.docker.prod.walmart.com/library/ubuntu:14.04
ENV DEBIAN_FRONTEND=noninteractive
ENV http_proxy http://gec-proxy-svr.homeoffice.wal-mart.com:8080
ENV https_proxy http://gec-proxy-svr.homeoffice.wal-mart.com:8080
RUN apt-get update -y
RUN apt-get install -y software-properties-common debconf-utils
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update -y
RUN echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
RUN apt-get install -y oracle-java8-installer
RUN echo "deb http://www.apache.org/dist/cassandra/debian 22x main" | tee -a /etc/apt/sources.list.d/cassandra.sources.list
RUN echo "deb-src http://www.apache.org/dist/cassandra/debian 22x main" | tee -a /etc/apt/sources.list.d/cassandra.sources.list
RUN gpg --keyserver pgp.mit.edu --recv-keys F758CE318D77295D \
&& gpg --export --armor F758CE318D77295D | apt-key add -
RUN gpg --keyserver pgp.mit.edu --recv-keys 2B5C1B00 \
&& gpg --export --armor 2B5C1B00 | apt-key add -
RUN gpg --keyserver pgp.mit.edu --recv-keys 0353B12C \
&& gpg --export --armor 0353B12C | apt-key add -
RUN apt-get update -y
EXPOSE 9042
RUN apt-get install --quiet --yes --force-yes cassandra
#RUN sleep 10s
#RUN service cassandra start
#RUN sleep 10s
#RUNservice cassandra status
答案 0 :(得分:0)
我在这里将您的Dockerfile与Docker Hub进行了比较: https://github.com/docker-library/cassandra/blob/master/3.11/Dockerfile
(在页面层次结构中,可以根据需要使用不同的版本。)
您在Dockerfile中拥有大多数元素,但是有一些命令可以在官方Dockerfile中创建目录。
您可以使用此官方人员作为替补。