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

Server: No E-Tag received from server, check Proxy/Gateway #62

Closed
xstrafer opened this issue Mar 29, 2015 · 14 comments
Closed

Server: No E-Tag received from server, check Proxy/Gateway #62

xstrafer opened this issue Mar 29, 2015 · 14 comments

Comments

@xstrafer
Copy link

This error message appeared in desktop sync client, when I have created via web-interface a note with image embedded. The desktop client cannot sync the note created. If creating simple text notes - it goes ok and syncs with desktop as well.

@Fmstrat
Copy link
Owner

Fmstrat commented Mar 29, 2015

Hi, do you mean the web client? Are you sure you're using ownNote and not Notes? There is no released desktop client for ownNote yet. Thanks!

@xstrafer
Copy link
Author

no, I mean desktop client for owncloud for windows which sincs the owncloud (including Notes folder) to my windows desktop computer.

@Fmstrat
Copy link
Owner

Fmstrat commented Mar 29, 2015

This sounds like an old server issue where the client can't connect to get a file. There are quite a few github issues listed for this message on the ownCloud client itself. The note that ownNote creates is a standard file, so there is nothing I can do here. Are you running a really old server version with a newer client?

@Fmstrat Fmstrat changed the title No E-Tag received from server, check Proxy/Gateway Web: No E-Tag received from server, check Proxy/Gateway Mar 29, 2015
@Fmstrat Fmstrat changed the title Web: No E-Tag received from server, check Proxy/Gateway Server: No E-Tag received from server, check Proxy/Gateway Mar 29, 2015
@Fmstrat Fmstrat added this to the Server - Unspecified milestone Mar 29, 2015
@xstrafer
Copy link
Author

I use ownCloud 8.0.2 (stable) with nginx and php-fpm on a freenas jail.

@Fmstrat
Copy link
Owner

Fmstrat commented Mar 30, 2015

You're using nginx as a proxy? It's likely an issue between the note sync and there since it's reporting a proxy error. Can you post your nginx.conf files? Perhaps I'll see something that's causing this to flake out.

@xstrafer
Copy link
Author

No, I Do not use it as a proxy. just an ordinary web server in a jail.

@xstrafer
Copy link
Author

user www;
worker_processes 2;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
#                  '$status $body_bytes_sent "$http_referer" '
#                  '"$http_user_agent" "$http_x_forwarded_for"';

#access_log  logs/access.log  main;

sendfile        on;
tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  65;

gzip  on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 9;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript tex                                                                                         t/xml application/xml application/xml+rss text/javascript;

#owncloud server
server {
listen 80;
server_name _here goes my hostname_*******;
#access_log logs/host.access.log main;
root /usr/local/www/ownCloud;
index index.php;

    client_max_body_size 2048M; # set maximum upload size

    location = /robots.txt { allow all; access_log off; log_not_found off; }
    location = /favicon.ico { access_log off; log_not_found off; }
    location / {
            index index.php;
            try_files $uri $uri/ /index.php?$args;

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

    rewrite ^/apps/([^/]+)/(.+\.(css|php))$ /index.php?app=$1&getfile=$2 las                                                                                         t;
    rewrite ^/remote/(.*)$ /remote.php/$1 last;

    location ~ \.php/? {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php-fpm.sock;
            include fastcgi_params;
            }

    location ~* \.(?:jpg|gif|ico|png|css|js|svg)$ {
            expires max; add_header Cache-Control public;
            }
    }


    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/local/www/nginx-dist;
    }

}

@Fmstrat
Copy link
Owner

Fmstrat commented Mar 30, 2015

rewrite ^/apps/([^/]+)/(.+\.(css|php))$ /index.php?app=$1&getfile=$2 las

I can't be sure without testing, but it's looking like that kills the API. Why would you be rewriting the apps folder?

@xstrafer
Copy link
Author

have commented all rewrites. no changes.

@xstrafer
Copy link
Author

and it shows error only if I make a note with image embedded... if I make a plain text note - no errors.

@Fmstrat
Copy link
Owner

Fmstrat commented Mar 30, 2015

That's really weird. I've never seen anything like this before. How large is the image? Over 2 meg? I ask because of this:

client_max_body_size 2048M; # set maximum upload size

@Fmstrat
Copy link
Owner

Fmstrat commented Mar 30, 2015

Actually, first result searching on duckduckgo.com found it: owncloud/client#1291

NGINX strips off ETags when gzipping. In my case, turning gzip off fixed it.

It's actually a bug in ownCloud server that has resurfaced since 8.0 (last post in that issue). It's probably pure conincidence that the note is triggering it (perhaps something about it's structure during the HTTP server's gzip process). The above quote is not a "true" fix, but a workaround that should get things moving.

Posting in that linked issue may help, but unfortunately there's not a lot I can do from this end.

@xstrafer
Copy link
Author

thanks for assistance! turning gzip off solved the problem for now.
will try to find a permanent solution next...

Strange thing, it affected only ownNote functionality.

thanks again for your help!

@ghost
Copy link

ghost commented Jun 16, 2015

It's actually a bug in ownCloud server that has resurfaced since 8.0 (last post in that issue).

Which is not correct. Your quoted description is telling you why. 😀

Up to version oC 8.0 a sync-client relies only on the ETag Header sent by the server. If NginX is removing this header when gzip is on this issue is triggered. oC 8.1 is shipping a workaround for this by introducing a new OC-ETag header which isn't touched by such server configs:

https://github.com/owncloud/core/wiki/ownCloud-8.1-Features

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

No branches or pull requests

2 participants