zlfben / trace2tap

Trace2TAP: Synthesizing Trigger-Action Programs From Traces of Behavior
GNU General Public License v3.0
2 stars 0 forks source link

Backend/iotcore/celery containers didn't start #4

Open zlfben opened 3 years ago

zlfben commented 3 years ago

Thanks for the information. Actually the problem persists, here are some informations that I gathered : docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7f86dba2bdb8 redis "docker-entrypoint.s…" 2 minutes ago Up 2 minutes 6379/tcp trace2tap_redis_1 724329fc67c7 trace2tap_frontend "ng serve --host 0.0…" 2 minutes ago Up 2 minutes 0.0.0.0:4200->4200/tcp trace2tap_frontend_1 bf7664ef7ed1 trace2tap_postgres "/usr/lib/postgresql…" 2 minutes ago Up 2 minutes 5432/tcp trace2tap_postgres_1


The logs of trace2tap_celery_beat_1 displays sh: 1: ../init-celery-beat.sh: not found


as with trace2tap_iotcore_1 sh: 1: ../init-core.sh: not found


same kind of error with others containers

Originally posted by @AlexDmr in https://github.com/zlfben/trace2tap/issues/3#issuecomment-717771452

zlfben commented 3 years ago

It seems to me that the scripts to start the backend/iotcore/celery containers are not put into the image correctly. They should be inserted in docker-dev/Dockerfile-backend, etc:

docker-dev/Dockerfile-backend, Line 51-60:

set up scripts

ADD ./scripts/init-backend.sh /home/iftttuser/ RUN chown iftttuser /home/iftttuser/init-backend.sh RUN chmod +x /home/iftttuser/init-backend.sh ADD ./scripts/init-celery-beat.sh /home/iftttuser/ RUN chown iftttuser /home/iftttuser/init-celery-beat.sh RUN chmod +x /home/iftttuser/init-celery-beat.sh ADD ./scripts/init-celery-worker.sh /home/iftttuser/ RUN chown iftttuser /home/iftttuser/init-celery-worker.sh RUN chmod +x /home/iftttuser/init-celery-worker.sh

My guess is that lines before these failed when building the image. Could you send me the output of ./start_dev.sh to see whether the build of images succeeded?

AlexDmr commented 3 years ago

Thanks for your help, here it is : ./start_server_dev.sh --data data/data-anonymous.sql data/iotcore.sql mkdir: cannot create directory ‘secrets’: File exists WARNING: The MIGRATION variable is not set. Defaulting to a blank string. redis uses an image, skipping Building postgres Step 1/17 : FROM ubuntu:xenial ---> dfeff22e96ae Step 2/17 : ARG FILENAME ---> Using cache ---> 5677326d09c5 Step 3/17 : ARG FILENAMECORE ---> Using cache ---> d62d39f8c2fc Step 4/17 : RUN apt update && apt install -y python-software-properties software-properties-common postgresql-9.5 postgresql-client-9.5 postgresql-contrib-9.5 ---> Using cache ---> 80af8c0d046d Step 5/17 : RUN chown -R postgres:postgres /var/lib/postgresql/9.5/main ---> Using cache ---> 01a5dde471a1 Step 6/17 : ADD ./data/backup.sql /home/postgres/ ---> Using cache ---> b58776fbaaae Step 7/17 : ADD $FILENAMECORE /home/postgres/iotcore.sql ---> Using cache ---> 9ce0f7b06805 Step 8/17 : ADD $FILENAME /home/postgres/backup5.sql ---> Using cache ---> a91ce61dee2f Step 9/17 : ADD ./scripts/init-db.sh /home/postgres/ ---> Using cache ---> d401c5488f88 Step 10/17 : RUN chown postgres /home/postgres/init-db.sh ---> Using cache ---> e9009dbdbc21 Step 11/17 : RUN chmod +x /home/postgres/init-db.sh ---> Using cache ---> eae01d78fc58 Step 12/17 : USER postgres ---> Using cache ---> b695b6af5695 Step 13/17 : RUN /etc/init.d/postgresql start ---> Using cache ---> 14dad484c616 Step 14/17 : RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.5/main/pg_hba.conf ---> Using cache ---> 7ff22c6e6ea2 Step 15/17 : RUN echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf ---> Using cache ---> 0abbc1ab1664 Step 16/17 : EXPOSE 5432 ---> Using cache ---> ecf0e7168ced Step 17/17 : CMD ["/usr/lib/postgresql/9.5/bin/postgres", "-D", "/var/lib/postgresql/9.5/main", "-c", "config_file=/etc/postgresql/9.5/main/postgresql.conf"] ---> Using cache ---> cd72ff052e52

Successfully built cd72ff052e52 Successfully tagged trace2tap_postgres:latest Building backend Step 1/25 : FROM ubuntu:bionic ---> 56def654ec22 Step 2/25 : USER root ---> Using cache ---> 94e319aea42e Step 3/25 : RUN apt update && apt install -y wget net-tools python3-dev g++ make unzip ---> Using cache ---> ae661bec3461 Step 4/25 : RUN groupadd -g 1000 -r iftttuser && useradd --no-log-init -r -u 1000 -g iftttuser iftttuser && mkhomedir_helper iftttuser ---> Using cache ---> d4cc4331343a Step 5/25 : RUN cd /root && wget https://www.lrde.epita.fr/dload/spot/spot-2.7.5.tar.gz && tar -zxvf spot-2.7.5.tar.gz && cd /root/spot-2.7.5 && ./configure && make && make install && ldconfig && cp -rf /usr/local/lib/python3.6/site-packages/ /usr/local/lib/python3.6/dist-packages ---> Using cache ---> ddc02dfec0b1 Step 6/25 : RUN cd /root && wget https://github.com/Z3Prover/z3/releases/download/Z3-4.8.5/z3-4.8.5-x64-ubuntu-16.04.zip && unzip z3-4.8.5-x64-ubuntu-16.04 && cd /root/z3-4.8.5-x64-ubuntu-16.04 && cp bin/.so /usr/lib && cp bin/z3 /usr/bin && cp -r bin/python/z3/ /usr/lib/python3/dist-packages && cp include/* /usr/include ---> Using cache ---> c3aa2270e150 Step 7/25 : RUN cd /root && wget http://robertdick.org/python/qm-0.2.tar.gz && tar -zxvf qm-0.2.tar.gz && cd /root/qm-0.2 && python3 setup.py install ---> Using cache ---> 5ef5dbaa47db Step 8/25 : RUN apt update && apt install -y python3-pip ---> Using cache ---> 62cdccf4992a Step 9/25 : RUN pip3 install sklearn graphviz kmodes webcolors ---> Using cache ---> 2c544c6f7272 Step 10/25 : ADD ./iot-tap-backend/requirements.txt /home/iftttuser ---> Using cache ---> 3f2318b55a40 Step 11/25 : RUN apt update && apt install -y python3-pip ---> Using cache ---> 54e55fc5dfe6 Step 12/25 : RUN pip3 install -r /home/iftttuser/requirements.txt ---> Using cache ---> 8c59bf03ec36 Step 13/25 : RUN apt update && apt install -y postgresql-client-10 ---> Using cache ---> c32581b74406 Step 14/25 : ADD ./scripts/init-backend.sh /home/iftttuser/ ---> Using cache ---> 76d6c6fc64e3 Step 15/25 : RUN chown iftttuser /home/iftttuser/init-backend.sh ---> Using cache ---> cdbb69cba200 Step 16/25 : RUN chmod +x /home/iftttuser/init-backend.sh ---> Using cache ---> 348f107bfbe7 Step 17/25 : ADD ./scripts/init-celery-beat.sh /home/iftttuser/ ---> Using cache ---> eab3e394a2cb Step 18/25 : RUN chown iftttuser /home/iftttuser/init-celery-beat.sh ---> Using cache ---> 09b6d069365e Step 19/25 : RUN chmod +x /home/iftttuser/init-celery-beat.sh ---> Using cache ---> fb2c03ff1efb Step 20/25 : ADD ./scripts/init-celery-worker.sh /home/iftttuser/ ---> Using cache ---> fe85adcbebac Step 21/25 : RUN chown iftttuser /home/iftttuser/init-celery-worker.sh ---> Using cache ---> 4a8826d578df Step 22/25 : RUN chmod +x /home/iftttuser/init-celery-worker.sh ---> Using cache ---> ef1c304f8642 Step 23/25 : USER iftttuser ---> Using cache ---> 63b7390d5464 Step 24/25 : WORKDIR /home/iftttuser/backend ---> Using cache ---> e9c76bbf3ec6 Step 25/25 : CMD ["sh", "-c", "../init-backend.sh"] ---> Using cache ---> c855719cfc93

Successfully built c855719cfc93 Successfully tagged trace2tap_backend:latest Building frontend Step 1/18 : FROM ubuntu:xenial ---> dfeff22e96ae Step 2/18 : USER root ---> Using cache ---> f7bbd531883e Step 3/18 : RUN rm /bin/sh && ln -s /bin/bash /bin/sh ---> Using cache ---> 4b6ce61bab1c Step 4/18 : RUN apt update --fix-missing ---> Using cache ---> 8fca59573b65 Step 5/18 : RUN apt update && apt install -y curl build-essential libssl-dev nginx nodejs ---> Using cache ---> 11c90d42480c Step 6/18 : RUN groupadd -g 1000 -r superifttt && useradd --no-log-init -r -u 1000 -g superifttt superifttt && mkhomedir_helper superifttt ---> Using cache ---> 8044b4d07149 Step 7/18 : USER superifttt ---> Using cache ---> f6ae9c18fe8f Step 8/18 : ENV NVM_DIR /home/superifttt/.nvm ---> Using cache ---> c4908683f9a0 Step 9/18 : ENV NODE_VERSION 10.13.0 ---> Using cache ---> e7be3b504403 Step 10/18 : RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash && source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm alias default $NODE_VERSION && nvm use default ---> Using cache ---> 5719026b7e15 Step 11/18 : ENV NODE_PATH $NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules ---> Using cache ---> e6b961f1e817 Step 12/18 : ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH ---> Using cache ---> 967bcc60983e Step 13/18 : RUN npm install -g @angular/cli@6.1.0 ---> Using cache ---> b517985f7b6b Step 14/18 : RUN mkdir /home/superifttt/frontend ---> Using cache ---> cd770ebc6596 Step 15/18 : COPY --chown=superifttt ./ifttt-frontend/rule-creation/RMI/package.json /home/superifttt/ ---> Using cache ---> 67fa14b252a3 Step 16/18 : RUN cd /home/superifttt/ && npm install ---> Using cache ---> add35d9318be Step 17/18 : WORKDIR /home/superifttt/frontend ---> Using cache ---> bba71839fdba Step 18/18 : CMD [ "ng", "serve", "--host", "0.0.0.0", "--poll=2000", "--disable-host-check" ] ---> Using cache ---> 8b0c582f47fc

Successfully built 8b0c582f47fc Successfully tagged trace2tap_frontend:latest Building iotcore Step 1/12 : FROM ubuntu:xenial ---> dfeff22e96ae Step 2/12 : RUN groupadd -g 1000 -r iotcore && useradd --no-log-init -r -u 1000 -g iotcore iotcore && mkhomedir_helper iotcore ---> Using cache ---> 0596992417f8 Step 3/12 : COPY ./iot-core/requirements.txt /home/iotcore ---> Using cache ---> b90deba9ebc2 Step 4/12 : RUN apt update && apt install -y python3-pip ---> Using cache ---> cb0cd5434082 Step 5/12 : RUN pip3 install -r /home/iotcore/requirements.txt ---> Using cache ---> 2d9a669b46db Step 6/12 : RUN apt update && apt install -y postgresql-client-9.5 ---> Using cache ---> f822407b7331 Step 7/12 : ADD ./scripts/init-core.sh /home/iotcore ---> Using cache ---> 7702239e9bf4 Step 8/12 : RUN chown iotcore /home/iotcore/init-core.sh ---> Using cache ---> 792ae4697696 Step 9/12 : RUN chmod +x /home/iotcore/init-core.sh ---> Using cache ---> 339ad589eef7 Step 10/12 : USER iotcore ---> Using cache ---> 16af24c4b01c Step 11/12 : WORKDIR /home/iotcore/iotcore ---> Using cache ---> e5d2b4bf19bf Step 12/12 : CMD ["sh", "-c", "../init-core.sh"] ---> Using cache ---> 54515d0f5b6a

Successfully built 54515d0f5b6a Successfully tagged trace2tap_iotcore:latest Building nginx Step 1/4 : FROM nginx ---> f35646e83998 Step 2/4 : COPY ./ssl/superifttt.crt /etc/ssl/certs/superifttt.crt ---> Using cache ---> ec26c8228b82 Step 3/4 : COPY ./ssl/private/superifttt.key /etc/ssl/private/superifttt.key ---> Using cache ---> 6a5e963599ef Step 4/4 : COPY ./nginx/nginx.conf /etc/nginx/nginx.conf ---> Using cache ---> 4ad21b1b3741

Successfully built 4ad21b1b3741 Successfully tagged trace2tap_nginx:latest Building celery_worker Step 1/25 : FROM ubuntu:bionic ---> 56def654ec22 Step 2/25 : USER root ---> Using cache ---> 94e319aea42e Step 3/25 : RUN apt update && apt install -y wget net-tools python3-dev g++ make unzip ---> Using cache ---> ae661bec3461 Step 4/25 : RUN groupadd -g 1000 -r iftttuser && useradd --no-log-init -r -u 1000 -g iftttuser iftttuser && mkhomedir_helper iftttuser ---> Using cache ---> d4cc4331343a Step 5/25 : RUN cd /root && wget https://www.lrde.epita.fr/dload/spot/spot-2.7.5.tar.gz && tar -zxvf spot-2.7.5.tar.gz && cd /root/spot-2.7.5 && ./configure && make && make install && ldconfig && cp -rf /usr/local/lib/python3.6/site-packages/ /usr/local/lib/python3.6/dist-packages ---> Using cache ---> ddc02dfec0b1 Step 6/25 : RUN cd /root && wget https://github.com/Z3Prover/z3/releases/download/Z3-4.8.5/z3-4.8.5-x64-ubuntu-16.04.zip && unzip z3-4.8.5-x64-ubuntu-16.04 && cd /root/z3-4.8.5-x64-ubuntu-16.04 && cp bin/.so /usr/lib && cp bin/z3 /usr/bin && cp -r bin/python/z3/ /usr/lib/python3/dist-packages && cp include/* /usr/include ---> Using cache ---> c3aa2270e150 Step 7/25 : RUN cd /root && wget http://robertdick.org/python/qm-0.2.tar.gz && tar -zxvf qm-0.2.tar.gz && cd /root/qm-0.2 && python3 setup.py install ---> Using cache ---> 5ef5dbaa47db Step 8/25 : RUN apt update && apt install -y python3-pip ---> Using cache ---> 62cdccf4992a Step 9/25 : RUN pip3 install sklearn graphviz kmodes webcolors ---> Using cache ---> 2c544c6f7272 Step 10/25 : ADD ./iot-tap-backend/requirements.txt /home/iftttuser ---> Using cache ---> 3f2318b55a40 Step 11/25 : RUN apt update && apt install -y python3-pip ---> Using cache ---> 54e55fc5dfe6 Step 12/25 : RUN pip3 install -r /home/iftttuser/requirements.txt ---> Using cache ---> 8c59bf03ec36 Step 13/25 : RUN apt update && apt install -y postgresql-client-10 ---> Using cache ---> c32581b74406 Step 14/25 : ADD ./scripts/init-backend.sh /home/iftttuser/ ---> Using cache ---> 76d6c6fc64e3 Step 15/25 : RUN chown iftttuser /home/iftttuser/init-backend.sh ---> Using cache ---> cdbb69cba200 Step 16/25 : RUN chmod +x /home/iftttuser/init-backend.sh ---> Using cache ---> 348f107bfbe7 Step 17/25 : ADD ./scripts/init-celery-beat.sh /home/iftttuser/ ---> Using cache ---> eab3e394a2cb Step 18/25 : RUN chown iftttuser /home/iftttuser/init-celery-beat.sh ---> Using cache ---> 09b6d069365e Step 19/25 : RUN chmod +x /home/iftttuser/init-celery-beat.sh ---> Using cache ---> fb2c03ff1efb Step 20/25 : ADD ./scripts/init-celery-worker.sh /home/iftttuser/ ---> Using cache ---> fe85adcbebac Step 21/25 : RUN chown iftttuser /home/iftttuser/init-celery-worker.sh ---> Using cache ---> 4a8826d578df Step 22/25 : RUN chmod +x /home/iftttuser/init-celery-worker.sh ---> Using cache ---> ef1c304f8642 Step 23/25 : USER iftttuser ---> Using cache ---> 63b7390d5464 Step 24/25 : WORKDIR /home/iftttuser/backend ---> Using cache ---> e9c76bbf3ec6 Step 25/25 : CMD ["sh", "-c", "../init-backend.sh"] ---> Using cache ---> c855719cfc93

Successfully built c855719cfc93 Successfully tagged trace2tap_celery_worker:latest Building celery_beat Step 1/25 : FROM ubuntu:bionic ---> 56def654ec22 Step 2/25 : USER root ---> Using cache ---> 94e319aea42e Step 3/25 : RUN apt update && apt install -y wget net-tools python3-dev g++ make unzip ---> Using cache ---> ae661bec3461 Step 4/25 : RUN groupadd -g 1000 -r iftttuser && useradd --no-log-init -r -u 1000 -g iftttuser iftttuser && mkhomedir_helper iftttuser ---> Using cache ---> d4cc4331343a Step 5/25 : RUN cd /root && wget https://www.lrde.epita.fr/dload/spot/spot-2.7.5.tar.gz && tar -zxvf spot-2.7.5.tar.gz && cd /root/spot-2.7.5 && ./configure && make && make install && ldconfig && cp -rf /usr/local/lib/python3.6/site-packages/ /usr/local/lib/python3.6/dist-packages ---> Using cache ---> ddc02dfec0b1 Step 6/25 : RUN cd /root && wget https://github.com/Z3Prover/z3/releases/download/Z3-4.8.5/z3-4.8.5-x64-ubuntu-16.04.zip && unzip z3-4.8.5-x64-ubuntu-16.04 && cd /root/z3-4.8.5-x64-ubuntu-16.04 && cp bin/.so /usr/lib && cp bin/z3 /usr/bin && cp -r bin/python/z3/ /usr/lib/python3/dist-packages && cp include/* /usr/include ---> Using cache ---> c3aa2270e150 Step 7/25 : RUN cd /root && wget http://robertdick.org/python/qm-0.2.tar.gz && tar -zxvf qm-0.2.tar.gz && cd /root/qm-0.2 && python3 setup.py install ---> Using cache ---> 5ef5dbaa47db Step 8/25 : RUN apt update && apt install -y python3-pip ---> Using cache ---> 62cdccf4992a Step 9/25 : RUN pip3 install sklearn graphviz kmodes webcolors ---> Using cache ---> 2c544c6f7272 Step 10/25 : ADD ./iot-tap-backend/requirements.txt /home/iftttuser ---> Using cache ---> 3f2318b55a40 Step 11/25 : RUN apt update && apt install -y python3-pip ---> Using cache ---> 54e55fc5dfe6 Step 12/25 : RUN pip3 install -r /home/iftttuser/requirements.txt ---> Using cache ---> 8c59bf03ec36 Step 13/25 : RUN apt update && apt install -y postgresql-client-10 ---> Using cache ---> c32581b74406 Step 14/25 : ADD ./scripts/init-backend.sh /home/iftttuser/ ---> Using cache ---> 76d6c6fc64e3 Step 15/25 : RUN chown iftttuser /home/iftttuser/init-backend.sh ---> Using cache ---> cdbb69cba200 Step 16/25 : RUN chmod +x /home/iftttuser/init-backend.sh ---> Using cache ---> 348f107bfbe7 Step 17/25 : ADD ./scripts/init-celery-beat.sh /home/iftttuser/ ---> Using cache ---> eab3e394a2cb Step 18/25 : RUN chown iftttuser /home/iftttuser/init-celery-beat.sh ---> Using cache ---> 09b6d069365e Step 19/25 : RUN chmod +x /home/iftttuser/init-celery-beat.sh ---> Using cache ---> fb2c03ff1efb Step 20/25 : ADD ./scripts/init-celery-worker.sh /home/iftttuser/ ---> Using cache ---> fe85adcbebac Step 21/25 : RUN chown iftttuser /home/iftttuser/init-celery-worker.sh ---> Using cache ---> 4a8826d578df Step 22/25 : RUN chmod +x /home/iftttuser/init-celery-worker.sh ---> Using cache ---> ef1c304f8642 Step 23/25 : USER iftttuser ---> Using cache ---> 63b7390d5464 Step 24/25 : WORKDIR /home/iftttuser/backend ---> Using cache ---> e9c76bbf3ec6 Step 25/25 : CMD ["sh", "-c", "../init-backend.sh"] ---> Using cache ---> c855719cfc93

Successfully built c855719cfc93 Successfully tagged trace2tap_celery_beat:latest WARNING: The FILENAME variable is not set. Defaulting to a blank string. WARNING: The FILENAMECORE variable is not set. Defaulting to a blank string. WARNING: The MIGRATION variable is not set. Defaulting to a blank string. Stopping trace2tap_redis_1 ... done Removing trace2tap_celery_beat_1 ... done Removing trace2tap_celery_worker_1 ... done Removing trace2tap_nginx_1 ... done Removing trace2tap_backend_1 ... done Removing trace2tap_iotcore_1 ... done Removing trace2tap_redis_1 ... done Removing trace2tap_frontend_1 ... done Removing trace2tap_postgres_1 ... done Removing network trace2tap_default Removing volume trace2tap_static_iotcore Removing volume trace2tap_static_backend Removing volume trace2tap_pg_data WARNING: The FILENAME variable is not set. Defaulting to a blank string. WARNING: The FILENAMECORE variable is not set. Defaulting to a blank string. WARNING: The MIGRATION variable is not set. Defaulting to a blank string. Creating network "trace2tap_default" with the default driver Creating volume "trace2tap_static_iotcore" with default driver Creating volume "trace2tap_static_backend" with default driver Creating volume "trace2tap_pg_data" with default driver Creating trace2tap_postgres_1 ... done : not foundres/init-db.sh: 2: /home/postgres/init-db.sh: /home/postgres/init-db.sh: 13: /home/postgres/init-db.sh: Syntax error: end of file unexpected (expecting "do") WARNING: The FILENAME variable is not set. Defaulting to a blank string. WARNING: The FILENAMECORE variable is not set. Defaulting to a blank string. trace2tap_postgres_1 is up-to-date Creating trace2tap_redis_1 ... done Creating trace2tap_frontend_1 ... done Creating trace2tap_backend_1 ... done Creating trace2tap_iotcore_1 ... done Creating trace2tap_celery_worker_1 ... done Creating trace2tap_nginx_1 ... done Creating trace2tap_celery_beat_1 ... done Attaching to trace2tap_postgres_1, trace2tap_redis_1, trace2tap_iotcore_1, trace2tap_frontend_1, trace2tap_backend_1, trace2tap_nginx_1, trace2tap_celery_worker_1, trace2tap_celery_beat_1 backend_1 | sh: 1: ../init-backend.sh: not found celery_worker_1 | sh: 1: ../init-celery-worker.sh: not found celery_beat_1 | sh: 1: ../init-celery-beat.sh: not found trace2tap_backend_1 exited with code 127 iotcore_1 | sh: 1: ../init-core.sh: not found redis_1 | 1:C 29 Oct 2020 14:59:35.885 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo redis_1 | 1:C 29 Oct 2020 14:59:35.886 # Redis version=6.0.8, bits=64, commit=00000000, modified=0, pid=1, just started redis_1 | 1:C 29 Oct 2020 14:59:35.886 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf nginx_1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration nginx_1 | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ redis_1 | 1:M 29 Oct 2020 14:59:35.887 Running mode=standalone, port=6379. redis_1 | 1:M 29 Oct 2020 14:59:35.887 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. redis_1 | 1:M 29 Oct 2020 14:59:35.887 # Server initialized redis_1 | 1:M 29 Oct 2020 14:59:35.887 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh trace2tap_iotcore_1 exited with code 127 redis_1 | 1:M 29 Oct 2020 14:59:35.887 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never'). nginx_1 | 10-listen-on-ipv6-by-default.sh: Getting the checksum of /etc/nginx/conf.d/default.conf redis_1 | 1:M 29 Oct 2020 14:59:35.888 Ready to accept connections nginx_1 | 10-listen-on-ipv6-by-default.sh: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh nginx_1 | /docker-entrypoint.sh: Configuration complete; ready for start up postgres_1 | 2020-10-29 14:59:34 UTC [6-1] LOG: database system was interrupted; last known up at 2020-10-27 11:12:44 UTC postgres_1 | 2020-10-29 14:59:34 UTC [6-2] LOG: database system was not properly shut down; automatic recovery in progress postgres_1 | 2020-10-29 14:59:34 UTC [6-3] LOG: invalid record length at 0/1700758 postgres_1 | 2020-10-29 14:59:34 UTC [6-4] LOG: redo is not required postgres_1 | 2020-10-29 14:59:34 UTC [6-5] LOG: MultiXact member wraparound protections are now enabled postgres_1 | 2020-10-29 14:59:34 UTC [1-1] LOG: database system is ready to accept connections postgres_1 | 2020-10-29 14:59:34 UTC [10-1] LOG: autovacuum launcher started trace2tap_celery_worker_1 exited with code 127 trace2tap_celery_beat_1 exited with code 127 nginx_1 | 2020/10/29 14:59:36 [emerg] 1#1: host not found in upstream "iotcore" in /etc/nginx/nginx.conf:16 nginx_1 | nginx: [emerg] host not found in upstream "iotcore" in /etc/nginx/nginx.conf:16 trace2tap_nginx_1 exited with code 1 frontend_1 | WARNING: This is a simple server for use in testing or debugging Angular applications frontend_1 | locally. It hasn't been reviewed for security issues. frontend_1 | frontend_1 | Binding this server to an open connection can result in compromising your application or frontend_1 | computer. Using a different host than the one passed to the "--host" flag might result in frontend_1 | websocket connection issues. You might need to use "--disableHostCheck" if that's the frontend_1 | case. frontend_1 | WARNING: Running a server with --disable-host-check is a security risk. See https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a for more information. frontend_1 | Angular Live Development Server is listening on 0.0.0.0:4200, open your browser on http://localhost:4200/ frontend_1 | frontend_1 | Date: 2020-10-29T14:59:56.026Z frontend_1 | Hash: b40d529e9e81c58c23fd frontend_1 | Time: 13792ms frontend_1 | chunk {main} main.js, main.js.map (main) 577 kB [initial] [rendered] frontend_1 | chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 333 kB [initial] [rendered] frontend_1 | chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered] frontend_1 | chunk {styles} styles.js, styles.js.map (styles) 179 kB [initial] [rendered] frontend_1 | chunk {vendor} vendor.js, vendor.js.map (vendor) 7.13 MB [initial] [rendered] frontend_1 | ℹ 「wdm」: Compiled successfully.

zlfben commented 3 years ago

Thanks for the output. This seems very weird because the scripts have been successfully added. Could I know what operating system you are using?

This line is particularly strange to me "/home/postgres/init-db.sh: 13: /home/postgres/init-db.sh: Syntax error: end of file unexpected (expecting "do")". It might be some issue with file formatting in different file systems/operating systems.

AlexDmr commented 3 years ago

well I tried on WSL2, Linux on VMware and a "real" Linux. All are Ubuntu 20 distribution. Results are the same on all of them. Not sure if the copy has been done or not actually it just say that the commands where integrated from cache. Btw, wouldn't it be possible to upload your container on dockerhub so that we can easily run it ?

zlfben commented 3 years ago

Sure! I've created pre-built images for every container. Please pull the newest master and use "./start_server_no_build_dev.sh --data data/data-anonymous.sql data/iotcore.sql" to start the server.

The "no-build" script uses dockerhub images. Please check docker-compose-no-build.dev.yml for further details.

AlexDmr commented 3 years ago

Sorry I posted to fast ! I am using the pre-built images now with your script.

It still has problem on WSL2 (will look at that), BUT it works like a charm on VMware and probably also on "real" Linux.

Thanks a lot ! I will let you know if I manage to run it on WSL2 so it might help other people.

Anyway I really appreciate your help and your work :)

AlexDmr commented 3 years ago

Managed to do it working on WSL2 also. Just make sure to do :
docker system prune -a

before trying to run the script (it will delete all previous containers, which seems necessary if you tried other trace2tap run scripts before).