Android Client -> Download and Upload fails

1,619 views
Skip to first unread message

Gregor Mönke

unread,
Feb 20, 2014, 4:57:13 AM2/20/14
to sea...@googlegroups.com
Hi,

I employed seafile with nginx. The Desktop clients run well, but when I try to connect
with the recent Android app, I can browse my libraries but every file down or upload fails
simply with "failed to download file foo". On the server I do not see any client activity in the
seafile server logs. How to fix this ?

Greets,
Gregor

Shuai Lin

unread,
Feb 20, 2014, 5:01:49 AM2/20/14
to sea...@googlegroups.com
Hi Gregor,

2) Please post your configs here, I'd like:

- ccnet/ccnet.conf
- seafile-data/seafile.conf
- seahub_settings.py
- nginx conf related to seafile

Regards,
Lin





--
You received this message because you are subscribed to the Google Groups "seafile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seafile+u...@googlegroups.com.
To post to this group, send email to sea...@googlegroups.com.
Visit this group at http://groups.google.com/group/seafile.
For more options, visit https://groups.google.com/groups/opt_out.

Gregor Mönke

unread,
Feb 20, 2014, 5:24:20 AM2/20/14
to sea...@googlegroups.com
Hi Lin,

now I realized that also the webinterface down and upload fails, I also think there is some
misconfiguration. There I get a 502 "Bad Gateway Error". I choosed nginx because I wanted https, and I also moved seafile away from the server root
to /sea according to https://github.com/haiwen/seafile/wiki/Deploy-Seafile-Web-at-Non-root-domain. One of my clients sits behind a firewall which blocks
ports 10001 and 12001, so I choose 8081 for ccnet and 8082 for seahub deamon.
here are the server confs:
-ccnet.conf-

[General]
USER_NAME = GraspSF
ID = b00e5dc34ebacaccc72010464df063efb3c9f188
NAME = GraspSF
SERVICE_URL = https://myserver.com/sea

[Network]
PORT = 8081

[Client]
PORT = 13418

--seafile.conf---

[network]
port=8082

[httpserver]
port=8083

--seahub_settings.py--
SECRET_KEY = "E7Qj9SrKcaBWDl_fS_dfLQ=="
HTTP_SERVER_ROOT = 'https://myserver.com/seafhttp'


# If you don't want to run seahub website on your site's root path, set this option to your preferred path.
# e.g. setting it to '/seahub/' would run seahub on http://example.com/seahub/.
SITE_ROOT = '/sea/'

SERVE_STATIC = False

MEDIA_URL = '/seafmedia/'

# Set seahub website's title
SITE_TITLE = 'Gregs Seafile Service'

SITE_NAME = "Gregs Seafile @shosti.mooo.com/sea"
# Enalbe or disalbe registration on web. Default is `False`.
# NOTE: since version 1.4.
ENABLE_SIGNUP = True

# Activate or deactivate user when registration complete. Default is `True`.
# If set to `False`, new users need to be activated by admin in admin panel.
# NOTE: since version 1.8
ACTIVATE_AFTER_REGISTRATION = False

--nginx.conf--

server {
        # add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
        # add_header Alternate-Protocol  443:npn-spdy/2;
        # add_header X-Content-Type-Options "nosniff";
        # add_header X-Frame-Option DENY;

        listen 443;
        ssl on;
        ssl_certificate /etc/ssl/cacert.pem;    # path to your cacert.pem
        ssl_certificate_key /etc/ssl/privkey.pem; # path to your privkey.pem
        server_name myserver.com;   
    index index.html; #my add
    root /var/www;

    location /sea {
        fastcgi_pass    127.0.0.1:8000;
        fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
        fastcgi_param   PATH_INFO           $fastcgi_script_name;

        fastcgi_param   SERVER_PROTOCOL     $server_protocol;
        fastcgi_param   QUERY_STRING        $query_string;
        fastcgi_param   REQUEST_METHOD      $request_method;
        fastcgi_param   CONTENT_TYPE        $content_type;
        fastcgi_param   CONTENT_LENGTH      $content_length;
        fastcgi_param   SERVER_ADDR         $server_addr;
        fastcgi_param   SERVER_PORT         $server_port;
        fastcgi_param   SERVER_NAME         $server_name;
    fastcgi_param   HTTPS   on;
        fastcgi_param   HTTP_SCHEME https;

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

    location /seafhttp {
        rewrite ^/seafhttp(.*)$ $1 break;
        proxy_pass http://127.0.0.1:8082;
        client_max_body_size 0;
    }

    location /seafmedia {
        rewrite ^/seafmedia(.*)$ /media$1 break;
        root /home/whir/sfile/seafile-server-latest/seahub;
    }
}


That is hopefully all you wanted to see ?!
Thanks in advance!

Gregor

Gregor Mönke

unread,
Feb 20, 2014, 5:32:56 AM2/20/14
to sea...@googlegroups.com
Heyyy,

as always..by rethinking everything AFTER I posted, I relized that the internal http service still was running
on 8082, which was already in use by the seahub deamon. So I changed the port to 8083 in the nginx.conf
configuration:


location /seafhttp {
        rewrite ^/seafhttp(.*)$ $1 break;
        proxy_pass http://127.0.0.1:8083;
        client_max_body_size 0;
    }

Now everything works !
Thanks for you quick response.

Yours,

Gregor
Am Donnerstag, 20. Februar 2014 10:57:13 UTC+1 schrieb Gregor Mönke:

Shuai Lin

unread,
Feb 20, 2014, 5:46:00 AM2/20/14
to sea...@googlegroups.com
Glad to hear that. 


--

gregm

unread,
Feb 20, 2014, 5:52:07 AM2/20/14
to sea...@googlegroups.com
Sorry for catchin up with another question, but I posted this one already and no one answered.
So do you know if it is possible to set up email notifications with an external mail provider (like gmail)
without the need to my gmail password as cleartext into seahub_settings.py ?
According to here https://github.com/haiwen/seafile/wiki/Seafile-server-configuration-options#wiki-Sending_Email_Notifications_on_Seahub
there is also the option to "leaf EMAIL_HOST_USER and EMAIL_HOST_PASSWORD blank ('')" but how shall email notification work then ?


--
You received this message because you are subscribed to a topic in the Google Groups "seafile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/seafile/po3VLEmpH8k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to seafile+u...@googlegroups.com.

Shuai Lin

unread,
Feb 20, 2014, 7:10:20 AM2/20/14
to sea...@googlegroups.com
Hi,

As is mentioned in the wiki:

 If you want to use the Email service without authentication leave EMAIL_HOST_USER and EMAIL_HOST_PASSWORD blank ('').

Gmail needs password authentication, so you can't leave it blank.
Reply all
Reply to author
Forward
0 new messages