Move to a new domain (and support old one)

Hello,

our seafile server is currently reachable at cloud.abc.com. We aquired the domain abc.cloud which we’d like to use as the main seafile domain.
The problem here: Many users have their clients set up to use cloud.abc.com - the setup has to work after changing to the new domain.

Current setup:
cloud.abc.com is the main seafile domain (set in URL and SERVICE_URL), abc.cloud simply resolves to the seafile server, too. The web interface is accessible via abc.cloud, but it’s not possible to up- or download files with clients (it works via the web interface though).

Idea/Plan:
set abc.cloud as main domain (change seafile admin settings for URL and SERVICE_URL)
set a cname record at cloud.abc.com pointing to abc.cloud
Would that work? If not, what options do we have?

Thanks in advance,
Leo

Make sure to also serve the new and old domain in nginx (or apache, or…). I think it should work.

Thanks for your reply!
Both domains now are served by nginx (both / and /seafhttp) while cloud.abc.com is the primary domain (set in seafile settings).
When setting the client (windows) up with abc.cloud everything works (including up/download). Only the Android application is giving problems now. It’s just stating "download failed". I’ll try to get a more precise error log when I’m back home.

So, I’ve some logs (Seafile app: v2.2.2, just checked out from github):

when trying to download a file:

> 01-17 20:40:21.314 27296-27950/com.seafile.seadroid2.debug D/SSLTrustManager: no saved cert for https://abc.cloud/
> 01-17 20:40:21.326 27296-27296/com.seafile.seadroid2.debug W/Notification: Use of stream types is deprecated for operations other than volume control
> 01-17 20:40:21.326 27296-27296/com.seafile.seadroid2.debug W/Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
> 01-17 20:40:21.329 27296-27296/com.seafile.seadroid2.debug W/Notification: Use of stream types is deprecated for operations other than volume control
> 01-17 20:40:21.329 27296-27296/com.seafile.seadroid2.debug W/Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
> 01-17 20:40:21.737 27296-27598/com.seafile.seadroid2.debug V/AutoUpdateManager: check auto upload tasks, 0 in queue
> 01-17 20:40:22.820 27296-27578/com.seafile.seadroid2.debug D/OpenGLRenderer: Flushing caches (mode 0)
> 01-17 20:40:22.826 27296-27578/com.seafile.seadroid2.debug D/OpenGLRenderer: Flushing caches (mode 0)
> 01-17 20:40:22.860 27296-27296/com.seafile.seadroid2.debug I/System.out: [xxx]:packageName=com.seafile.seadroid2.debug
> 01-17 20:40:24.754 27296-27598/com.seafile.seadroid2.debug V/AutoUpdateManager: check auto upload tasks, 0 in queue
> 01-17 20:40:24.850 27296-27578/com.seafile.seadroid2.debug D/OpenGLRenderer: Flushing caches (mode 0)
> 01-17 20:40:26.788 27296-27982/com.seafile.seadroid2.debug V/SeafileObserver: FileAlterationObserver[file='/storage/4ACC-8482/Android/media/com.seafile.seadroid2.debug/<account@domain.com> (abc.cloud)', listeners=1] start checking event!
> 01-17 20:40:26.792 27296-27982/com.seafile.seadroid2.debug V/SeafileObserver: FileAlterationObserver[file='/storage/4ACC-8482/Android/media/com.seafile.seadroid2.debug/<account@domain.com> (abc.cloud)', listeners=1] finished checking event!
> 01-17 20:40:27.773 27296-27598/com.seafile.seadroid2.debug V/AutoUpdateManager: check auto upload tasks, 0 in queue
> 01-17 20:40:30.785 27296-27598/com.seafile.seadroid2.debug V/AutoUpdateManager: check auto upload tasks, 0 in queue
> 01-17 20:40:33.807 27296-27598/com.seafile.seadroid2.debug V/AutoUpdateManager: check auto upload tasks, 0 in queue
> 01-17 20:40:36.796 27296-27982/com.seafile.seadroid2.debug V/SeafileObserver: FileAlterationObserver[file='/storage/4ACC-8482/Android/media/com.seafile.seadroid2.debug/<account@domain.com> (abc.cloud)', listeners=1] start checking event!
> 01-17 20:40:36.806 27296-27982/com.seafile.seadroid2.debug V/SeafileObserver: FileAlterationObserver[file='/storage/4ACC-8482/Android/media/com.seafile.seadroid2.debug/<account@domain.com> (abc.cloud)', listeners=1] finished checking event!
> 01-17 20:40:36.821 27296-27598/com.seafile.seadroid2.debug V/AutoUpdateManager: check auto upload tasks, 0 in queue

(so basically no information about anything. Just 2 toasts in the app: “starting to download 1 file” followed by “download failed

when trying to upload:

01-17 20:42:07.719 27296-27874/com.seafile.seadroid2.debug D/SSLTrustManager: no saved cert for https://abc.cloud/
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug E/UploadTask: Upload exception 5 not trusted SSL server
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug W/System.err: SeafException{code=5, msg=not trusted SSL server}
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug W/System.err:     at com.seafile.seadroid2.SeafConnection.checkRequestResponseStatus(SeafConnection.java:1646)
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug W/System.err:     at com.seafile.seadroid2.SeafConnection.realLogin(SeafConnection.java:195)
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug W/System.err:     at com.seafile.seadroid2.SeafConnection.doLogin(SeafConnection.java:264)
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug W/System.err:     at com.seafile.seadroid2.account.ui.AccountDetailActivity$LoginTask.doLogin(AccountDetailActivity.java:526)
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug W/System.err:     at com.seafile.seadroid2.account.ui.AccountDetailActivity$LoginTask.doInBackground(AccountDetailActivity.java:456)
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug W/System.err:     at com.seafile.seadroid2.account.ui.AccountDetailActivity$LoginTask.doInBackground(AccountDetailActivity.java:431)
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:333)
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
01-17 20:42:07.721 27296-27874/com.seafile.seadroid2.debug W/System.err:     at java.lang.Thread.run(Thread.java:764)
01-17 20:42:07.722 27296-27296/com.seafile.seadroid2.debug W/Notification: Use of stream types is deprecated for operations other than volume control
01-17 20:42:07.723 27296-27296/com.seafile.seadroid2.debug W/Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
01-17 20:42:07.724 27296-27296/com.seafile.seadroid2.debug W/Notification: Use of stream types is deprecated for operations other than volume control
01-17 20:42:07.724 27296-27296/com.seafile.seadroid2.debug W/Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
01-17 20:42:09.350 27296-27578/com.seafile.seadroid2.debug D/OpenGLRenderer: Flushing caches (mode 0)
01-17 20:42:09.358 27296-27578/com.seafile.seadroid2.debug D/OpenGLRenderer: Flushing caches (mode 0)

looks more promising. Seems like the app has a problem with the ssl certificate. indeed abc.cloud uses another certificate than cloud.abc.com, but they are both trusted. Why does the app go for the other certificate/domain?
Preview pictures are displaying fine in the app btw.


edit:
Tested some more clients with abc.cloud while seafile is set to cloud.abc.com:
Windows Client: everything works
Android Client: Login, viewing libraries and preview pictures work, up/download fails
iPhone Client: Everything except upload works (shows “Uploading (null)” instead of File name and progress

So you saying that mobile client have some issue on both domains or only on abc.cloud? I have exactly same configuration old/main domain domain.cz and new one domain.cloud

The issues are only there with abc.cloud, the “main” domain works fine.
Do you have domain.cz and domain.cloud in one SSL certificate or two separate ones?

1 Like

I have to move to a new domain. I’ll try to do what suggested by @shoeper and see if everythign works fine.

@92lleo did you solved your issue with Android? I have to make it work on many oses as well.

Edit: Just changing the webserver doesn’t work at all.

No, i didn’t. acutally, the plan of using both domains (old and new) is on ice for now. I guess we’ll go with setting the new domain as the main domain and informing users on how they can update their client settings to not have problems.
No news on android so far. Maybe adding an issue to github might bring attention, i don’t have the time to crawl to the source myself right now.

So you will just install a new seafile-server installation on your server or are you changing server at all?

Maybe deleting the old one and reinstall will do the job, but is not the best for users

You got me wrong there. We will just update the seafile url in the server config and the nginx configs, users have to update them in their clients. The old urls will continue to work as described above: Well on seahub. well on windows, but not so well on android and ios. The server itself stays the same

Oh I see. I’ll try something meanwhile