php - Docker Containers having issues -
our developers handed off our project @ sudo-demo stage , trying enviroment set on local development machine. containerization new me i'm figuring out.
i have 4 docker containers:
container id - name - ports ce05f4675d70 - laradock_nginx_1 - 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp bd900f08e9b3 - laradock_php-fpm_1 - 9000/tcp 75a7aa1698de - laradock_workspace_1 - 0.0.0.0:2222->22/tcp 1d8c69a06ae4 - laradock_mongo_1 - 0.0.0.0:27017->27017/tcp
i have app located @ yellowcard.app , api @ api.yellowcard.app setup in hosts file.
all 4 containers , running, of api calls result in 500 response code. cannot life of me figure out what's wrong.
mongodb logs
2017-07-28t07:13:51.034+0000 control [initandlisten] mongodb starting : pid=1 port=27017 dbpath=/data/db 64-bit host=1d8c69a06ae4 2017-07-28t07:13:51.040+0000 control [initandlisten] db version v3.4.6 2017-07-28t07:13:51.040+0000 control [initandlisten] git version: c55eb86ef46ee7aede3b1e2a5d184a7df4bfb5b5 2017-07-28t07:13:51.040+0000 control [initandlisten] openssl version: openssl 1.0.1t 3 may 2016 2017-07-28t07:13:51.040+0000 control [initandlisten] allocator: tcmalloc 2017-07-28t07:13:51.040+0000 control [initandlisten] modules: none 2017-07-28t07:13:51.040+0000 control [initandlisten] build environment: 2017-07-28t07:13:51.040+0000 control [initandlisten] distmod: debian81 2017-07-28t07:13:51.040+0000 control [initandlisten] distarch: x86_64 2017-07-28t07:13:51.040+0000 control [initandlisten] target_arch: x86_64 2017-07-28t07:13:51.041+0000 control [initandlisten] options: {} 2017-07-28t07:13:51.041+0000 w - [initandlisten] detected unclean shutdown - /data/db/mongod.lock not empty. 2017-07-28t07:13:51.119+0000 - [initandlisten] detected data files in /data/db created 'wiredtiger' storage engine, setting active storage engine 'wiredtiger'. 2017-07-28t07:13:51.119+0000 w storage [initandlisten] recovering data last clean checkpoint. 2017-07-28t07:13:51.119+0000 storage [initandlisten] 2017-07-28t07:13:51.119+0000 storage [initandlisten] ** warning: using xfs filesystem recommended wiredtiger storage engine 2017-07-28t07:13:51.119+0000 storage [initandlisten] ** see http://dochub.mongodb.org/core/prodnotes-filesystem 2017-07-28t07:13:51.119+0000 storage [initandlisten] wiredtiger_open config: create,cache_size=7501m,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2gb),statistics_log=(wait=0), 2017-07-28t07:13:52.097+0000 control [initandlisten] 2017-07-28t07:13:52.097+0000 control [initandlisten] ** warning: access control not enabled database. 2017-07-28t07:13:52.097+0000 control [initandlisten] ** read , write access data , configuration unrestricted. 2017-07-28t07:13:52.097+0000 control [initandlisten] 2017-07-28t07:13:52.097+0000 control [initandlisten] 2017-07-28t07:13:52.097+0000 control [initandlisten] ** warning: /sys/kernel/mm/transparent_hugepage/enabled 'always'. 2017-07-28t07:13:52.097+0000 control [initandlisten] ** suggest setting 'never' 2017-07-28t07:13:52.097+0000 control [initandlisten] 2017-07-28t07:13:52.210+0000 ftdc [initandlisten] initializing full-time diagnostic data capture directory '/data/db/diagnostic.data' 2017-07-28t07:13:52.210+0000 network [thread1] waiting connections on port 27017 2017-07-28t07:13:53.040+0000 ftdc [ftdc] unclean full-time diagnostic data capture shutdown detected, found interim file, metrics may have been lost. ok
that seems fine.
workspace logs
*** running /etc/my_init.d/00_regen_ssh_host_keys.sh... *** running /etc/rc.local... *** booting runit daemon... *** runit started pid 9 jul 28 07:06:41 75a7aa1698de syslog-ng[14]: syslog-ng starting up; version='3.5.6' jul 28 07:09:01 75a7aa1698de cron[21]: (root) cmd ( [ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean) jul 28 07:17:01 75a7aa1698de cron[51]: (root) cmd ( cd / && run-parts --report /etc/cron.hourly)
working properly. not sure exactly. seems okay.
php-fpm logs
[28-jul-2017 07:06:42] notice: php message: php warning: php startup: unable load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/sqlsrv.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20160303/sqlsrv.so: cannot open shared object file: no such file or directory in unknown on line 0 [28-jul-2017 07:06:42] notice: php message: php warning: php startup: unable load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/pdo_sqlsrv.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20160303/pdo_sqlsrv.so: cannot open shared object file: no such file or directory in unknown on line 0 [28-jul-2017 07:06:42] notice: php message: php warning: php startup: unable load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so: cannot open shared object file: no such file or directory in unknown on line 0 [28-jul-2017 07:06:42] notice: fpm running, pid 1 [28-jul-2017 07:06:42] notice: ready handle connections
nginx container had no substantial logs. requests
the php-fpm container seems culprit, can't figure out.
php -m
[php modules] calendar core ctype date dom exif fileinfo filter ftp gettext hash iconv json libxml mbstring mcrypt mongodb mysqli mysqlnd openssl pcntl pcre pdo pdo_mysql phar posix readline reflection session shmop simplexml sockets spl standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl zend opcache zlib [zend modules] zend opcache
mongodb apparently installed i'm not sure why i'm getting issue mongodb.so.
/laradock
adminer beanstalkd-console composer.lock elasticsearch haproxy logs memcached mysql php-fpm postgres-postgis redis vendor aerospike caddy docker-compose.yml enabled hhvm log.txt minio neo4j phpmyadmin rabbitmq rethinkdb workspace apache2 certbot docs env-env.txt jenkins mailhog mongo nginx php-worker readme.md selenium xdebugphpfpm beanstalkd composer.json documentation _guides license mariadb mssql pgadmin postgres readme-zh.md varnish
/laradock/php-fpm
aerospike.ini dockerfile-56 dockerfile-70 dockerfile-71 laravel.ini laravel.pool.conf mysql.ini opcache.ini xdebug.ini
laravel.ini
date.timezone=utc display_errors=on log_errors=on ; maximum amount of memory script may consume (128mb) ; http://php.net/memory-limit memory_limit = 128m ; maximum allowed size uploaded files. ; http://php.net/upload-max-filesize upload_max_filesize = 20m ; sets max size of post data allowed. ; http://php.net/post-max-size post_max_size = 20m ; enables mssql extensions extension=sqlsrv.so extension=pdo_sqlsrv.so extension=mongodb.so
dockerfile-70
# #-------------------------------------------------------------------------- # image setup #-------------------------------------------------------------------------- # # edit 'php-fpm' base image, visit repository on github # https://github.com/laradock/php-fpm # # change version, see available tags on docker hub: # https://hub.docker.com/r/laradock/php-fpm/tags/ # laradock/php-fpm:7.0--1.2 maintainer mahmoud zalt <mahmoud@zalt.me> # #-------------------------------------------------------------------------- # mandatory software's installation #-------------------------------------------------------------------------- # # mandatory software's such ("mcrypt", "pdo_mysql", "libssl-dev", ....) # installed on base image 'laradock/php-fpm' image. if want # add more software's or remove existing one, need edit # base image (https://github.com/laradock/php-fpm). # # #-------------------------------------------------------------------------- # optional software's installation #-------------------------------------------------------------------------- # # optional software's installed if set them `true` # in `docker-compose.yml` before build. # example: # - install_zip_archive=true # ##################################### # soap: ##################################### arg install_soap=false run if [ ${install_soap} = true ]; \ # install soap extension apt-get -y update && \ apt-get -y install libxml2-dev php-soap && \ docker-php-ext-install soap \ ;fi ##################################### # xdebug: ##################################### arg install_xdebug=false run if [ ${install_xdebug} = true ]; \ # install xdebug extension pecl install xdebug && \ docker-php-ext-enable xdebug \ ;fi # copy xdebug configration remote debugging copy ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini ##################################### # php redis extension php 7 ##################################### arg install_phpredis=false run if [ ${install_phpredis} = true ]; \ # install php redis extension pecl install -o -f redis \ && rm -rf /tmp/pear \ && docker-php-ext-enable redis \ ;fi ##################################### # mongodb: ##################################### arg install_mongo=false run if [ ${install_mongo} = true ]; \ # install mongodb extension pecl install mongodb && \ docker-php-ext-enable mongodb \ ;fi ##################################### # ziparchive: ##################################### arg install_zip_archive=false run if [ ${install_zip_archive} = true ]; \ # install zip extension docker-php-ext-install zip \ ;fi ##################################### # bcmath: ##################################### arg install_bcmath=false run if [ ${install_bcmath} = true ]; \ # install bcmath extension docker-php-ext-install bcmath \ ;fi ##################################### # php memcached: ##################################### arg install_memcached=false run if [ ${install_memcached} = true ]; \ # install php memcached extension curl -l -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \ && mkdir -p memcached \ && tar -c memcached -zxvf /tmp/memcached.tar.gz --strip 1 \ && ( \ cd memcached \ && phpize \ && ./configure \ && make -j$(nproc) \ && make install \ ) \ && rm -r memcached \ && rm /tmp/memcached.tar.gz \ && docker-php-ext-enable memcached \ ;fi ##################################### # exif: ##################################### arg install_exif=false run if [ ${install_exif} = true ]; \ # enable exif php extentions requirements docker-php-ext-install exif \ ;fi ##################################### # php aerospike: ##################################### arg install_aerospike_extension=false env install_aerospike_extension ${install_aerospike_extension} # copy aerospike configration remote debugging copy ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini run if [ ${install_aerospike_extension} = true ]; \ # install php aerospike extension curl -l -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \ && mkdir -p aerospike-client-php \ && tar -c aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ && ( \ cd aerospike-client-php/src/aerospike \ && phpize \ && ./build.sh \ && make install \ ) \ && rm /tmp/aerospike-client-php.tar.gz \ && docker-php-ext-enable aerospike \ ;fi ##################################### # opcache: ##################################### arg install_opcache=false run if [ ${install_opcache} = true ]; \ docker-php-ext-install opcache \ ;fi # copy opcache configration copy ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini ##################################### # mysqli modifications: ##################################### arg install_mysqli=false run if [ ${install_mysqli} = true ]; \ docker-php-ext-install mysqli \ ;fi ##################################### # tokenizer modifications: ##################################### arg install_tokenizer=false run if [ ${install_tokenizer} = true ]; \ docker-php-ext-install tokenizer \ ;fi ##################################### # sql server: ##################################### arg mssql=false run if [ ${mssql} = true ]; \ ##################################### # install depenencies: ##################################### apt-get update && \ apt-get install -y --force-yes wget apt-transport-https curl freetds-common php5-odbc libsybdb5 freetds-bin unixodbc unixodbc-dev php5-sybase && \ ##################################### # following steps taken # microsoft's github account: # https://github.com/microsoft/msphpsql/wiki/dockerfile-for-getting-pdo_sqlsrv-for-php-7.0-on-debian-in-3-ways ##################################### # add php 7 repository # debian jessie # , system upgrade echo "deb http://packages.dotdeb.org jessie all" \ | tee /etc/apt/sources.list.d/dotdeb.list \ && wget -qo- https://www.dotdeb.org/dotdeb.gpg \ | apt-key add - \ && apt-get update \ && apt-get upgrade -qq && \ # install unixodbc # compile odbc_config not part of unixodbc package apt-get install -y whiptail \ unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \ && dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \ && cd unixodbc-*/ \ && dpkg-buildpackage -uc -us -b -d \ && cp -v ./exe/odbc_config /usr/local/bin/ && \ # fake uname install.sh printf '#!/bin/bash\nif [ "$*" == "-p" ]; echo "x86_64"; else /bin/uname "$@"; fi' \ | tee /usr/local/bin/uname \ && chmod +x /usr/local/bin/uname && \ # microsoft odbc driver 13 linux # note: there's copy of tar on hubic wget -nv -o msodbcsql-13.0.0.0.tar.gz \ "https://meetsstorenew.blob.core.windows.net/contianerhd/ubuntu%2013.0%20tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18t17%3a29%3a00z&se=2022-10-19t17%3a29%3a00z&sp=rl&sv=2015-04-05&sr=b&sig=cdwpfrouveiqf0vi%2bnkt%2bzx8z8caiyvrcmicdl5okny%3d" \ && tar -xf msodbcsql-13.0.0.0.tar.gz \ && cd msodbcsql-*/ \ && ldd lib64/libmsodbcsql-13.0.so.0.0 \ && ./install.sh install --accept-license \ && ls -l /opt/microsoft/msodbcsql/ \ && odbcinst -q -d -n "odbc driver 13 sql server" \ ##################################### # install pdo_dblib ##################################### && docker-php-ext-install pdo \ && docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \ && docker-php-ext-install pdo_dblib \ && docker-php-ext-enable pdo_dblib && \ ##################################### # install sqlsrv y pdo_sqlsrv # extensions: ##################################### pecl install sqlsrv-4.0.6 && \ pecl install pdo_sqlsrv-4.0.6 && \ ##################################### # set locales container ##################################### apt-get install -y locales \ && echo "en_us.utf-8 utf-8" > /etc/locale.gen \ && locale-gen \ ;fi ##################################### # human language , character encoding support: ##################################### arg install_intl=false run if [ ${install_intl} = true ]; \ # install intl , requirements apt-get install -y zlib1g-dev libicu-dev g++ && \ docker-php-ext-configure intl && \ docker-php-ext-install intl \ ;fi ##################################### # ghostscript: ##################################### arg install_ghostscript=false run if [ ${ghostscript} = true ]; \ # install ghostscript extension # pdf editing apt-get -y update \ && apt-get install -y \ poppler-utils \ ghostscript \ ;fi # #-------------------------------------------------------------------------- # final touch #-------------------------------------------------------------------------- # arg catch_workers_output=yes add ./laravel.ini /usr/local/etc/php/conf.d add ./laravel.pool.conf /usr/local/etc/php-fpm.d/ run rm -r /var/lib/apt/lists/* run usermod -u 1000 www-data workdir /var/www cmd ["php-fpm"] expose 9000
any ideas wrong or steps can take more information?
thanks.
[update]
i'm able see debugger when going api.yellowcard.app have no idea made change. no longer getting 500 status code when loading page though.
grep -rl no-debug-non-zts-20151012/mongodb.so
doesn't seem find on container except in logs.
Comments
Post a Comment