-
Type: Question
-
Status: Resolved
-
Priority: Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: nuxeoctl start/stop/admin
-
Tags:
-
Backlog priority:700
Issue is reproducible on Linux (Docker) or Mac (ZIP) - 2021.LTS or 2021.1.25.3 - both tested.
- Launch server
- Do hot reload
- Works fine first time
- Do hot reload
09/08/22 20:36:47.217 ERROR org.nuxeo.runtime.model.impl.RegistrationInfoImpl Component service:org.nuxeo.ecm.directory.DirectoryServiceImpl notification of application started failed: Data file not found: data/vocabularies/VOC_SubTypes.csv
org.nuxeo.ecm.directory.DirectoryException: Data file not found: data/vocabularies/VOC_SubTypes.csv
This is very simple vocabulary defined in studio
"id","label","obsolete","ordering" "subType1","Sub Type #1","0","0" "subType2","Sub Type #2","0","0" "subType3","Sub Type #3","0","0"
It is referred from a document schema
<xs:element name="subTy"> <xs:simpleType> <xs:restriction base="xs:string" ref:resolver="directoryResolver" ref:directory="VOC_SubTypes"/> </xs:simpleType> </xs:element>
- Docker file (Kafka,MinIO,MongoDB extras installed on top of standard Nuxeo image)
ARG NUXEO_VERSION=2021 FROM docker-private.packages.nuxeo.com/nuxeo/nuxeo:${NUXEO_VERSION} USER 0 RUN yum upgrade -y RUN yum update -y # install RPM Fusion free repository RUN yum -y localinstall --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm #mongo db COPY mongodb-org-5.0.repo /etc/yum.repos.d/mongodb-org-5.0.repo RUN yum install -y mongodb-org # Set an UTF-8 LANG ENV LANG en_US.utf8 # Extra libraries for developers USER 0 RUN echo "1" RUN yum -y install sudo curl zsh wget findutils mlocate sed vim git ffmpeg python utop jq dnf ffmpeg-devel\ redis\ libreoffice\ python3 RUN yum -y groupinstall 'Development Tools' RUN yum install -y centos-release-scl RUN yum-config-manager --enable rhel-server-rhscl-7-rpms RUN yum install -y devtoolset-11 RUN scl enable devtoolset-11 bash # NodeJS tools RUN curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash RUN yum install -y nodejs RUN npm i -g npm@latest RUN npm install -g nuxeo-cli #Kafka RUN useradd kafka -m RUN usermod -aG wheel kafka RUN mkdir $NUXEO_HOME/kafka RUN curl "https://downloads.apache.org/kafka/3.2.1/kafka_2.12-3.2.1.tgz" -o $NUXEO_HOME/kafka/kafka.tgz RUN cd $NUXEO_HOME/kafka && tar -vzxf kafka.tgz --strip 1 #MinIO RUN mkdir $NUXEO_HOME/minio RUN cd $NUXEO_HOME/minio && wget https://dl.min.io/server/minio/release/linux-amd64/minio && chmod +x minio RUN cd $NUXEO_HOME/minio && wget https://dl.min.io/client/mc/release/linux-amd64/mc RUN chmod +x $NUXEO_HOME/minio/mc #Make nuxeo user do sudo RUN echo "nuxeo ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/nuxeo #ZSH Shell For Convenience USER nuxeo RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" RUN sed -i '1 i\export PATH=$HOME/bin:.:/usr/local/bin:$PATH' ~/.zshrc RUN sed -i '2 i\plugins=(git sudo extract z history last-working-dir)' ~/.zshrc RUN echo 'alias zshconfig="vi ~/.zshrc"' >> ~/.zshrc RUN echo 'alias ohmyzsh="vi ~/.oh-my-zsh"' >> ~/.zshrc RUN echo 'alias dir="ls -lCgh"' >> ~/.zshrc RUN sed -i '15 i\ZSH_THEME="xiong-chiamiov-plus"' ~/.zshrc RUN echo 'syntax on' >> ~/.vimrc #Install custom fidelity packages ARG NUXEO_STUDIO_USER ARG NUXEO_TOKEN ARG PROJECT_NAME #Copy very simple nuxeo config without any templates first before we install a custom package COPY initial_nuxeo.conf $NUXEO_CONF RUN cd $NUXEO_HOME && printf "$NUXEO_STUDIO_USER\n$NUXEO_TOKEN\n$PROJECT_NAME\ndev\ndev\n" | ./bin/nuxeoctl register RUN cd $NUXEO_HOME && ./bin/nuxeoctl mp-install amazon-s3-online-storage nuxeo-retention #Folders for additional tools RUN mkdir $NUXEO_HOME/mongo RUN mkdir $NUXEO_HOME/redis #Let get nuxeo log exposed RUN sudo chown -R 900 $NUXEO_HOME/log #Install custom package COPY $PROJECT_NAME.zip /tmp/$PROJECT_NAME.zip RUN cd $NUXEO_HOME && ./bin/nuxeoctl mp-install /tmp/$PROJECT_NAME.zip #Install full nuxeo config COPY nuxeo.conf $NUXEO_CONF RUN sudo chown 900 /etc/nuxeo/nuxeo.conf COPY log4j2.xml $NUXEO_HOME/lib/log4j2.xml #Entry point script COPY start_server.sh $NUXEO_HOME/start_server.sh RUN sudo chown 900 $NUXEO_HOME/start_server.sh RUN chmod +x /$NUXEO_HOME/start_server.sh ENTRYPOINT ["/opt/nuxeo/server/start_server.sh"]
- Build script (register instance)
#!/bin/bash export PROJECT_NAME=fidelity_ctg-csp-new if [ -z "$NEXUS_USER" ] then echo "NEXUS_USER variable is not set !!!" exit fi if [ -z "$NEXUS_PASSWORD" ] then echo "NEXUS_PASSWORD variable is not set !!!" exit fi echo user=$NEXUS_USER password=$NEXUS_PASSWORD docker login docker-private.packages.nuxeo.com -u $NEXUS_USER -p $NEXUS_PASSWORD echo "BUILD NUXEO/FIDELITY DOCKER IMAGE with token=$NUXEO_TOKEN and user=$NUXEO_USER" # Check nuxeo conf exists if [ ! -f nuxeo.conf ] then echo "nuxeo.conf not found !!!" exit fi # Delete old fidelity package rm -rf ./${PROJECT_NAME}.zip # Copy fidelity package from build directory cp ../fidelity_ctg-csp-package/target/fidelity_ctg-csp-package-*-SNAPSHOT.zip ./${PROJECT_NAME}.zip # Check package file exists if [ ! -f ./${PROJECT_NAME}.zip ] then echo "../fidelity_ctg-csp-package/target/fidelity_ctg-csp-package-*-SNAPSHOT.zip not found" exit fi docker build -t ${PROJECT_NAME}\ --build-arg NUXEO_STUDIO_USER=${NUXEO_USER}\ --build-arg NUXEO_TOKEN=${NUXEO_TOKEN}\ --build-arg PROJECT_NAME=${PROJECT_NAME}\ -f .Dockerfile .
- To run
#!/usr/bin/env bash #Script to start docker container export PROJECT_NAME=fidelity_ctg-csp-new #!/bin/bash PORT=9099 IMG=${PROJECT_NAME} CID=${PROJECT_NAME} docker stop $CID docker rm $CID rm -rf container/logs/* echo "running $IMG locally on port $PORT" docker run -d -p $PORT:8080 --name $CID\ -v /$(pwd)/container/shared:/shared\ -v /$(pwd)/container/logs:/opt/nuxeo/server/log\ -v /$(pwd)/container/ui:/opt/nuxeo/server/nxserver/nuxeo.war/ui\ $IMG
- entry point file
#!/usr/bin/env bash
#Run inside docker container. Do not attempt to run it on host log_dir=/opt/nuxeo/server/log sudo echo "starting server" >$log_dir/start_server.log 2>&1 & #MinIO user name and password export MINIO_ROOT_USER=minioadmin export MINIO_ROOT_PASSWORD=minioadmin sudo cd $NUXEO_HOME/redis && nohup redis-server >$log_dir/redis.log 2>&1 & sudo cd $NUXEO_HOME/mongo && nohup mongod -dbpath $NUXEO_HOME/mongo >$log_dir/mongo.log 2>&1 & sudo nohup $NUXEO_HOME/kafka/bin/zookeeper-server-start.sh $NUXEO_HOME/kafka/config/zookeeper.properties >$log_dir/zookeeper.log 2>&1 & sudo nohup $NUXEO_HOME/kafka/bin/kafka-server-start.sh $NUXEO_HOME/kafka/config/server.properties >$log_dir/kafka.log 2>&1 & sudo sudo nohup $NUXEO_HOME/minio/minio server $NUXEO_HOME/minio/ >$log_dir/minio.log 2>&1 & sleep 5 sudo $NUXEO_HOME/minio/mc config host add s3 http://localhost:9000 minioadmin minioadmin >>$log_dir/minio_admin.log 2>&1 sudo $NUXEO_HOME/minio/mc mb s3/fidelity-standard >>$log_dir/minio_admin.log 2>&1 sudo $NUXEO_HOME/minio/mc mb s3/fidelity-compliance >>$log_dir/minio_admin.log 2>&1 sudo $NUXEO_HOME/minio/mc policy set public s3/fidelity-standard >>$log_dir/minio_admin.log 2>&1 sudo $NUXEO_HOME/minio/mc policy set public s3/fidelity-compliance >>$log_dir/minio_admin.log 2>&1 cd $NUXEO_HOME && $NUXEO_HOME/bin/nuxeoctl console >$log_dir/nuxeo.log 2>&1
I will provide on demand entire client project folder. However because it contains some sensitive client data let me do it offline.
You would need to use user credentials when doing build a) to get from Nexus a docker image b) register instance when doing docker build (it needs to be connected to fidelity customer project)
export NUXEO_USER=ssokolov
export NUXEO_TOKEN=ask me
export NEXUS_USER=You can use your nexus
export NEXUS_PASSWORD=Use your nexus
- duplicates
-
NXP-28308 Rework the Nuxeo Connect download/install package
- Open