openmeetings / openmeetings-docker

Docker image for OM
Apache License 2.0
110 stars 57 forks source link

unable to create directory '/nonexistent/.cache/dconf': Permission denied. #36

Closed guofengzh closed 1 year ago

guofengzh commented 1 year ago

When uploading file, the logs on the console shows:

(process:15426): dconf-CRITICAL **: 14:06:22.660: unable to create directory '/nonexistent/.cache/dconf': Permission denied.  dconf will not work properly.

OpenMeetings 7.1.0, full image.

But the file is uploaded and converted successfully.

What is the problem? Should it be fixed?

solomax commented 1 year ago

Hello @guofengzh

Could you please tell me what were your steps?

I've just built full version locally and can't see this error :(((

The error itself caused by the fact user nobody has no $HOME, it can be fixed

But I need steps to reproduce first :)

guofengzh commented 1 year ago

Select "My conference room (for 1-16 users)" to enter the room, then in the file tabe, click the up arrow to upload a PPT file. The file load successfully and can be dropped to the whiteboard. The content on the whiteboard has no problem.

Using "sudo docker logs omc", see the two lines:

(process:50467): dconf-CRITICAL **: 13:01:06.819: unable to create directory '/nonexistent/.cache/dconf': Permission denied.  dconf will not work properly.

(process:50482): dconf-CRITICAL **: 13:01:07.338: unable to create directory '/nonexistent/.cache/dconf': Permission denied.  dconf will not work properly.
ubuntu@ip-172-31-10-173:~$

omc is my container name. I build my own image.

I use the 7.1.0 tag, and made some changes to the Dokerfile:

1) I have add the following lines for Chinese fonts at the front of the Dockerfile:

ENV OM_FONTS=/usr/share/fonts/chinese

# Chinese Fonts 

RUN apt-get install -y --no-install-recommends \
    ttf-mscorefonts-installer \
    fontconfig

RUN mkdir ${OM_FONTS}

WORKDIR ${OM_FONTS}
COPY fonts/*.* ./
RUN chmod 755 *.TTF
RUN chmod 755 *.ttf
RUN chmod 755 *.ttc
RUN mkfontscale
RUN mkfontdir
RUN fc-cache -fv

2) I also add "hkp://keyserver.ubuntu.com:80" for the keyserver, because the key servers in the origial Dockfile does not work (connection failed) when build it in a AWS VM in Korea region.

I do not modify any other part of the Dockerfile.

The full Dockerfile:

# #############################################
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# #############################################

FROM ubuntu:20.04
ENV OM_VER_MAJ='7'
ENV OM_VER_MIN='1'
ENV OM_VER_MIC='0'
ENV OM_VERSION="${OM_VER_MAJ}.${OM_VER_MIN}.${OM_VER_MIC}"
LABEL vendor="Apache OpenMeetings dev team"
LABEL version="${OM_VERSION}"
LABEL maintainer=dev@openmeetings.apache.org

ENV DB_ROOT_PASS '12345'
ENV OM_USER="om_admin"
ENV OM_PASS="1Q2w3e4r5t^y"
ENV DAEMON_USER="nobody"
ENV DAEMON_UID="65534"
ENV OM_DB_NAME="openmeetings"
ENV OM_DB_TYPE="mysql"
ENV OM_DB_HOST="localhost"
ENV OM_DB_PORT="3306"
ENV OM_DB_USER="om_admin"
ENV OM_DB_PASS="12345"
ENV OM_KURENTO_WS_URL="ws://127.0.0.1:8888/kurento"
ENV TURN_URL=""
ENV TURN_USER=""
ENV TURN_PASS=""
ENV OM_DATA_DIR="/opt/omdata"
ENV work=/opt
ENV OM_HOME=/opt/openmeetings
ENV MYSQL_J_VER="8.0.33"
ENV DB2_J_VER="11.5.8.0"
ENV PORTS=5443
ENV SERVER_TZ=UTC

ENV OM_FONTS=/usr/share/fonts/chinese

# Chinese Fonts 

RUN apt-get install -y --no-install-recommends \
    ttf-mscorefonts-installer \
    fontconfig

RUN mkdir ${OM_FONTS}

WORKDIR ${OM_FONTS}
COPY fonts/*.* ./
RUN chmod 755 *.TTF
RUN chmod 755 *.ttf
RUN chmod 755 *.ttc
RUN mkfontscale
RUN mkfontdir
RUN fc-cache -fv

WORKDIR ${OM_HOME}
RUN apt-get update && apt-get install -y --no-install-recommends \
    apt-utils \
  && apt-get install -y --no-install-recommends \
    software-properties-common \
    gnupg2 \
    dirmngr \
    unzip \
    wget \
    ghostscript \
    libgs-dev \
    imagemagick \
    sox \
    sudo \
    openjdk-17-jre

RUN apt-get install -y --no-install-recommends \
    libreoffice \
    ffmpeg \
  && apt-get clean \
  && rm -rf /var/lib/apt/lists/* \
  \
  && wget "https://archive.apache.org/dist/openmeetings/${OM_VERSION}/bin/apache-openmeetings-${OM_VERSION}.tar.gz" -O ${work}/om.tar.gz \
  && wget "https://archive.apache.org/dist/openmeetings/${OM_VERSION}/bin/apache-openmeetings-${OM_VERSION}.tar.gz.asc" -O ${work}/om.asc \
  && export GNUPGHOME="$(mktemp -d)" \
  && for server in hkp://keyserver.ubuntu.com:80 \
                     hkp://ipv4.pool.sks-keyservers.net:80 \
                     hkp://ha.pool.sks-keyservers.net:80 \
                     hkp://pgp.mit.edu:80 \
                     hkp://keyserver.pgp.com:80 \
    ; do \
      gpg --keyserver "$server" --recv-keys 8456901E && break || echo "Trying new server..." \
    ; done \
  && gpg --batch --verify ${work}/om.asc ${work}/om.tar.gz \
  && tar -xzf ${work}/om.tar.gz --strip-components=1 -C ${OM_HOME}/ \
  && rm -rf ${GNUPGHOME} ${work}/om.asc ${work}/om.tar.gz \
  && wget https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/${MYSQL_J_VER}/mysql-connector-j-${MYSQL_J_VER}.jar -P ${OM_HOME}/webapps/openmeetings/WEB-INF/lib \
  && wget https://repo1.maven.org/maven2/com/ibm/db2/jcc/${DB2_J_VER}/jcc-${DB2_J_VER}.jar -P ${OM_HOME}/webapps/openmeetings/WEB-INF/lib \
  && sed -i 's|<policy domain="coder" rights="none" pattern="PS" />|<!--policy domain="coder" rights="none" pattern="PS" />|g; s|<policy domain="coder" rights="none" pattern="XPS" />|<policy domain="coder" rights="none" pattern="XPS" /-->|g' /etc/ImageMagick-6/policy.xml

WORKDIR ${work}
COPY scripts/*.sh ./

RUN chmod a+x ${work}/*.sh

ARG BUILD_TYPE="min"
ENV OM_TYPE=${BUILD_TYPE}

RUN cat /etc/issue \
  \
  && echo "OM server of type ${OM_TYPE} will be built" \
  \
  && ./om_install.sh

EXPOSE ${PORTS}

ENTRYPOINT [ "bash", "-c", "${work}/om.sh" ]

The build command is :

sudo docker build -t  omc/openmeetings:7.1.0 --build-arg BUILD_TYPE=full .
solomax commented 1 year ago

Hello @guofengzh,

Thanks for the detailed steps I was able to reproduce (and hopefully fix the issue)

I've added additional keyserver, not sure about the fonts :( Could you please advise shall I add your # Chinese Fonts to the Docker file? :)

guofengzh commented 1 year ago

Hello Solomax,

Your fix works well here. The issue resolved.

I think you do not need to add the fonts to the dockerfile because it is specific to different languages.

I close this issue..

Thanks for your help very much.

solomax commented 1 year ago

Great! Thanks for verification!