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

If "FATAL:Cannot open database" #493

Closed
ppcina opened this issue Jan 9, 2019 · 33 comments
Closed

If "FATAL:Cannot open database" #493

ppcina opened this issue Jan 9, 2019 · 33 comments

Comments

@ppcina
Copy link

ppcina commented Jan 9, 2019

I am not able to start SyncTrayzor on PC although it was working there before. I tryied a complete new instalation, delete program folder, delete Roaming folder, reboot system - again and again the same.
Error message in log is:
FATAL: Error opening database: Syncthing v0.14.53 required
SyncTrayzor version 1.1.22, OS Windows 10 Profesional

Can somebody help please?

@Dx3webs
Copy link

Dx3webs commented Jan 15, 2019

ditto

@canton7
Copy link
Owner

canton7 commented Jan 15, 2019

What's your Syncthing version? Go to Help -> About.

@EviLFazZ
Copy link

EviLFazZ commented Jan 17, 2019

image

Same here and from a new install too 😕

@microbmen
Copy link

same

@drink7up
Copy link

drink7up commented Jan 18, 2019

Having this issue too...Mine says syncthing version unknown. I'm guessing it's the new v1.0.0

Edit:

  1. Synctrayzor's log shows that it is 0.14.51 (it's looking for 0.14.53)
  2. Manually replacing the old syncthing.exe with the new syncthing.exe v1.0.0 doesn't appear to make any difference in solving the issue.
  3. However running the v1.0.0 of syncthing.exe directly (from within the synctrayzor folder, but without using synctrayzor) is working fine as a temporary solution.

@ej0rge
Copy link

ej0rge commented Jan 20, 2019

I have the exact same issue. On only one of 4 systems here running synctrayzor.

@canton7
Copy link
Owner

canton7 commented Jan 21, 2019

The only explanation is that you have run Syncthing 0.14.53 or higher outside of SyncTrayzor (or another SyncTrayzor instance which contains a newer Syncthing version, but shares the same database location). Another possibility is that something deleted your Roaming profile folder, but not your Local profile folder.

The copy of Syncthing which SyncTrayzor uses is in C:\Users\<You>\AppData\Roaming\SyncTrayzor (see the README). If you were replacing the copy that's in C:\Program Files, that won't have made any difference.

The workaround is to download Syncthing 1.0.0 and put it in C:\Users\<You>\AppData\Roaming\SyncTrayzor (for the installed version) or data (for the portable version).

If one of you could send me your log files from the time that the problem started happening (File -> Settings -> Logging -> Show SyncTrayzor log files, then send me the file corresponding to the point in time where the problem first started happening), that might help track down what exactly is going on with Syncthing.

@Catfriend1
Copy link

Just an idea: would it help to tie the config into an appdata\local\synctrayzor\config folder too? So if a user would run a newer version Outside it won't affect the wrappers version and config.

@canton7
Copy link
Owner

canton7 commented Jan 21, 2019

@Catfriend1 I have no idea what you're trying to say I'm afraid. Which config? Tie how? This has nothing to do with the wrapper's version, or the wrapper's config. In fact is has nothing to do with any config.

@EviLFazZ
Copy link

The only explanation is that you have run Syncthing 0.14.53 or higher outside of SyncTrayzor (or another SyncTrayzor instance which contains a newer Syncthing version, but shares the same database location). Another possibility is that something deleted your Roaming profile folder, but not your Local profile folder.

The copy of Syncthing which SyncTrayzor uses is in C:\Users\<You>\AppData\Roaming\SyncTrayzor (see the README). If you were replacing the copy that's in C:\Program Files, that won't have made any difference.

The workaround is to download Syncthing 1.0.0 and put it in C:\Users\<You>\AppData\Roaming\SyncTrayzor (for the installed version) or data (for the portable version).

If one of you could send me your log files from the time that the problem started happening (File -> Settings -> Logging -> Show SyncTrayzor log files, then send me the file corresponding to the point in time where the problem first started happening), that might help track down what exactly is going on with Syncthing.

image

Outstanding stuff @canton7 and that was the one (Sync) 'thing' I did not try yet (manually), but you confirmed my last thoughts and worked for me. Thank you and will certainly be donating towards your efforts, because you are making 'my world' far easier and fun 😻

@ppcina
Copy link
Author

ppcina commented Jan 21, 2019

Thank you all for your comments. Finally I had to reinstall a computer to make Sync working again. On top of this I had to restore router/firewall from backup because not proper network behavior.
So I do not know root cause :-(

@Catfriend1
Copy link

@canton7 I mean is it possible to tell syncthing which directory contains its config and index files so this could be a directory different from the default.

@canton7
Copy link
Owner

canton7 commented Jan 22, 2019

@Catfriend1 so you're saying that SyncTrayzor should keep its Syncthing database and Syncthing configuration separate to other Syncthing instances on that machine?

Well, that means that instead of very occasionally having trouble with two Syncthing instances on the same machine, we now always have trouble with two Syncthing instances on the same machine (since users very rarely want to have two Syncthing instances with different databases and configuration). On top of that, we're not even sure if this issue is caused by two Syncthing instances on the same machine at all!

@drink7up
Copy link

Confirming this fixed it up.
The workaround is to download Syncthing 1.0.0 and put it in C:\Users<You>\AppData\Roaming\SyncTrayzor (for the installed version) or data (for the portable version).

@canton7
Copy link
Owner

canton7 commented Jan 29, 2019

Can someone else is hitting this, please let me know this information:

If one of you could send me your log files from the time that the problem started happening (File -> Settings -> Logging -> Show SyncTrayzor log files, then send me the file corresponding to the point in time where the problem first started happening), that might help track down what exactly is going on with Syncthing.

Right now I still don't know what's causing this, so there's no way to fix it for other people!

@rampatra
Copy link

rampatra commented Feb 2, 2019

@canton7 I get this after following your steps:

2019-02-02 11:40:00.3769 #14152 [Info] SyncTrayzor.Services.MemoryUsageLogger: Working Set: 131MiB. Private Memory Size: 84MiB. GC Total Memory: 9MiB 
2019-02-02 11:40:00.8797 #14152 [Info] SyncTrayzor.Services.UpdateManagement.UpdateChecker: No updates available 
2019-02-02 11:40:57.1069 #14152 [Info] SyncTrayzor.Bootstrapper: Shutting down: Shutdown 
2019-02-02 11:40:57.1225 #14152 [Info] SyncTrayzor.Syncthing.SyncthingProcessRunner: Killing Syncthing process 
2019-02-02 11:41:02.8221 #11160 [Info] SyncTrayzor.Bootstrapper: SyncTrazor version 1.1.22.0 (Amd64) started at C:\Program Files\SyncTrayzor\SyncTrayzor.exe (.NET version: Unknown (461308)) 
2019-02-02 11:41:02.8533 #11160 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: LogFilePath: C:\Users\Ram\AppData\Roaming\SyncTrayzor\logs 
2019-02-02 11:41:02.8533 #11160 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: SyncthingBackupPath: C:\Program Files\SyncTrayzor\syncthing.exe 
2019-02-02 11:41:02.8533 #11160 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: ConfigurationFilePath: C:\Users\Ram\AppData\Roaming\SyncTrayzor\config.xml 
2019-02-02 11:41:02.8533 #11160 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: ConfigurationFileBackupPath: C:\Users\Ram\AppData\Roaming\SyncTrayzor\config-backups 
2019-02-02 11:41:02.8533 #11160 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: CefCachePath: C:\Users\Ram\AppData\Local\SyncTrayzor\cef\cache 
2019-02-02 11:41:02.8533 #11160 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: DefaultSyncthingPath: C:\Users\Ram\AppData\Roaming\SyncTrayzor\syncthing.exe 
2019-02-02 11:41:02.8533 #11160 [Debug] SyncTrayzor.Services.Config.ApplicationPathsProvider: DefaultSyncthingHomePath:  
2019-02-02 11:41:02.8689 #11160 [Debug] SyncTrayzor.Services.Ipc.IpcCommsClientFactory: Checking for other SyncTrayzor processes 
2019-02-02 11:41:02.8689 #11160 [Debug] SyncTrayzor.Services.Ipc.IpcCommsClientFactory: Did not find any other processes, or they all responded with an error 
2019-02-02 11:41:02.8846 #11160 [Info] SyncTrayzor.Services.Config.ConfigurationProvider: Loaded default configuration: <Configuration ShowTrayIconOnlyOnClose=False MinimizeToTray=False CloseToTray=True ShowDeviceConnectivityBalloons=True ShowDeviceOrFolderRejectedBalloons=True SyncthingAddress=localhost:8384 StartSyncthingAutomatically=True SyncthingCommandLineFlags=[] SyncthingEnvironmentalVariables=[] SyncthingDenyUpgrade=False SyncthingPriorityLevel=Normal Folders=[] NotifyOfNewVersions=True LatestNotifiedVersion= ObfuscateDeviceIDs=True UseComputerCulture=True SyncthingConsoleHeight=100 WindowPlacement= SyncthingWebBrowserZoomLevel=0 LastSeenInstallCount=0 SyncthingCustomPath= SyncthingCustomHomePath= ShowSynchronizedBalloonEvenIfNothingDownloaded=False DisableHardwareRendering=False EnableFailedTransferAlerts=True EnableConflictFileMonitoring=True ConflictResolverDeletesToRecycleBin=True PauseDevicesOnMeteredNetworks=True HaveDonated=False IconAnimationMode=DataTransferring OpenFolderCommand=explorer.exe "{0}" ShowFileInFolderCommand=explorer.exe /select, "{0}"LogLevel=Info> 
2019-02-02 11:41:02.8846 #11160 [Info] SyncTrayzor.Services.Config.ConfigurationProvider: Configuration file C:\Users\Ram\AppData\Roaming\SyncTrayzor\config.xml doesn't exist, so creating 
2019-02-02 11:41:02.9002 #11160 [Debug] SyncTrayzor.Services.Config.ConfigurationProvider: InstallCount changed from 0 to 1 
2019-02-02 11:41:02.9002 #11160 [Warn] SyncTrayzor.Services.Config.ConfigurationProvider: Syncthing doesn't exist at C:\Users\Ram\AppData\Roaming\SyncTrayzor\syncthing.exe, so copying from C:\Program Files\SyncTrayzor\syncthing.exe 
2019-02-02 11:41:02.9783 #11160 [Debug] SyncTrayzor.Services.AutostartProvider: Have read/write access to the registry 
2019-02-02 11:41:02.9783 #11160 [Debug] SyncTrayzor.Services.AutostartProvider: Setting AutoStart to <AutostartConfiguration AutoStart=True StartMinimized=True> 
2019-02-02 11:41:02.9783 #11160 [Debug] SyncTrayzor.Services.AutostartProvider: Autostart path: "C:\Program Files\SyncTrayzor\SyncTrayzor.exe" -minimized 
2019-02-02 11:41:03.3533 #11160 [Debug] SyncTrayzor.Services.Conflicts.ConflictFileWatcher: Refreshing conflicted files. Found 0 from 0 options 
2019-02-02 11:41:04.1557 #11160 [Info] SyncTrayzor.Syncthing.SyncthingProcessRunner: Starting syncthing: C:\Users\Ram\AppData\Roaming\SyncTrayzor\syncthing.exe 
2019-02-02 11:41:04.3092 #11160 [Info] SyncTrayzor.Services.UpdateManagement.UpdateChecker: No updates available 
2019-02-02 11:41:05.8430 #11160 [Info] SyncTrayzor.Syncthing.SyncthingProcessRunner: Syncthing exited. Restarting... 
2019-02-02 11:41:05.8430 #11160 [Info] SyncTrayzor.Syncthing.SyncthingProcessRunner: Starting syncthing: C:\Users\Ram\AppData\Roaming\SyncTrayzor\syncthing.exe 
2019-02-02 11:41:07.3540 #11160 [Info] SyncTrayzor.Syncthing.SyncthingProcessRunner: Syncthing exited. Restarting... 
2019-02-02 11:41:07.3540 #11160 [Info] SyncTrayzor.Syncthing.SyncthingProcessRunner: Starting syncthing: C:\Users\Ram\AppData\Roaming\SyncTrayzor\syncthing.exe 
2019-02-02 11:41:08.8571 #11160 [Info] SyncTrayzor.Syncthing.SyncthingProcessRunner: Syncthing exited. Restarting... 
2019-02-02 11:41:08.8571 #11160 [Info] SyncTrayzor.Syncthing.SyncthingProcessRunner: Starting syncthing: C:\Users\Ram\AppData\Roaming\SyncTrayzor\syncthing.exe 
2019-02-02 11:41:10.3659 #11160 [Warn] SyncTrayzor.Syncthing.SyncthingProcessRunner: 4 restarts in less than 00:01:00: not restarting again 
2019-02-02 11:46:03.3863 #11160 [Info] SyncTrayzor.Services.MemoryUsageLogger: Working Set: 130MiB. Private Memory Size: 127MiB. GC Total Memory: 7MiB 
2019-02-02 11:46:03.5895 #11160 [Info] SyncTrayzor.Services.UpdateManagement.UpdateChecker: No updates available 

Please let me know how do I resolve this. I started getting this error as I was first using the portable version and then I closed the application and installed the .exe version. And when I ran synctrayzor, I started getting this error as shown in the screenshot below:
sketch 19

@rampatra
Copy link

rampatra commented Feb 2, 2019

I was able to finally resolve the issue by deleting all folders related to SyncTrayzor and Syncthing in AppData. Can't recall the exact folder location.

@jjr52
Copy link

jjr52 commented Feb 4, 2019

I had this issue right from installation.
If I right click on the syncthing.exe file which is downloaded with SyncTrayzor (and is in Program Files AND in AppData), and go to properties, in the details it shows that this file is labelled as version v0.14.51 - so this is why the test for 0.14.53 is failing. The wrong version is in the bundle. This is also why downloading v1.0.0 and putting the .exe in the right AppData folder fixes this issue. In am using the Windows x64 .exe version.

@canton7
Copy link
Owner

canton7 commented Feb 5, 2019

@rampatra I'm afraid I need the entire log at the point that the problem started happening - I need to see why it started happening.

I was able to finally resolve the issue by deleting all folders related to SyncTrayzor and Syncthing in AppData. Can't recall the exact folder location.

There's no need for that - there's a post earlier in this thread on what to do.

@canton7
Copy link
Owner

canton7 commented Feb 5, 2019

@jrongit Were you running Syncthing separately, before you started using SyncTrayzor?

There is no such thing as the "wrong version": we ship with Syncnthing v0.14.51, which will then auto-upgrade to the latest version the first time that it is run. v0.14.51 will not create a database which is only readable by v0.14.53. Therefore another Syncthing instance is creating the database, and I'm trying to work out how, using information which I've asked for, but which people seem very reluctant to give me...

@jstorrs
Copy link

jstorrs commented Feb 9, 2019

This is happening to me and yes I did run syncthing outside synctrazor first. What happened is I'm just starting to use syncthing so I went to the official Syncthing Getting Started Guide and set it up and tested it a bit. Then I looked into synctrayzor later when the manual mentioned it as an option for autostart on windows. I installed both syncthing and synctrazor using chocolatey.

Updating syncthing.exe in AppData\Roaming\SyncTrayzor fixed it.

@jjr52
Copy link

jjr52 commented Feb 10, 2019

@canton7 - Yes, I installed Syncthing separately first. I didn't realise that SyncTrayzor included Syncthing and thought I'd experiment with the core application first (then realised that SyncTryzor is what I really needed). From other replies it sounds like this might be the issue. Happy to help/reply where I can, just takes me a while to get back here to check the thread.

@drink7up
Copy link

drink7up commented Feb 10, 2019 via email

@ankotlyarov
Copy link

ankotlyarov commented Feb 15, 2019

@canton7: Were you running Syncthing separately, before you started using SyncTrayzor?

I started the portable version first. Then I installed and got an error.

@jrongit: I was able to finally resolve the issue by deleting all folders related to SyncTrayzor and Syncthing in AppData. Can't recall the exact folder location.

AppData\Local\Syncthing
AppData\Local\SyncTrayzor
AppData\Roaming\SyncTrayzor\

@WurstCommander
Copy link

The only explanation is that you have run Syncthing 0.14.53 or higher outside of SyncTrayzor (or another SyncTrayzor instance which contains a newer Syncthing version, but shares the same database location). Another possibility is that something deleted your Roaming profile folder, but not your Local profile folder.

The copy of Syncthing which SyncTrayzor uses is in C:\Users\<You>\AppData\Roaming\SyncTrayzor (see the README). If you were replacing the copy that's in C:\Program Files, that won't have made any difference.

The workaround is to download Syncthing 1.0.0 and put it in C:\Users\<You>\AppData\Roaming\SyncTrayzor (for the installed version) or data (for the portable version).

If one of you could send me your log files from the time that the problem started happening (File -> Settings -> Logging -> Show SyncTrayzor log files, then send me the file corresponding to the point in time where the problem first started happening), that might help track down what exactly is going on with Syncthing.

this helped and explains the problem perfectly. maybe the log should point out that under the roaming folder is the "real" version of Synthing which SyncTraytor uses.

It was exactly like this with my set up. I tried Trayor awhile ago, used the CLI version besides that and the roaming one was "too old".

thank you, maybe this should get fixed / logged that you know what to do.

@sprevot44
Copy link

Thanks a lot to @canton7.
Your fix worked perfectly for me (I had the same issue as described initially by @ppcina ) : just copied the latest syncthing.exe version available (1.1.0) into folder C:\Users<You>\AppData\Roaming\SyncTrayzor

@adiabatic
Copy link

adiabatic commented Apr 3, 2019

Chiming in to say that the fix (replacing the Syncthing binary in %appdata%\SyncTrayzor) worked wonderfully.

I'd be more than happy to send logs describing when this first started to happen, but this started happening months ago and %appdata%\SyncTrayzor\logs\logs archive only has three days worth of logs. (I papered over the problem by pointing SyncTrayzor to a Syncthing binary in %userprofile%\bin.)

I made a zipped-up copy of the logs directory just now if that'll help.

@canton7
Copy link
Owner

canton7 commented Apr 7, 2019

The latest version will ship with Syncthing 1.1.1, which should solve the issue... until Syncthing next changes its database schema format. Ideally we want ot explicitly tell Syncthing to upgrade itself if we need to copy it to AppData (but only if updates to Syncthing are allowed)

@babayoshihiko
Copy link

I had the same error message (I think), although I have never tested a newer version. I read the console messages and set a flag:
-allow-newer-config
in in the advanced setting of the Syncthing tab in Preferences. Now it is working.

syncthing

@RahulSinghParmar
Copy link

The copy of Syncthing which SyncTrayzor uses is in C:\Users<You>\AppData\Roaming\SyncTrayzor (see the README). If you were replacing the copy that's in C:\Program Files, that won't have made any difference.

The workaround is to download latest version of your OS build _Syncthing and put it in C:\Users<You>\AppData\Roaming\SyncTrayzor (for the installed version) , just overwrite the file it will work !

@MyPetOctocat
Copy link

Solution from Reddit:

"I've finally got it to run. Go into synctrayzor, let it error out as usual. Then go to the settings button bottom right, syncthing tab, open advanced and put this code "-allow-newer-config" in the first line (without "")."

@jjarandab
Copy link

So, I downloaded, installed and ran synching windows version and quickly noticed that I would have to keep this black terminal window open for service to keep on running. Read a little bit more on download page saw that SyncTrayzor was the right way to go so downloaded, installed and ran getting this "FATAL:Cannot open database" error even after confirming that no other instance of Syncthing or SyncTrayzor was running.

Solution: delete both "Syncthing" and "SyncTrayzor" folders from below two locations
C:\User<username>\AppData\Local
C:\User<username>\AppData\Roaming

Hope this helps. Regards!

@24mlight
Copy link

24mlight commented Apr 6, 2024

thx to @jjarandab , u fixed my issue perfectly!!!

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