Xubuntu 18.04 Desktop client not starting (without kicking it repeatedly)

Since you said that it wouldn’t be any slower I changed from ubuntu-standard.local to mydomain.com and it now appears to work :smile:

Re 10 second delay - I will now try this with start at start up but cant find how to include a 10 second delay in the Xubuntu ‘Session & Startup’ - there is no option for this when I try to edit the Nextcloud entry - could you tell me how you did this (must be very similar in 16.04 and 18.04)

Edit: It seems it is running on startup but without a notification icon?

ps -ef | grep nextcloud
leigh     1261  1238  2 09:27 ?        00:00:04 nextcloud

But when I start it manually and the icon appears it starts to sync, so maybe running on startup but not doing anything?

Thanks again!

I think that’s the issue that you work around by adding the startup delay. Something to do with the timing of the notification panel loading up before starting Nextcloud. If it starts too soon, the notification panel doesn’t display the icon.

Adding the delay is easy: for the command in the Nextcloud startup entry, instead of “nextcloud” (or whatever you have in there), change that to “sleep 10 && nextcloud”

You can experiment with longer delays too, depending on your system. There’s nothing magic about the number 10 :wink:


I put in a delay of 100 s and it still doesnt start - it also doesnt start when I start from command well after start up

Also, I think my ‘method’ above doesnt work

I must say I am confused!

Bummer! Have you looked at this:https://github.com/nextcloud/client_theming/issues/175

When I get a chance I’m planning on setting up a VM with Xubuntu 18.04 and installing the client from the PPA to see what happens. If I can reproduce the problem, maybe I can also figure out how to get it working.

Followed that link

No version of that in bionic but I found Xenial version here

but when I installed that it completely broke the nextcloud-client instalation and I hade to purge libqt5keychain0 and reinstall nextcloud.

Back to the drawing board :slight_smile:

Hm… I installed Xubuntu 18.04 (64 bit) fresh in a VM, did apt update and apt upgrade, and then installed nextcloud-client from the ppa you mentioned above:

sudo apt-add-repository ppa:nextcloud-devs/client
sudo apt update && sudo apt install nextcloud-client

Upon opening the client, attaching to a test account, and checking the “Launch on system startup” option, it works every time when I reboot.

Running sudo apt-cache showpkg nextcloud-client shows that it nextcloud-client depends on libqt5keychain1, which should have been installed as part of the nextcloud-client installation. Can you check to see if that is installed on your machine?

libqt5keychain1 is already the newest version (0.7.0-3).

The thing is, it isnt starting at startup or when I try to do it manually via menu or terminal

That is, no icon appears, but I do get:

ps -ef | grep nextcloud
leigh     1280  1254  1 17:14 ?        00:00:00 /usr/bin/nextcloud

Eventually it will start but varies in how long and no idea what I do or changes to make it finally start

And then when I finally get it running it works fine

I’m not sure what else to check for. In my case that version of the Nextcloud client works on my machine in Xubuntu 16.04, and in my test VM with Xubuntu 18.04. There could be an external factor causing such a long delay in the client starting. Maybe check the health of your hard drive to start.

You could also submit a bug on Github and see if the developers could help you troubleshoot further.

Thanks Eric,

I removed all the folder sync connections so it was just my account and the client stated on system startup :slight_smile:
That must mean its something to do with my sync folders?
two are on an external disk that mounts automatically, one on a different partition on the laptop
I will investigate further, to see which ones are problematic

Interesting. So basically it’s starting in the background, trying to make all the connections, and then eventually it displays the icon in the notification area.

I can understand having a delay when connecting to external folders.

Well I learned something new today :slight_smile:

Well, I think that this may be a problem with more than one cause, although I am not sure.

I have now added the folder sync connection for the partition on the laptop hard disk and the client started at system startup :slight_smile:
BUT, when I rebooted it didn’t do it again, nor for the subsequent reboots I tried. :frowning:

However, it does seem that a manual start of the client now works, at least for the three times I have tried …

I have no delay at startup on the client yet tho, so will try this next.

Edit: tried with sleep 30 && usr/bin/nextcloud but client did not start at startup. Client did start manually tho.

What about the option ‘Show Desktop Notifications’ in the client? This is selected, but if I deselect it then the notification icon does not disappear. Also, If I deselect this option and restart laptop and then start the client it opens with a notification icon.

So I appear to have two problems:

  1. Lack of client autostart at laptop startup:
    Sleep delay didnt work.
    But client starts manually with only laptop partition sync folder
    (‘mnt/DATA’, LABEL=DATA’ ‘mount at system startup’)

  2. Difficulty starting client manually:
    This is only when I have my external disk sync folders added
    (‘mnt/Red 1TB’, LABEL=Red 1TB’ ‘mount at system startup’)
    Could this have anything to do with the space in the label Red 1TB’? (I don’t want to change this as this is where I keep most of my data, and so many things depend on the path)

At this point it’s probably worth putting all this information into an issue on Github and having the developers look at it. https://github.com/nextcloud/client/issues

Right - I at least sorted what I need to do to start it manually:

  1. start from menu, no icon but nextcloud process runnning
  2. wait approx 3 minutes, when the process is ended / no longer running (no idea what stops it)
  3. start from menu and icon appears and client runs as expected

I opened an issue on Github

Client now crashes and will not open
If opened from terminal gives Aborted (core dumped)

I took tflidd’s advice about a log file in this thread

And the last lines of the log file were as below - anybody give me an idea of what is happening / what I could do?

05-31 21:04:52:512 7527 OCC::FolderMan::addFolderInternal: Adding folder to Folder Map  OCC::Folder(0x55e300cb5960) "3"
05-31 21:04:52:512 7527 OCC::FolderWatcherPrivate::slotAddFolderRecursive: (+) Watcher: "/mnt/Red 1TB/Work/"
05-31 21:04:53:991 7527 OCC::FolderWatcherPrivate::slotAddFolderRecursive:     `-> and 5759 subdirectories
05-31 21:04:53:991 7527 OCC::FolderMan::scheduleFolder: Schedule folder  "3"  to sync!
05-31 21:04:53:991 7527 OCC::FolderMan::scheduleFolder: Folder is not ready to sync, not scheduled!
05-31 21:04:53:991 7527 OCC::ClientProxy::setupQtProxyFromConfig: Set proxy configuration to use system configuration
05-31 21:04:54:003 7527 OCC::ActivitySettings::setNotificationRefreshInterval: Starting Notification refresh timer with  300  sec interval
05-31 21:04:54:148 7527 OCC::Updater::getSystemInfo: Sys Info size:  85
05-31 21:04:54:293 7527 OCC::SqlQuery::prepare: Sqlite prepare statement error: "unable to open database file" in "PRAGMA quick_check;"
05-31 21:04:54:293 7527 OCC::SqlDatabase::checkDb: Error running quick_check on database
05-31 21:04:54:293 7527 OCC::SqlDatabase::openOrCreateReadWrite: Consistency check failed, removing broken db "/mnt/DATA/._sync_b233c4bbec31.db"
05-31 21:04:54:294 7527 OCC::SyncJournalDb::checkConnect: sqlite3 version "3.22.0"
05-31 21:04:54:294 7527 OCC::SqlQuery::prepare: Sqlite prepare statement error: "unable to open database file" in "PRAGMA journal_mode=WAL;"
05-31 21:04:54:294 7527 OCC::SqlQuery::prepare: ENFORCE: "allow_failure" in file /build/nextcloud-client-kwZp4Q/nextcloud-client-2.3.3/client/src/libsync/ownsql.cpp, line 233 with message: SQLITE Prepare error

It appears to be having trouble with the local database file getting corrupted. It sounds to me like there’s an issue with your hard drive, or if the folder you’re syncing is over a network share you may be having trouble with that network connection.


All the folders I am syncing are either on the laptop disk or on a USB external disk, none are on a network share, if that is what you mean.

And presumably you mean an issue with the box hard-drive?

Can I check the health of that?

How do I remove all trace of the client?

I have uninstalled via apt purge, but when I reinstall the client it still remembers all my synced folders etc.

Presumably it isn’t deleting the local database file either when I purge?

I think maybe a complete reinstallation on the box might be in order?

The only thing is that I have 550 GB data and it takes days to upload to the box

(However, I could also put in a RPi3 that I have spare instead of the current RPi2)

Thanks again

Actually I’m suggesting you check both the laptop disk and the external drive health. The local database file which keeps track of which files/folders are synced, changed, etc. is stored in the root path of each folder you sync. If that file is getting corrupted, I would tend to start by checking the health of the drive on which it’s stored, just in case.
I usually start with gnome-disk-utility (called Disks in the start menu) to check the SMART status.
sudo apt install gnome-disk-utility

You can also run fsck or other tools to do more in depth scanning.

The laptop disk was all OK,
the SMART option is not available for the external disk (because it is NTFS?) - any ideas on how to check this?
Can I just manually delete the ._sync…db files?

You could try running badblocks on the external drive: https://en.wikipedia.org/wiki/Badblocks

I usually run lsblk to find the device name first, so something like this:
badblocks -s /dev/sdb

should scan the entire disk regardless of the filesystem.

Thanks, I ran that:

For /mnt/Red 1TB:
sudo badblocks -s /dev/sdb1
Checking for bad blocks (read-only test): 0.00% done, 0:00 elapsed. (0/0/0 err103486176one, 16:49 elapsed. (0/0/0 errors)
103486177one, 16:52 elapsed. (1/0/0 errors)
103486178one, 16:56 elapsed. (2/0/0 errors)
103486179one, 16:59 elapsed. (3/0/0 errors)
103487252one, 17:06 elapsed. (4/0/0 errors)
103487253one, 17:10 elapsed. (5/0/0 errors)
103487254one, 17:13 elapsed. (6/0/0 errors)
103487255one, 17:17 elapsed. (7/0/0 errors)

For /mnt/DATA:
sudo badblocks -s /dev/sda5
Checking for bad blocks (read-only test): done

What I don’t understand is that in the log file above it appears to me that the troublesome .db file is on /mnt/DATA:
05-31 21:04:54:293 7527 OCC::SqlDatabase::openOrCreateReadWrite: Consistency check failed, removing broken db "/mnt/DATA/._sync_b233c4bbec31.db"

I then ran
fsck -a /dev/sda5
fsck -a /dev/sdb1

And then checked using gparted (which I think is the same thing)
For the sdb1 Red 1TB externals disk an error came up about cluster mismatches, NTFS is inconsistent and it told me to run chkdsk /f on Windows and reboot twice (I couldnt copy paste these errors) and doing this removed this gparted error and check worked.

So it looks like I solved my latest problem about the crash but now I am back to the behaviour in post 14 above :slight_smile:

Directly after reboot (step 1 in post 14 above) I ran the client from a terminal with logfile and the error in the terminal when it stopped (step 2 in post 14 above) was:

ICE default IO error handler doing an exit(), pid = 1524, errno = 32

And the last bit of the log was:

06-02 06:16:24:049 1524 OCC::SyncJournalDb::commitInternal: void OCC::SyncJournalDb::commitInternal(const QString&, bool) Transaction commit "checkConnect End"
06-02 06:16:24:102 1524 unknown: QString::arg: Argument missing: "https://docs.nextcloud.com/desktop/2.2/" , 2
06-02 06:16:24:102 1524 unknown: QString::arg: Argument missing: "https://docs.nextcloud.com/desktop/2.2/" , 3
06-02 06:16:24:125 1524 OCC::Account::resetNetworkAccessManager: Resetting QNAM
06-02 06:16:24:125 1524 OCC::ConnectionValidator::checkServerAndAuth: Checking server and authentication
06-02 06:16:24:125 1524 OCC::ConnectionValidator::checkServerAndAuth: Trying to look up system proxy

After this has stopped and I restart the client successfully (step 3 in post 14 above) the log continues:

06-02 06:28:58:814 1884 OCC::ConnectionValidator::checkServerAndAuth: Trying to look up system proxy
06-02 06:28:58:818 1884 OCC::ConnectionValidator::systemProxyLookupDone: No system proxy set by OS
06-02 06:28:58:818 1884 OCC::AbstractNetworkJob::start: !!! OCC::CheckServerJob created for "https://ubuntu-standard.local" + "status.php" "OCC::ConnectionValidator"
06-02 06:28:59:223 1884 OCC::AccountManager::saveAccount: Saving account "https://ubuntu-standard.local"
06-02 06:28:59:224 1884 OCC::AccountManager::saveAccountHelper: Saving 1 unknown certs.
etc etc

Does this mean the client is initially having difficulty connecting with the Box?