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

Stuck at "Upgrading filesystem cache..." #2063

Closed
Niduroki opened this issue Mar 4, 2013 · 11 comments
Closed

Stuck at "Upgrading filesystem cache..." #2063

Niduroki opened this issue Mar 4, 2013 · 11 comments

Comments

@Niduroki
Copy link
Member

Niduroki commented Mar 4, 2013

After upgrading from 4.5.7 to master, or with a fresh master-install, after setting up owncloud the files app is stuck forever at upgrading filesystem cache. Webdav works though …

Also example.com/index.php/apps/files/ajax/upgrade.php?requesttoken=asdasdasd 404s with the suggested nginx config. Hardcoding the correct path so it doesn't 404 anymore doesn't solve the problem.

@Niduroki
Copy link
Member Author

Niduroki commented Mar 4, 2013

Nevermind, configuration error at my side/suggested configuration, it works when upgrade.php is called properly.

http://doc.owncloud.org/server/5.0/admin_manual/installation/installation_others.html#nginx-configuration suggests ~ .php$ as a location for nginx, making nginx search for /owncloud/index.php/apps/files/ajax/upgrade.php, because that fits .php$ - of course this doesn't exist.

I would suggest leading every call to the former webdav, making it look something like this:

   server {
        #blah
        location / {
                try_files $uri $uri/ @php;
        } 
        location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
                deny all;
        }
        location @php {
                fastcgi_split_path_info ^(.+\.php)(/.*)$;
                fastcgi_pass unix:/var/run/php-fpm-php.sock;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param HTTPS on;
                include fastcgi_params;
        }
   }

Edit:
That breaks serving .php files without an appended path though …

@Niduroki Niduroki closed this as completed Mar 4, 2013
@Tie-fighter
Copy link

I have the same problem, but fail to fix it. Please advise :/

Current configuration:

# redirect http to https.
server {
  listen 80;
  server_name owncloud.thomas-steinbrenner.net;
  rewrite ^ https://$server_name$request_uri? permanent;  # enforce https
}

# owncloud (ssl/tls)
server {
  listen 443 ssl;
  server_name owncloud.thomas-steinbrenner.net;

  ssl_certificate /etc/ssl/certs/owncloud-thomas-steinbrenner-net.crt;
  ssl_certificate_key /etc/ssl/private/owncloud-thomas-steinbrenner-net.key;

  access_log /var/log/nginx/owncloud.thomas-steinbrenner.net_access.log mine;
  error_log /var/log/nginx/owncloud.thomas-steinbrenner.net_error.log;

  root /var/www/thomas-steinbrenner.net/owncloud;

  client_max_body_size 10G; # set max upload size
  fastcgi_buffers 64 4K;

  rewrite ^/caldav((/|$).*)$ /remote.php/caldav$1 last;
  rewrite ^/carddav((/|$).*)$ /remote.php/carddav$1 last;
  rewrite ^/webdav((/|$).*)$ /remote.php/webdav$1 last;

  index index.php;
  error_page 403 = /core/templates/403.php;
  error_page 404 = /core/templates/404.php;

  location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
    deny all;
  }

  location / {
    rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
    rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
    rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
    rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;

    rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;

    try_files $uri $uri/ index.php;
  }

  location ~ ^(?<script_name>.+?\.php)(?<path_info>/.*)?$ {
    try_files $script_name = 404;
    include fastcgi_params;
    fastcgi_param PATH_INFO $path_info;
    fastcgi_param HTTPS on;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
  }

  location ~* ^.+.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
    expires 30d;
    # Optional: Don't log access to assets
    access_log off;
  }

}

  # enable php
  location ~ \.php$ {
    try_files $uri = 404;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param HTTPS on;
    include fastcgi_params;
  }
}

@Tie-fighter
Copy link

This works:

# redirect http to https.
server {
  listen 80;
  server_name owncloud.thomas-steinbrenner.net;
  rewrite ^ https://$server_name$request_uri? permanent;  # enforce https
}

# owncloud (ssl/tls)
server {
  listen 443 ssl;
  server_name owncloud.thomas-steinbrenner.net;

  ssl_certificate /etc/ssl/certs/owncloud-thomas-steinbrenner-net.crt;
  ssl_certificate_key /etc/ssl/private/owncloud-thomas-steinbrenner-net.key;

  access_log /var/log/nginx/owncloud.thomas-steinbrenner.net_access.log mine;
  error_log /var/log/nginx/owncloud.thomas-steinbrenner.net_error.log;

  root /var/www/thomas-steinbrenner.net/owncloud;

  client_max_body_size 10G; # set max upload size
  fastcgi_buffers 64 4K;

  rewrite ^/caldav((/|$).*)$ /remote.php/caldav$1 last;
  rewrite ^/carddav((/|$).*)$ /remote.php/carddav$1 last;
  rewrite ^/webdav((/|$).*)$ /remote.php/webdav$1 last;

  index index.php;
  error_page 403 = /core/templates/403.php;
  error_page 404 = /core/templates/404.php;

  location ~ ^/(data|config|\.ht|db_structure\.xml|README|AUTHORS|COPYING-AGPL|COPYING-README) {
    deny all;
  }

  location / {
    rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
    rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
    rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
    rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
    rewrite ^/apps/calendar/caldav.php /remote.php/caldav/ last;
    rewrite ^/apps/contacts/carddav.php /remote.php/carddav/ last;
    rewrite ^/apps/([^/]*)/(.*\.(css|php))$ /index.php?app=$1&getfile=$2 last;

    rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;

    try_files $uri $uri/ index.php;
  }

  location ~ ^(?<script_name>.+?\.php)(?<path_info>/.*)?$ {
    try_files $script_name = 404;
    include fastcgi_params;
    fastcgi_param PATH_INFO $path_info;
    fastcgi_param HTTPS on;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
  }

  location ~* ^.+.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
    expires 30d;
    # Optional: Don't log access to assets
    access_log off;
  }

}

@casch-at
Copy link

Thank you Tie-fighier!

At First I made a upgrade and thought that I might messed something up, but after a clean installation the same result!

Thanks again!

@VicDeo
Copy link
Member

VicDeo commented Mar 14, 2013

@luxchris I assume the trick is here:

location ~ ^(?<script_name>.+?.php)(?<path_info>/.*)?$ {
...
fastcgi_param PATH_INFO $path_info;

Is it correct?

@Niduroki
Copy link
Member Author

Related:
owncloud-archive/documentation#56

@vax
Copy link

vax commented Mar 19, 2013

@Tie-fighter It does not work for me. Just a blank white page appears.

I tried fiddling around with different solution and nothing worked so far.

@Tie-fighter
Copy link

TBH, I cannot help you. I don't know what exatly fixed it, and I reverted to 4.5.8 and went productive, so I cannot investigate further :/

@casch-at
Copy link

@vax Here is the content from the "fastcgi_params, php-fpm.conf and nginx.conf" file! Maybe it helps!

https://gist.github.com/luxchris/5201006#file-fastcgi_params

@lexore
Copy link

lexore commented Mar 20, 2013

I think, this is not nginx bug.

Try to set php value mbstring.func_overload to 0.
In php.ini, or in vhost config.
When i set mbstring.func_overload=2, i get problems on installation|upgrade stage (php-fpm get 100% or cpu, string about "Upgrading filesystem cache" on screen).
When i comment it, owncloud started to work fine.

@ghost
Copy link

ghost commented Mar 22, 2013

I'm getting:

EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection. files:1

On the javascript console.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants