I have this problem pretty often in a 10.x deployment and here the log of an issue. After I did configure the local_settings.py with the settings above, the problem went away consistently
# ansible horizon_container -m shell -a 'service apache2 restart'
infra01_horizon_container-46069b23 | success | rc=0 >>
* Restarting web server apache2
...done.
infra02_horizon_container-2e3a02dd | success | rc=0 >>
* Restarting web server apache2
...done.
infra03_horizon_container-7d46d7f7 | success | rc=0 >>
* Restarting web server apache2
...done.
# ansible horizon_container -m shell -a 'curl -k https://localhost |grep screen'
infra01_horizon_container-46069b23 | success | rc=0 >>
<link rel="stylesheet" href="/static/dashboard/css/0e35198fb8e0.css" type="text/css" media="screen" /> % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
100 1920 0 1920 0 0 48605 0 --:--:-- --:--:-- --:--:-- 49230
infra03_horizon_container-7d46d7f7 | success | rc=0 >>
<link rel="stylesheet" href="/static/dashboard/css/0e35198fb8e0.css" type="text/css" media="screen" /> % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
100 1920 0 1920 0 0 50517 0 --:--:-- --:--:-- --:--:-- 51891
infra02_horizon_container-2e3a02dd | success | rc=0 >>
<link rel="stylesheet" href="/static/dashboard/css/0e35198fb8e0.css" type="text/css" media="screen" /> % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
100 1920 0 1920 0 0 51111 0 --:--:-- --:--:-- --:--:-- 51891
# https://localhost/static/dashboard/css/6c6ddb7aa3b5.css/static/dashboard/css/0e35198fb8e0.css |head'
infra03_horizon_container-7d46d7f7 | success | rc=0 >>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /static/dashboard/css/0e35198fb8e0.css was not found on this server.</p>
<hr>
<address>Apache/2.4.7 (Ubuntu) Server at localhost Port 443</address>
</body></html> % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
100 310 100 310 0 0 33659 0 --:--:-- --:--:-- --:--:-- 34444
infra02_horizon_container-2e3a02dd | success | rc=0 >>
.btn {
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap; % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
6 1178k 6 81920 0 0 4551k 0 --:--:-- --:--:-- --:--:-- 4705k
curl: (23) Failed writing body (4096 != 16384)
infra01_horizon_container-46069b23 | success | rc=0 >>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /static/dashboard/css/0e35198fb8e0.css was not found on this server.</p>
<hr>
<address>Apache/2.4.7 (Ubuntu) Server at localhost Port 443</address>
</body></html> % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
100 310 100 310 0 0 34148 0 --:--:-- --:--:-- --:--:-- 38750
Horizion is not generating CSS correctly when it runs in a load balanced environment.
We need to configure the following settings to do it right :
OMPRESS_OFFLINE = True CSS_HASHING_ METHOD = 'content'
COMPRESS_
and then run the compress:
sudo -u www-data horizon-manage.py collectstatic
sudo -u www-data horizon-manage.py compress
I have this problem pretty often in a 10.x deployment and here the log of an issue. After I did configure the local_settings.py with the settings above, the problem went away consistently
# ansible horizon_container -m shell -a 'service apache2 restart' horizon_ container- 46069b23 | success | rc=0 >>
infra01_
* Restarting web server apache2
...done.
infra02_ horizon_ container- 2e3a02dd | success | rc=0 >>
* Restarting web server apache2
...done.
infra03_ horizon_ container- 7d46d7f7 | success | rc=0 >>
* Restarting web server apache2
...done.
# ansible horizon_container -m shell -a 'curl -k https:/ /localhost |grep screen' horizon_ container- 46069b23 | success | rc=0 >> static/ dashboard/ css/0e35198fb8e 0.css" type="text/css" media="screen" /> % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
infra01_
<link rel="stylesheet" href="/
100 1920 0 1920 0 0 48605 0 --:--:-- --:--:-- --:--:-- 49230
infra03_ horizon_ container- 7d46d7f7 | success | rc=0 >> static/ dashboard/ css/0e35198fb8e 0.css" type="text/css" media="screen" /> % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
<link rel="stylesheet" href="/
100 1920 0 1920 0 0 50517 0 --:--:-- --:--:-- --:--:-- 51891
infra02_ horizon_ container- 2e3a02dd | success | rc=0 >> static/ dashboard/ css/0e35198fb8e 0.css" type="text/css" media="screen" /> % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
<link rel="stylesheet" href="/
100 1920 0 1920 0 0 51111 0 --:--:-- --:--:-- --:--:-- 51891
# https:/ /localhost/ static/ dashboard/ css/6c6ddb7aa3b 5.css/static/ dashboard/ css/0e35198fb8e 0.css |head' horizon_ container- 7d46d7f7 | success | rc=0 >> dashboard/ css/0e35198fb8e 0.css was not found on this server.</p> Apache/ 2.4.7 (Ubuntu) Server at localhost Port 443</address>
Dload Upload Total Spent Left Speed
infra03_
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /static/
<hr>
<address>
</body></html> % Total % Received % Xferd Average Speed Time Time Time Current
100 310 100 310 0 0 33659 0 --:--:-- --:--:-- --:--:-- 34444
infra02_ horizon_ container- 2e3a02dd | success | rc=0 >>
Dload Upload Total Spent Left Speed
.btn {
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap; % Total % Received % Xferd Average Speed Time Time Time Current
6 1178k 6 81920 0 0 4551k 0 --:--:-- --:--:-- --:--:-- 4705k
curl: (23) Failed writing body (4096 != 16384)
infra01_ horizon_ container- 46069b23 | success | rc=0 >> dashboard/ css/0e35198fb8e 0.css was not found on this server.</p> Apache/ 2.4.7 (Ubuntu) Server at localhost Port 443</address>
Dload Upload Total Spent Left Speed
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /static/
<hr>
<address>
</body></html> % Total % Received % Xferd Average Speed Time Time Time Current
100 310 100 310 0 0 34148 0 --:--:-- --:--:-- --:--:-- 38750