lancachenet / monolithic

A monolithic lancache service capable of caching all CDNs in a single instance
https://hub.docker.com/r/lancachenet/monolithic
Other
737 stars 73 forks source link

nginx: [emerg] chown("/data/cache/cache", 33) failed (13: Permission denied) #38

Closed sigmaprojects closed 5 years ago

sigmaprojects commented 5 years ago

Describe the issue you are having

Some kind of permission issue I can't seem to figure out. Once I start the container, it starts to restart in an infinite loop.

Running CentOS Linux release 7.6.1810 (Core) Docker version 1.13.1, build b2f74b2/1.13.1

Directory permissions before:

total 0
0 drwxrwxrwx.  2 don  tape   6 Jun  9 21:47 .
0 dr-xr-xr-x. 19 root root 251 Jun  9 20:19 ..

Directory permissions after:

total 0
0 drwxrwxrwx.  3 don  tape  19 Jun  9 21:49 .
0 dr-xr-xr-x. 19 root root 251 Jun  9 20:19 ..
0 drwxr-xr-x.  4 root root  30 Jun  9 21:49 cache

No matter how many times I chown -R /shared to any user or group or permissions, the issue persists. Even tried a www-data group, as well as tape group, which has a GID of 33

How are you running the container(s)?

docker run --restart unless-stopped --name lancache -v /shared/cache/data:/data/cache -v /shared/cache/logs:/data/logs -p $LANCACHE_IP::80 lancachenet/monolithic:latest

DNS Configuration

Not Applicable, haven't gotten to this part yet.

Output of container(s)

docker run --restart unless-stopped --name lancache -v /shared/cache/data:/data/cache -v /shared/cache/logs:/data/logs -p $LANCACHE_IP::80 lancachenet/monolithic:latest
Executing hook /hooks/entrypoint-pre.d/10_setup.sh
Executing hook /hooks/entrypoint-pre.d/15_generate_maps.sh
Cloning into '.'...
HEAD is now at f6e7004 Merge pull request #90 from Crabbey/master
Reading cache apple from apple.txt
Reading cache arenanet from arenanet.txt
host: assetcdn.101.arenanetworks.com
new host: assetcdn.101.arenanetworks.com
host: assetcdn.102.arenanetworks.com
new host: assetcdn.102.arenanetworks.com
host: assetcdn.103.arenanetworks.com
new host: assetcdn.103.arenanetworks.com
Reading cache blizzard from blizzard.txt
host: dist.blizzard.com
new host: dist.blizzard.com
host: dist.blizzard.com.edgesuite.net
new host: dist.blizzard.com.edgesuite.net
host: llnw.blizzard.com
new host: llnw.blizzard.com
host: edgecast.blizzard.com
new host: edgecast.blizzard.com
host: blizzard.vo.llnwd.net
new host: blizzard.vo.llnwd.net
host: blzddist1-a.akamaihd.net
new host: blzddist1-a.akamaihd.net
host: blzddist2-a.akamaihd.net
new host: blzddist2-a.akamaihd.net
host: blzddist3-a.akamaihd.net
new host: blzddist3-a.akamaihd.net
host: blzddist4-a.akamaihd.net
new host: blzddist4-a.akamaihd.net
host: level3.blizzard.com
new host: level3.blizzard.com
host: nydus.battle.net
new host: nydus.battle.net
host: edge.blizzard.top.comcast.net
new host: edge.blizzard.top.comcast.net
host: cdn.blizzard.com
new host: cdn.blizzard.com
host: *.cdn.blizzard.com
new host: *.cdn.blizzard.com
Reading cache daybreak from daybreak.txt
host: # Daybreak games
new host: #Daybreakgames
host: #
new host: #
host: # Do NOT cache manifest.patch.daybreakgames.com
new host: #DoNOTcachemanifest.patch.daybreakgames.com
host: #
new host: #
host: #PS2
new host: #PS2
host: pls.patch.daybreakgames.com
new host: pls.patch.daybreakgames.com
Reading cache epicgames from epicgames.txt
host: epicgames-download1.akamaized.net
new host: epicgames-download1.akamaized.net
host: download.epicgames.com
new host: download.epicgames.com
host: download2.epicgames.com
new host: download2.epicgames.com
host: download3.epicgames.com
new host: download3.epicgames.com
host: download4.epicgames.com
new host: download4.epicgames.com
Reading cache frontier from frontier.txt
Reading cache hirez from hirez.txt
Reading cache nexusmods from nexusmods.txt
Reading cache nintendo from nintendo.txt
host: ccs.cdn.wup.shop.nintendo.com
new host: ccs.cdn.wup.shop.nintendo.com
host: pushmo.hac.lp1.eshop.nintendo.net
new host: pushmo.hac.lp1.eshop.nintendo.net
host: ecs-lp1.hac.shop.nintendo.net
new host: ecs-lp1.hac.shop.nintendo.net
host: receive-lp1.dg.srv.nintendo.net
new host: receive-lp1.dg.srv.nintendo.net
host: aqua.hac.lp1.d4c.nintendo.net
new host: aqua.hac.lp1.d4c.nintendo.net
host: atum.hac.lp1.d4c.nintendo.net
new host: atum.hac.lp1.d4c.nintendo.net
host: bugyo.hac.lp1.eshop.nintendo.net
new host: bugyo.hac.lp1.eshop.nintendo.net
host: tagaya.hac.lp1.eshop.nintendo.net
new host: tagaya.hac.lp1.eshop.nintendo.net
Reading cache origin from origin.txt
host: # WARNING:  Origin has been seen downloading https client downloads on origin-a.akamaihd.net.  A solution should be in place to forward https to the origin server (eg sniproxy)
new host: #WARNING:Originhasbeenseendownloadinghttpsclientdownloadsonorigin-a.akamaihd.net.Asolutionshouldbeinplacetoforwardhttpstotheoriginserver(egsniproxy)
host: origin-a.akamaihd.net
new host: origin-a.akamaihd.net
host: akamai.cdn.ea.com
new host: akamai.cdn.ea.com
host: lvlt.cdn.ea.com
new host: lvlt.cdn.ea.com
host: river.data.ea.com
new host: river.data.ea.com
host: origin-a.akamaihd.net.edgesuite.net
new host: origin-a.akamaihd.net.edgesuite.net
Reading cache renegadex from renegadex.txt
host: rxp-fl.cncirc.net
new host: rxp-fl.cncirc.net
host: rxp-chi.cncirc.net
new host: rxp-chi.cncirc.net
host: rxp-nz.cncirc.net
new host: rxp-nz.cncirc.net
host: rxp-bgr.cncirc.net
new host: rxp-bgr.cncirc.net
host: rxp-fr.cncirc.net
new host: rxp-fr.cncirc.net
host: rxp-nyc.cncirc.net
new host: rxp-nyc.cncirc.net
host: rxp-uk.cncirc.net
new host: rxp-uk.cncirc.net
host: rxp-sg.cncirc.net
new host: rxp-sg.cncirc.net
host: rxp-la.cncirc.net
new host: rxp-la.cncirc.net
host: rxp-fin.cncirc.net
new host: rxp-fin.cncirc.net
host: denver1.renegade-x.com
new host: denver1.renegade-x.com
Reading cache riot from riot.txt
host: l3cdn.riotgames.com
new host: l3cdn.riotgames.com
host: worldwide.l3cdn.riotgames.com
new host: worldwide.l3cdn.riotgames.com
host: riotgamespatcher-a.akamaihd.net
new host: riotgamespatcher-a.akamaihd.net
host: riotgamespatcher-a.akamaihd.net.edgesuite.net
new host: riotgamespatcher-a.akamaihd.net.edgesuite.net
host: lol.dyn.riotcdn.net
new host: lol.dyn.riotcdn.net
Reading cache rockstar from rockstar.txt
Reading cache sony from sony.txt
host: pls.patch.station.sony.com
new host: pls.patch.station.sony.com
host: gs2.ww.prod.dl.playstation.net
new host: gs2.ww.prod.dl.playstation.net
Reading cache steam from steam.txt
host: *.content.steampowered.com
new host: *.content.steampowered.com
host: content1.steampowered.com
new host: content1.steampowered.com
host: content2.steampowered.com
new host: content2.steampowered.com
host: content3.steampowered.com
new host: content3.steampowered.com
host: content4.steampowered.com
new host: content4.steampowered.com
host: content5.steampowered.com
new host: content5.steampowered.com
host: content6.steampowered.com
new host: content6.steampowered.com
host: content7.steampowered.com
new host: content7.steampowered.com
host: content8.steampowered.com
new host: content8.steampowered.com
host: cs.steampowered.com
new host: cs.steampowered.com
host: steamcontent.com
new host: steamcontent.com
host: client-download.steampowered.com
new host: client-download.steampowered.com
host: *.hsar.steampowered.com.edgesuite.net
new host: *.hsar.steampowered.com.edgesuite.net
host: *.akamai.steamstatic.com
new host: *.akamai.steamstatic.com
host: content-origin.steampowered.com
new host: content-origin.steampowered.com
host: clientconfig.akamai.steamtransparent.com
new host: clientconfig.akamai.steamtransparent.com
host: steampipe.akamaized.net
new host: steampipe.akamaized.net
host: edgecast.steamstatic.com
new host: edgecast.steamstatic.com
host: steam.apac.qtlglb.com.mwcloudcdn.com
new host: steam.apac.qtlglb.com.mwcloudcdn.com
host: *.cs.steampowered.com
new host: *.cs.steampowered.com
host: *.cm.steampowered.com
new host: *.cm.steampowered.com
host: *.edgecast.steamstatic.com
new host: *.edgecast.steamstatic.com
host: *.steamcontent.com
new host: *.steamcontent.com
host: cdn1-sea1.valve.net
new host: cdn1-sea1.valve.net
host: cdn2-sea1.valve.net
new host: cdn2-sea1.valve.net
host: *.steam-content-dnld-1.apac-1-cdn.cqloud.com
new host: *.steam-content-dnld-1.apac-1-cdn.cqloud.com
host: *.steam-content-dnld-1.eu-c1-cdn.cqloud.com
new host: *.steam-content-dnld-1.eu-c1-cdn.cqloud.com
host: steam.apac.qtlglb.com
new host: steam.apac.qtlglb.com
host: edge.steam-dns.top.comcast.net
new host: edge.steam-dns.top.comcast.net
host: edge.steam-dns-2.top.comcast.net
new host: edge.steam-dns-2.top.comcast.net
host: steam.naeu.qtlglb.com
new host: steam.naeu.qtlglb.com
host: steampipe-kr.akamaized.net
new host: steampipe-kr.akamaized.net
host: steam.ix.asn.au
new host: steam.ix.asn.au
host: steam.eca.qtlglb.com
new host: steam.eca.qtlglb.com
host: steam.cdn.on.net
new host: steam.cdn.on.net
host: update5.dota2.wmsj.cn
new host: update5.dota2.wmsj.cn
host: update2.dota2.wmsj.cn
new host: update2.dota2.wmsj.cn
host: update6.dota2.wmsj.cn
new host: update6.dota2.wmsj.cn
host: update3.dota2.wmsj.cn
new host: update3.dota2.wmsj.cn
host: update1.dota2.wmsj.cn
new host: update1.dota2.wmsj.cn
host: update4.dota2.wmsj.cn
new host: update4.dota2.wmsj.cn
host: update5.csgo.wmsj.cn
new host: update5.csgo.wmsj.cn
host: update2.csgo.wmsj.cn
new host: update2.csgo.wmsj.cn
host: update4.csgo.wmsj.cn
new host: update4.csgo.wmsj.cn
host: update3.csgo.wmsj.cn
new host: update3.csgo.wmsj.cn
host: update6.csgo.wmsj.cn
new host: update6.csgo.wmsj.cn
host: update1.csgo.wmsj.cn
new host: update1.csgo.wmsj.cn
host: st.dl.bscstorage.net
new host: st.dl.bscstorage.net
host: cdn.mileweb.cs.steampowered.com.8686c.com
new host: cdn.mileweb.cs.steampowered.com.8686c.com
Reading cache uplay from uplay.txt
host: *.cdn.ubi.com
new host: *.cdn.ubi.com
Reading cache twitch from twitchapp.txt
host: d3rmjivj4k4f0t.cloudfront.net
new host: d3rmjivj4k4f0t.cloudfront.net
host: addons.forgesvc.net
new host: addons.forgesvc.net
host: media.forgecdn.net
new host: media.forgecdn.net
host: files.forgecdn.net
new host: files.forgecdn.net
Reading cache wargaming from wargaming.net.txt
host: dl1.wargaming.net
new host: dl1.wargaming.net
host: dl2.wargaming.net
new host: dl2.wargaming.net
host: wg.gcdn.co
new host: wg.gcdn.co
host: wgusst-na.wargaming.net
new host: wgusst-na.wargaming.net
host: wgusst-eu.wargaming.net
new host: wgusst-eu.wargaming.net
host: update-v4r4h10x.worldofwarships.com
new host: update-v4r4h10x.worldofwarships.com
host: wgus-wotasia.wargaming.net
new host: wgus-wotasia.wargaming.net
host: dl-wot-ak.wargaming.net
new host: dl-wot-ak.wargaming.net
host: dl-wot-gc.wargaming.net
new host: dl-wot-gc.wargaming.net
host: dl-wot-se.wargaming.net
new host: dl-wot-se.wargaming.net
host: dl-wot-cdx.wargaming.net
new host: dl-wot-cdx.wargaming.net
host: dl-wows-ak.wargaming.net
new host: dl-wows-ak.wargaming.net
host: dl-wows-gc.wargaming.net
new host: dl-wows-gc.wargaming.net
host: dl-wows-se.wargaming.net
new host: dl-wows-se.wargaming.net
host: dl-wows-cdx.wargaming.net
new host: dl-wows-cdx.wargaming.net
host: dl-wowp-ak.wargaming.net
new host: dl-wowp-ak.wargaming.net
host: dl-wowp-gc.wargaming.net
new host: dl-wowp-gc.wargaming.net
host: dl-wowp-se.wargaming.net
new host: dl-wowp-se.wargaming.net
host: dl-wowp-cdx.wargaming.net
new host: dl-wowp-cdx.wargaming.net
Reading cache wsus from windowsupdates.txt
host: officecdn.microsoft.com
new host: officecdn.microsoft.com
host: *.windowsupdate.com
new host: *.windowsupdate.com
host: windowsupdate.com
new host: windowsupdate.com
host: *.dl.delivery.mp.microsoft.com
new host: *.dl.delivery.mp.microsoft.com
host: dl.delivery.mp.microsoft.com
new host: dl.delivery.mp.microsoft.com
host: *.update.microsoft.com
new host: *.update.microsoft.com
host: *.do.dsp.mp.microsoft.com
new host: *.do.dsp.mp.microsoft.com
host: *.microsoft.com.edgesuite.net
new host: *.microsoft.com.edgesuite.net
Reading cache xboxlive from xboxlive.txt
host: assets1.xboxlive.com
new host: assets1.xboxlive.com
host: assets2.xboxlive.com
new host: assets2.xboxlive.com
host: dlassets.xboxlive.com
new host: dlassets.xboxlive.com
host: xboxone.loris.llnwd.net
new host: xboxone.loris.llnwd.net
host: *.xboxone.loris.llnwd.net
new host: *.xboxone.loris.llnwd.net
host: xboxone.vo.llnwd.net
new host: xboxone.vo.llnwd.net
host: xbox-mbr.xboxlive.com
new host: xbox-mbr.xboxlive.com
host: assets1.xboxlive.com.nsatc.net
new host: assets1.xboxlive.com.nsatc.net
map $http_host $cacheidentifier {
    hostnames;
    default $http_host;
    assetcdn.101.arenanetworks.com arenanet;
    assetcdn.102.arenanetworks.com arenanet;
    assetcdn.103.arenanetworks.com arenanet;
    dist.blizzard.com blizzard;
    dist.blizzard.com.edgesuite.net blizzard;
    llnw.blizzard.com blizzard;
    edgecast.blizzard.com blizzard;
    blizzard.vo.llnwd.net blizzard;
    blzddist1-a.akamaihd.net blizzard;
    blzddist2-a.akamaihd.net blizzard;
    blzddist3-a.akamaihd.net blizzard;
    blzddist4-a.akamaihd.net blizzard;
    level3.blizzard.com blizzard;
    nydus.battle.net blizzard;
    edge.blizzard.top.comcast.net blizzard;
    cdn.blizzard.com blizzard;
    *.cdn.blizzard.com blizzard;
    #Daybreakgames daybreak;
    # daybreak;
    #DoNOTcachemanifest.patch.daybreakgames.com daybreak;
    # daybreak;
    #PS2 daybreak;
    pls.patch.daybreakgames.com daybreak;
    epicgames-download1.akamaized.net epicgames;
    download.epicgames.com epicgames;
    download2.epicgames.com epicgames;
    download3.epicgames.com epicgames;
    download4.epicgames.com epicgames;
    ccs.cdn.wup.shop.nintendo.com nintendo;
    pushmo.hac.lp1.eshop.nintendo.net nintendo;
    ecs-lp1.hac.shop.nintendo.net nintendo;
    receive-lp1.dg.srv.nintendo.net nintendo;
    aqua.hac.lp1.d4c.nintendo.net nintendo;
    atum.hac.lp1.d4c.nintendo.net nintendo;
    bugyo.hac.lp1.eshop.nintendo.net nintendo;
    tagaya.hac.lp1.eshop.nintendo.net nintendo;
    #WARNING:Originhasbeenseendownloadinghttpsclientdownloadsonorigin-a.akamaihd.net.Asolutionshouldbeinplacetoforwardhttpstotheoriginserver(egsniproxy) origin;
    origin-a.akamaihd.net origin;
    akamai.cdn.ea.com origin;
    lvlt.cdn.ea.com origin;
    river.data.ea.com origin;
    origin-a.akamaihd.net.edgesuite.net origin;
    rxp-fl.cncirc.net renegadex;
    rxp-chi.cncirc.net renegadex;
    rxp-nz.cncirc.net renegadex;
    rxp-bgr.cncirc.net renegadex;
    rxp-fr.cncirc.net renegadex;
    rxp-nyc.cncirc.net renegadex;
    rxp-uk.cncirc.net renegadex;
    rxp-sg.cncirc.net renegadex;
    rxp-la.cncirc.net renegadex;
    rxp-fin.cncirc.net renegadex;
    denver1.renegade-x.com renegadex;
    l3cdn.riotgames.com riot;
    worldwide.l3cdn.riotgames.com riot;
    riotgamespatcher-a.akamaihd.net riot;
    riotgamespatcher-a.akamaihd.net.edgesuite.net riot;
    lol.dyn.riotcdn.net riot;
    pls.patch.station.sony.com sony;
    gs2.ww.prod.dl.playstation.net sony;
    *.content.steampowered.com steam;
    content1.steampowered.com steam;
    content2.steampowered.com steam;
    content3.steampowered.com steam;
    content4.steampowered.com steam;
    content5.steampowered.com steam;
    content6.steampowered.com steam;
    content7.steampowered.com steam;
    content8.steampowered.com steam;
    cs.steampowered.com steam;
    steamcontent.com steam;
    client-download.steampowered.com steam;
    *.hsar.steampowered.com.edgesuite.net steam;
    *.akamai.steamstatic.com steam;
    content-origin.steampowered.com steam;
    clientconfig.akamai.steamtransparent.com steam;
    steampipe.akamaized.net steam;
    edgecast.steamstatic.com steam;
    steam.apac.qtlglb.com.mwcloudcdn.com steam;
    *.cs.steampowered.com steam;
    *.cm.steampowered.com steam;
    *.edgecast.steamstatic.com steam;
    *.steamcontent.com steam;
    cdn1-sea1.valve.net steam;
    cdn2-sea1.valve.net steam;
    *.steam-content-dnld-1.apac-1-cdn.cqloud.com steam;
    *.steam-content-dnld-1.eu-c1-cdn.cqloud.com steam;
    steam.apac.qtlglb.com steam;
    edge.steam-dns.top.comcast.net steam;
    edge.steam-dns-2.top.comcast.net steam;
    steam.naeu.qtlglb.com steam;
    steampipe-kr.akamaized.net steam;
    steam.ix.asn.au steam;
    steam.eca.qtlglb.com steam;
    steam.cdn.on.net steam;
    update5.dota2.wmsj.cn steam;
    update2.dota2.wmsj.cn steam;
    update6.dota2.wmsj.cn steam;
    update3.dota2.wmsj.cn steam;
    update1.dota2.wmsj.cn steam;
    update4.dota2.wmsj.cn steam;
    update5.csgo.wmsj.cn steam;
    update2.csgo.wmsj.cn steam;
    update4.csgo.wmsj.cn steam;
    update3.csgo.wmsj.cn steam;
    update6.csgo.wmsj.cn steam;
    update1.csgo.wmsj.cn steam;
    st.dl.bscstorage.net steam;
    cdn.mileweb.cs.steampowered.com.8686c.com steam;
    *.cdn.ubi.com uplay;
    d3rmjivj4k4f0t.cloudfront.net twitch;
    addons.forgesvc.net twitch;
    media.forgecdn.net twitch;
    files.forgecdn.net twitch;
    dl1.wargaming.net wargaming;
    dl2.wargaming.net wargaming;
    wg.gcdn.co wargaming;
    wgusst-na.wargaming.net wargaming;
    wgusst-eu.wargaming.net wargaming;
    update-v4r4h10x.worldofwarships.com wargaming;
    wgus-wotasia.wargaming.net wargaming;
    dl-wot-ak.wargaming.net wargaming;
    dl-wot-gc.wargaming.net wargaming;
    dl-wot-se.wargaming.net wargaming;
    dl-wot-cdx.wargaming.net wargaming;
    dl-wows-ak.wargaming.net wargaming;
    dl-wows-gc.wargaming.net wargaming;
    dl-wows-se.wargaming.net wargaming;
    dl-wows-cdx.wargaming.net wargaming;
    dl-wowp-ak.wargaming.net wargaming;
    dl-wowp-gc.wargaming.net wargaming;
    dl-wowp-se.wargaming.net wargaming;
    dl-wowp-cdx.wargaming.net wargaming;
    officecdn.microsoft.com wsus;
    *.windowsupdate.com wsus;
    windowsupdate.com wsus;
    *.dl.delivery.mp.microsoft.com wsus;
    dl.delivery.mp.microsoft.com wsus;
    *.update.microsoft.com wsus;
    *.do.dsp.mp.microsoft.com wsus;
    *.microsoft.com.edgesuite.net wsus;
    assets1.xboxlive.com xboxlive;
    assets2.xboxlive.com xboxlive;
    dlassets.xboxlive.com xboxlive;
    xboxone.loris.llnwd.net xboxlive;
    *.xboxone.loris.llnwd.net xboxlive;
    xboxone.vo.llnwd.net xboxlive;
    xbox-mbr.xboxlive.com xboxlive;
    assets1.xboxlive.com.nsatc.net xboxlive;
}
Executing hook /hooks/entrypoint-pre.d/19_doc_root_setup
/var/www/html already exists.
Setting document root to /var/www/html
Executing hook /hooks/entrypoint-pre.d/20_perms_check.sh
Executing hook /hooks/entrypoint-pre.d/20_ssl_setup
Not enabling SSL as neither key nor cert provided.
Executing hook /hooks/supervisord-pre.d/20_test_files_setup
Checking if /var/www/html is empty - Directory not empty.. don't touch content
Executing hook /hooks/supervisord-pre.d/21_cleanup_log_files
Cleaning up log files older than 3560 days
Executing hook /hooks/supervisord-pre.d/99_config_check.sh
Currently configured config:
NGINX CONFIG DUMP FOR /etc/nginx/nginx.conf
# Including /etc/nginx/nginx.conf
user www-data;
# Including /etc/nginx/workers.conf
worker_processes auto;
# Finished including /etc/nginx/workers.conf
pid /run/nginx.pid;
events {
worker_connections 4096;
multi_accept on;
use epoll;
}

http {
aio threads;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;

# Including /etc/nginx/mime.types

types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
application/atom+xml atom;
application/rss+xml rss;

text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;

image/png png;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
image/svg+xml svg svgz;
image/webp webp;

application/font-woff woff;
application/java-archive jar war ear;
application/json json;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.apple.mpegurl m3u8;
application/vnd.ms-excel xls;
application/vnd.ms-fontobject eot;
application/vnd.ms-powerpoint ppt;
application/vnd.wap.wmlc wmlc;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/xhtml+xml xhtml;
application/xspf+xml xspf;
application/zip zip;

application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream iso img;
application/octet-stream msi msp msm;

application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;

audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
audio/x-m4a m4a;
audio/x-realaudio ra;

video/3gpp 3gpp 3gp;
video/mp2t ts;
video/mp4 mp4;
video/mpeg mpeg mpg;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-m4v m4v;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
}
# Finished including /etc/nginx/mime.types
default_type application/octet-stream;

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

gzip on;

# Including /etc/nginx/conf.d/10_log_format.conf
log_format cachelog '[$cacheidentifier] $remote_addr / $http_x_forwarded_for - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$upstream_cache_status" "$host" "$http_range"';

# Finished including /etc/nginx/conf.d/10_log_format.conf
# Including /etc/nginx/conf.d/20_proxy_cache_path.conf
proxy_cache_path /data/cache/cache levels=2:2 keys_zone=generic:500m inactive=200d max_size=1000000m loader_files=1000 loader_sleep=50ms loader_threshold=300ms use_temp_path=off;
# Finished including /etc/nginx/conf.d/20_proxy_cache_path.conf
# Including /etc/nginx/conf.d/30_maps.conf
map $http_host $cacheidentifier {
hostnames;
default $http_host;
assetcdn.101.arenanetworks.com arenanet;
assetcdn.102.arenanetworks.com arenanet;
assetcdn.103.arenanetworks.com arenanet;
dist.blizzard.com blizzard;
dist.blizzard.com.edgesuite.net blizzard;
llnw.blizzard.com blizzard;
edgecast.blizzard.com blizzard;
blizzard.vo.llnwd.net blizzard;
blzddist1-a.akamaihd.net blizzard;
blzddist2-a.akamaihd.net blizzard;
blzddist3-a.akamaihd.net blizzard;
blzddist4-a.akamaihd.net blizzard;
level3.blizzard.com blizzard;
nydus.battle.net blizzard;
edge.blizzard.top.comcast.net blizzard;
cdn.blizzard.com blizzard;
*.cdn.blizzard.com blizzard;
#Daybreakgames daybreak;
# daybreak;
#DoNOTcachemanifest.patch.daybreakgames.com daybreak;
# daybreak;
#PS2 daybreak;
pls.patch.daybreakgames.com daybreak;
epicgames-download1.akamaized.net epicgames;
download.epicgames.com epicgames;
download2.epicgames.com epicgames;
download3.epicgames.com epicgames;
download4.epicgames.com epicgames;
ccs.cdn.wup.shop.nintendo.com nintendo;
pushmo.hac.lp1.eshop.nintendo.net nintendo;
ecs-lp1.hac.shop.nintendo.net nintendo;
receive-lp1.dg.srv.nintendo.net nintendo;
aqua.hac.lp1.d4c.nintendo.net nintendo;
atum.hac.lp1.d4c.nintendo.net nintendo;
bugyo.hac.lp1.eshop.nintendo.net nintendo;
tagaya.hac.lp1.eshop.nintendo.net nintendo;
#WARNING:Originhasbeenseendownloadinghttpsclientdownloadsonorigin-a.akamaihd.net.Asolutionshouldbeinplacetoforwardhttpstotheoriginserver(egsniproxy) origin;
origin-a.akamaihd.net origin;
akamai.cdn.ea.com origin;
lvlt.cdn.ea.com origin;
river.data.ea.com origin;
origin-a.akamaihd.net.edgesuite.net origin;
rxp-fl.cncirc.net renegadex;
rxp-chi.cncirc.net renegadex;
rxp-nz.cncirc.net renegadex;
rxp-bgr.cncirc.net renegadex;
rxp-fr.cncirc.net renegadex;
rxp-nyc.cncirc.net renegadex;
rxp-uk.cncirc.net renegadex;
rxp-sg.cncirc.net renegadex;
rxp-la.cncirc.net renegadex;
rxp-fin.cncirc.net renegadex;
denver1.renegade-x.com renegadex;
l3cdn.riotgames.com riot;
worldwide.l3cdn.riotgames.com riot;
riotgamespatcher-a.akamaihd.net riot;
riotgamespatcher-a.akamaihd.net.edgesuite.net riot;
lol.dyn.riotcdn.net riot;
pls.patch.station.sony.com sony;
gs2.ww.prod.dl.playstation.net sony;
*.content.steampowered.com steam;
content1.steampowered.com steam;
content2.steampowered.com steam;
content3.steampowered.com steam;
content4.steampowered.com steam;
content5.steampowered.com steam;
content6.steampowered.com steam;
content7.steampowered.com steam;
content8.steampowered.com steam;
cs.steampowered.com steam;
steamcontent.com steam;
client-download.steampowered.com steam;
*.hsar.steampowered.com.edgesuite.net steam;
*.akamai.steamstatic.com steam;
content-origin.steampowered.com steam;
clientconfig.akamai.steamtransparent.com steam;
steampipe.akamaized.net steam;
edgecast.steamstatic.com steam;
steam.apac.qtlglb.com.mwcloudcdn.com steam;
*.cs.steampowered.com steam;
*.cm.steampowered.com steam;
*.edgecast.steamstatic.com steam;
*.steamcontent.com steam;
cdn1-sea1.valve.net steam;
cdn2-sea1.valve.net steam;
*.steam-content-dnld-1.apac-1-cdn.cqloud.com steam;
*.steam-content-dnld-1.eu-c1-cdn.cqloud.com steam;
steam.apac.qtlglb.com steam;
edge.steam-dns.top.comcast.net steam;
edge.steam-dns-2.top.comcast.net steam;
steam.naeu.qtlglb.com steam;
steampipe-kr.akamaized.net steam;
steam.ix.asn.au steam;
steam.eca.qtlglb.com steam;
steam.cdn.on.net steam;
update5.dota2.wmsj.cn steam;
update2.dota2.wmsj.cn steam;
update6.dota2.wmsj.cn steam;
update3.dota2.wmsj.cn steam;
update1.dota2.wmsj.cn steam;
update4.dota2.wmsj.cn steam;
update5.csgo.wmsj.cn steam;
update2.csgo.wmsj.cn steam;
update4.csgo.wmsj.cn steam;
update3.csgo.wmsj.cn steam;
update6.csgo.wmsj.cn steam;
update1.csgo.wmsj.cn steam;
st.dl.bscstorage.net steam;
cdn.mileweb.cs.steampowered.com.8686c.com steam;
*.cdn.ubi.com uplay;
d3rmjivj4k4f0t.cloudfront.net twitch;
addons.forgesvc.net twitch;
media.forgecdn.net twitch;
files.forgecdn.net twitch;
dl1.wargaming.net wargaming;
dl2.wargaming.net wargaming;
wg.gcdn.co wargaming;
wgusst-na.wargaming.net wargaming;
wgusst-eu.wargaming.net wargaming;
update-v4r4h10x.worldofwarships.com wargaming;
wgus-wotasia.wargaming.net wargaming;
dl-wot-ak.wargaming.net wargaming;
dl-wot-gc.wargaming.net wargaming;
dl-wot-se.wargaming.net wargaming;
dl-wot-cdx.wargaming.net wargaming;
dl-wows-ak.wargaming.net wargaming;
dl-wows-gc.wargaming.net wargaming;
dl-wows-se.wargaming.net wargaming;
dl-wows-cdx.wargaming.net wargaming;
dl-wowp-ak.wargaming.net wargaming;
dl-wowp-gc.wargaming.net wargaming;
dl-wowp-se.wargaming.net wargaming;
dl-wowp-cdx.wargaming.net wargaming;
officecdn.microsoft.com wsus;
*.windowsupdate.com wsus;
windowsupdate.com wsus;
*.dl.delivery.mp.microsoft.com wsus;
dl.delivery.mp.microsoft.com wsus;
*.update.microsoft.com wsus;
*.do.dsp.mp.microsoft.com wsus;
*.microsoft.com.edgesuite.net wsus;
assets1.xboxlive.com xboxlive;
assets2.xboxlive.com xboxlive;
dlassets.xboxlive.com xboxlive;
xboxone.loris.llnwd.net xboxlive;
*.xboxone.loris.llnwd.net xboxlive;
xboxone.vo.llnwd.net xboxlive;
xbox-mbr.xboxlive.com xboxlive;
assets1.xboxlive.com.nsatc.net xboxlive;
}
# Finished including /etc/nginx/conf.d/30_maps.conf

# Including /etc/nginx/sites-enabled/10_generic.conf

server {
listen 80 reuseport;

access_log /data/logs/access.log cachelog;
error_log /data/logs/error.log;

# Including /etc/nginx/sites-available/generic.conf.d/10_generic.conf
resolver 8.8.8.8 8.8.4.4 ipv6=off;

location / {

# Including /etc/nginx/sites-available/generic.conf.d/root/10_loop_detection.conf
# Abort any circular requests
if ($http_X_LanCache_Processed_By = $hostname) {
return 508;
}

proxy_set_header X-LanCache-Processed-By $hostname;
add_header X-LanCache-Processed-By $hostname,$http_X_LanCache_Processed_By;
# Finished including /etc/nginx/sites-available/generic.conf.d/root/10_loop_detection.conf
# Including /etc/nginx/sites-available/generic.conf.d/root/20_cache.conf
# Cache Location
slice 1m;
proxy_cache generic;

proxy_ignore_headers Expires Cache-Control;
proxy_cache_valid 200 206 3560d;
proxy_set_header Range $slice_range;

# Only download one copy at a time and use a large timeout so
# this really happens, otherwise we end up wasting bandwith
# getting the file multiple times.
proxy_cache_lock on;
proxy_cache_lock_timeout 1h;

# Allow the use of state entries
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;

# Allow caching of 200 but not 301 or 302 as our cache key may not include query params
# hence may not be valid for all users
proxy_cache_valid 301 302 0;

# Enable cache revalidation
proxy_cache_revalidate on;

# Don't cache requests marked as nocache=1
proxy_cache_bypass $arg_nocache;

# 40G max file
proxy_max_temp_file_size 40960m;

# Finished including /etc/nginx/sites-available/generic.conf.d/root/20_cache.conf
# Including /etc/nginx/sites-available/generic.conf.d/root/30_cache_key.conf
proxy_cache_key $cacheidentifier$uri$slice_range;
# Finished including /etc/nginx/sites-available/generic.conf.d/root/30_cache_key.conf
# Including /etc/nginx/sites-available/generic.conf.d/root/40_etags.conf
# Battle.net Fix
proxy_hide_header ETag;

# Finished including /etc/nginx/sites-available/generic.conf.d/root/40_etags.conf
# Including /etc/nginx/sites-available/generic.conf.d/root/90_upstream.conf
# Upstream Configuration
proxy_next_upstream error timeout http_404;
proxy_pass http://$host$request_uri;
proxy_redirect off;
proxy_ignore_client_abort on;

# Upstream request headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Finished including /etc/nginx/sites-available/generic.conf.d/root/90_upstream.conf
# Including /etc/nginx/sites-available/generic.conf.d/root/99_debug_header.conf
# Debug Headers
add_header X-Upstream-Status $upstream_status;
add_header X-Upstream-Response-Time $upstream_response_time;
add_header X-Upstream-Cache-Status $upstream_cache_status;
# Finished including /etc/nginx/sites-available/generic.conf.d/root/99_debug_header.conf

}

# Fix for League of Legends Updater
location ~ ^.+(releaselisting_.*|.version$) {
proxy_pass http://$host;
}

location = /steamcache-heartbeat {
add_header X-LanCache-Processed-By $hostname;
return 204;
}
# Finished including /etc/nginx/sites-available/generic.conf.d/10_generic.conf
}
# Finished including /etc/nginx/sites-enabled/10_generic.conf
}
# Finished including /etc/nginx/nginx.conf
Checking nginx config
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] mkdir() "/data/cache/cache" failed (13: Permission denied)
nginx: configuration file /etc/nginx/nginx.conf test failed
ERROR: hook /hooks/supervisord-pre.d/99_config_check.sh} returned a non-zero exit status '0'
VibroAxe commented 5 years ago

@sigmaprojects definitely permissions somewhere... are you network mounting /shared or doing anything unusual or is it just a directory on your root filesystem?

sigmaprojects commented 5 years ago

It's actually on the foot filesystem. I'm trying to to a setup and test on an isolated machine before moving doing it on a real environment where a /shared network mount exists.

I tried the same thing on Debian and it worked with no issues.

Can you or anyone confirm there's no extra config changes when deploying on CentOS? I'd really prefer sticking with that.

VibroAxe commented 5 years ago

Likely causes: selinux / docker version

Are you using docker-ce or the bundled docker (extremely out of date)

sigmaprojects commented 5 years ago

I think that was exactly the problem - docker version was out of date.
It's working fine now, thank you.