Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 503 Backend fetch failed #4

Closed
iux opened this issue Aug 26, 2016 · 15 comments
Closed

Error 503 Backend fetch failed #4

iux opened this issue Aug 26, 2016 · 15 comments

Comments

@iux
Copy link

iux commented Aug 26, 2016

Hi,

Sorry for my bad english.
i'm trying to use your images on Ubuntu 16.04 but probably i did something wrong.
I tried on remote server (ubuntu 16.04) and on a local server (still ubuntu 16.04) and the problem is the same.

1 - magento2 installation using composer
2 - with docker-compose i started your file (docker-compose.yml)
3 - once finish i've tried to connect to localhost (or to remote ip) but varnish returns Error 503 Backend fetch failed

Where am i wrong? Do you have any tip?

Thank you

Ugo

@pablollorens
Copy link

the same here...

@pablollorens
Copy link

pablollorens commented Sep 2, 2016

I guess is because apache is not starting automatically, doing the following it works:

docker exec -it dockermagento2_apache_1 /bin/bash
service apache2 start

Are we missing something? why is not apache starting automatically?

@iux
Copy link
Author

iux commented Sep 2, 2016

@pablollorens
Thank you so much, now it works!
Thank you again.

Ugo

@fballiano
Copy link
Owner

really? I'll check it out asap! thanks!

fballiano added a commit to fballiano/docker-magento2-apache-php that referenced this issue Sep 3, 2016
@fballiano
Copy link
Owner

I think I fixed it, try re-pulling the images and rerunning them.
Something has to be changed in some new base images I'm using...
I'm retesting everything right now.

@gukandrew
Copy link

Same there, started apache manually, but it doesn't help at all...
Platform OSX 10.14.5 (18F132)

@fballiano
Copy link
Owner

fballiano commented Aug 14, 2019 via email

@gukandrew
Copy link

yes, just have a fresh clone of repo. Probably there is issue with some docker configuration over osx... Tried to fix that but without luck...

@gukandrew
Copy link

BTW, opened seperate issue #34, as suppose it works ok on Ubuntu, but not under OSX

@fballiano
Copy link
Owner

fballiano commented Aug 14, 2019 via email

@gukandrew
Copy link

I have docker 19.03.1

Yes, I've put magento2 folder. It refuses to start one of containers without it..
So all of container started successfully and if i run docker up without daemonizing (-d flag), I doesn't see any for example apache2 access logs, only general things:

Starting docker-magento2_db_1          ... done
Starting docker-magento2_sessions_1    ... done
Starting docker-magento2_clusterdata_1 ... done
Starting docker-magento2_cache_1       ... done
Starting docker-magento2_apache_1      ... done
Starting docker-magento2_varnish_1     ... done
Starting docker-magento2_ssl_1         ... done
Starting docker-magento2_cron_1        ... done
Attaching to docker-magento2_cache_1, docker-magento2_sessions_1, docker-magento2_clusterdata_1, docker-magento2_db_1, docker-magento2_apache_1, docker-magento2_varnish_1, docker-magento2_cron_1, docker-magento2_ssl_1
cache_1        |                 _._
cache_1        |            _.-``__ ''-._
cache_1        |       _.-``    `.  `_.  ''-._           Redis 3.2.3 (00000000/0) 64 bit
cache_1        |   .-`` .-```.  ```\/    _.,_ ''-._
cache_1        |  (    '      ,       .-`  | `,    )     Running in standalone mode
cache_1        |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
cache_1        |  |    `-._   `._    /     _.-'    |     PID: 1
cache_1        |   `-._    `-._  `-./  _.-'    _.-'
cache_1        |  |`-._`-._    `-.__.-'    _.-'_.-'|
cache_1        |  |    `-._`-._        _.-'_.-'    |           http://redis.io
cache_1        |   `-._    `-._`-.__.-'_.-'    _.-'
cache_1        |  |`-._`-._    `-.__.-'    _.-'_.-'|
cache_1        |  |    `-._`-._        _.-'_.-'    |
cache_1        |   `-._    `-._`-.__.-'_.-'    _.-'
cache_1        |       `-._    `-.__.-'    _.-'
cache_1        |           `-._        _.-'
cache_1        |               `-.__.-'
cache_1        |
cache_1        | 1:M 14 Aug 14:43:31.160 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
cache_1        | 1:M 14 Aug 14:43:31.160 # Server started, Redis version 3.2.3
cache_1        | 1:M 14 Aug 14:43:31.161 # 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 never > /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.
cache_1        | 1:M 14 Aug 14:43:31.161 * The server is now ready to accept connections on port 6379
sessions_1     | 1:C 14 Aug 2019 14:43:31.287 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
sessions_1     | 1:C 14 Aug 2019 14:43:31.288 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=1, just started
sessions_1     | 1:C 14 Aug 2019 14:43:31.288 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
db_1           | 2019-08-14 14:43:32 0 [Note] mysqld (mysqld 10.4.7-MariaDB-1:10.4.7+maria~bionic) starting as process 1 ...
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Using Linux native AIO
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
sessions_1     | 1:M 14 Aug 2019 14:43:31.296 * Running mode=standalone, port=6379.
sessions_1     | 1:M 14 Aug 2019 14:43:31.297 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
sessions_1     | 1:M 14 Aug 2019 14:43:31.297 # Server initialized
sessions_1     | 1:M 14 Aug 2019 14:43:31.297 # 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 never > /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.
clusterdata_1  |                 _._
clusterdata_1  |            _.-``__ ''-._
clusterdata_1  |       _.-``    `.  `_.  ''-._           Redis 3.2.3 (00000000/0) 64 bit
clusterdata_1  |   .-`` .-```.  ```\/    _.,_ ''-._
clusterdata_1  |  (    '      ,       .-`  | `,    )     Running in standalone mode
clusterdata_1  |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
clusterdata_1  |  |    `-._   `._    /     _.-'    |     PID: 1
clusterdata_1  |   `-._    `-._  `-./  _.-'    _.-'
clusterdata_1  |  |`-._`-._    `-.__.-'    _.-'_.-'|
clusterdata_1  |  |    `-._`-._        _.-'_.-'    |           http://redis.io
clusterdata_1  |   `-._    `-._`-.__.-'_.-'    _.-'
clusterdata_1  |  |`-._`-._    `-.__.-'    _.-'_.-'|
clusterdata_1  |  |    `-._`-._        _.-'_.-'    |
clusterdata_1  |   `-._    `-._`-.__.-'_.-'    _.-'
clusterdata_1  |       `-._    `-.__.-'    _.-'
clusterdata_1  |           `-._        _.-'
clusterdata_1  |               `-.__.-'
clusterdata_1  |
clusterdata_1  | 1:M 14 Aug 14:43:31.200 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
clusterdata_1  | 1:M 14 Aug 14:43:31.200 # Server started, Redis version 3.2.3
clusterdata_1  | 1:M 14 Aug 14:43:31.200 # 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 never > /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.
clusterdata_1  | 1:M 14 Aug 14:43:31.200 * The server is now ready to accept connections on port 6379
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Uses event mutexes
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
sessions_1     | 1:M 14 Aug 2019 14:43:31.299 * DB loaded from disk: 0.002 seconds
sessions_1     | 1:M 14 Aug 2019 14:43:31.299 * Ready to accept connections
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Number of pools: 1
apache_1       | Starting Apache httpd web server: apache2AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.6. Set the 'ServerName' directive globally to suppress this message
ssl_1          | Welcome to the marvambass/nginx-ssl-secure container
ssl_1          |
ssl_1          | IMPORTANT:
ssl_1          |   IF you use SSL inside your personal NGINX-config,
ssl_1          |   you should add the Strict-Transport-Security header like:
ssl_1          |
ssl_1          |     # only this domain
ssl_1          |     add_header Strict-Transport-Security "max-age=31536000";
ssl_1          |     # apply also on subdomains
ssl_1          |     add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
ssl_1          |
ssl_1          |   to your config.
ssl_1          |   After this you should gain a A+ Grade on the Qualys SSL Test
ssl_1          |
ssl_1          | >> no $DH_SIZE specified using default
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Using SSE2 crc32 instructions
apache_1       | .
db_1           | 2019-08-14 14:43:32 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Completed initialization of buffer pool
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Waiting for purge to start
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: 10.4.7 started; log sequence number 139854; transaction id 21
db_1           | 2019-08-14 14:43:32 0 [Note] Plugin 'FEEDBACK' is disabled.
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db_1           | 2019-08-14 14:43:32 0 [Note] Server socket created on IP: '::'.
db_1           | 2019-08-14 14:43:32 0 [Warning] 'proxies_priv' entry '@% root@8afb4ce8e953' ignored in --skip-name-resolve mode.
db_1           | 2019-08-14 14:43:32 0 [Note] InnoDB: Buffer pool(s) load completed at 190814 14:43:32
db_1           | 2019-08-14 14:43:32 0 [Note] Reading of all Master_info entries succeeded
db_1           | 2019-08-14 14:43:32 0 [Note] Added new Master_info '' to hash table
db_1           | 2019-08-14 14:43:32 0 [Note] mysqld: ready for connections.
db_1           | Version: '10.4.7-MariaDB-1:10.4.7+maria~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
ssl_1          | >> copy /etc/nginx/external/*.conf files to /etc/nginx/conf.d/
ssl_1          | >> exec docker CMD
ssl_1          | nginx
ssl_1          | 2019/08/14 14:43:35 [notice] 1#1: using the "epoll" event method
ssl_1          | 2019/08/14 14:43:35 [notice] 1#1: nginx/1.13.12
ssl_1          | 2019/08/14 14:43:35 [notice] 1#1: built by gcc 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)
ssl_1          | 2019/08/14 14:43:35 [notice] 1#1: OS: Linux 4.9.184-linuxkit
ssl_1          | 2019/08/14 14:43:35 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
ssl_1          | 2019/08/14 14:43:35 [notice] 1#1: start worker processes
ssl_1          | 2019/08/14 14:43:35 [notice] 1#1: start worker process 10
cron_1         | rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
cron_1         | rsyslogd: activation of module imklog failed [v8.1901.0 try https://www.rsyslog.com/e/2145 ]
cron_1         | ==> /var/log/syslog <==
cron_1         | Aug 14 14:41:01 9a9378802aae CRON[95]: (www-data) CMD (/usr/local/bin/php /var/www/html/update/cron.php)
cron_1         | Aug 14 14:41:01 9a9378802aae CRON[97]: (www-data) CMD (/usr/local/bin/php /updatenodes.php)
cron_1         | Aug 14 14:41:01 9a9378802aae CRON[96]: (www-data) CMD (/usr/local/bin/php /var/www/html/bin/magento setup:cron:run)
cron_1         | Aug 14 14:42:01 9a9378802aae CRON[128]: (www-data) CMD (/usr/local/bin/php /updatenodes.php)
cron_1         | Aug 14 14:42:01 9a9378802aae CRON[127]: (www-data) CMD (/usr/local/bin/php /var/www/html/bin/magento setup:cron:run)
cron_1         | Aug 14 14:42:01 9a9378802aae CRON[129]: (www-data) CMD (/usr/local/bin/php /var/www/html/update/cron.php)
cron_1         | Aug 14 14:42:01 9a9378802aae CRON[130]: (www-data) CMD (/usr/local/bin/php /var/www/html/bin/magento cron:run)
cron_1         | Aug 14 14:43:35 9a9378802aae cron[10]: (CRON) INFO (pidfile fd = 3)
cron_1         | Aug 14 14:43:35 9a9378802aae cron[12]: (CRON) STARTUP (fork ok)
cron_1         | Aug 14 14:43:35 9a9378802aae cron[12]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
cron_1         |
cron_1         | ==> /var/log/cron.log <==
varnish_1      | Debug: Platform: Linux,4.9.184-linuxkit,x86_64,-junix,-smalloc,-smalloc,-hcritbit
varnish_1      | Debug: Child (17) Started
cron_1         |
cron_1         | ==> /var/log/syslog <==
cron_1         | Aug 14 14:43:36 9a9378802aae rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
cron_1         | Aug 14 14:43:36 9a9378802aae rsyslogd: activation of module imklog failed [v8.1901.0 try https://www.rsyslog.com/e/2145 ]
cron_1         | Aug 14 14:43:36 9a9378802aae rsyslogd:  [origin software="rsyslogd" swVersion="8.1901.0" x-pid="8" x-info="https://www.rsyslog.com"] start
varnish_1      | Info: Child (17) said Child starts

@fballiano
Copy link
Owner

and when you "ssh" to the apache container the apache server is up?

@gukandrew
Copy link

Yep,

root@3c03e1396cfd:/var/www/html# service apache2 status
[ ok ] apache2 is running.
root@3c03e1396cfd:/var/www/html# ps -aux | grep 80
www-data    30  4.8  3.0 379280 63428 ?        R    19:25   0:21 /usr/sbin/apache2 -k start
www-data    86  2.9  2.5 376408 51800 ?        R    19:26   0:11 /usr/sbin/apache2 -k start
www-data   143  2.2  1.8 370256 37800 ?        R    19:27   0:07 /usr/sbin/apache2 -k start
www-data   151  2.1  1.8 370256 37804 ?        R    19:27   0:07 /usr/sbin/apache2 -k start
www-data   158  2.1  1.8 370256 37804 ?        R    19:27   0:07 /usr/sbin/apache2 -k start
www-data   166  2.1  1.8 370244 37800 ?        R    19:27   0:07 /usr/sbin/apache2 -k start
www-data   239  1.7  1.4 365880 30372 ?        R    19:28   0:04 /usr/sbin/apache2 -k start
www-data   253  1.6  1.4 365340 29580 ?        R    19:28   0:03 /usr/sbin/apache2 -k start
www-data   260  1.6  1.4 365340 29580 ?        R    19:28   0:03 /usr/sbin/apache2 -k start
www-data   273  1.5  1.4 365344 29580 ?        R    19:29   0:03 /usr/sbin/apache2 -k start
www-data   380  1.0  1.2 362144 26412 ?        R    19:30   0:01 /usr/sbin/apache2 -k start
root       522  0.0  0.0   3080   828 pts/0    R+   19:32   0:00 grep 80
root@3c03e1396cfd:/var/www/html#

@blnt
Copy link

blnt commented Aug 15, 2019

Same issue here, I'm on Windows 10.

  • apache2 running
  • docker 19.03.1
  • repo cloned yesterday

@m68k-fr
Copy link

m68k-fr commented Aug 16, 2019

Hello,
I had the same problem too on Ubuntu 18.04 LTS, but I finally managed to get it up and running:
Have a look at varnish.vcl

    .probe = {
        .url = "/pub/health_check.php";
        .timeout = 2s;
        .interval = 5s;
        .window = 10;
        .threshold = 5;
   }

You need to unpack a Magento2 archive in your magento2 folder to have this health_check php file.
Testing an empty stack or a simple phpinfo file just after a 'docker-compose up' will raised a 503 error.
But this didn't completely solved my problem. I used the web installer but got stuck at 73%, and refreshing the page brought back the 503 error. I suspect the 2 second timeout is too short for the heavy load install, but honestly I'm not a Varnish expert...

FYI, removing the .probe section definitively solved my probem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants