Closed FrancisTurner closed 3 years ago
Note that if I continually restart commentoplusplus it will eventually run anyway and I can attempt to sign up a user. However that doesn't actually work and gives an error. I can probably provide the additional syslog errors but there doesn't seem to be much point because I'm sure the errors are related to the initial database initialization failing
And when I try the devel build it works....
Thanks for the bug report! The errors you're getting appear to be due to the database not being set up by commentoplusplus correctly. The database setup happens by loading in all the migrations in the db/
folder one by one, which creates the appropriate tables, upgrades the database structure from previous commento versions, etc.
From the sound of things, since the make devel
build works, it's unlikely to be an issue with the code. What is more likely from the logs is that the folder full of migrations at build/prod/db
is incomplete for some reason (filesystem error?) and so the initialisation never quite finishes properly.
Can you please report back the results of ls -la build/prod/db
and ls -la build/devel/db
?
prod.txt dev.txt prod.txt is ls -la build/prod/db dev.txt is ls -la build/devel/db
The prod files are all 0 length, which is undoubtedly the problem. I'll try a rebuild and I plan to mix and match binaries and directories today and see the prod binary works with everything else from devel. I'll let you know. The devel binary and scripts etc. seems to be working just fine for me now but I assume it's better to deploy the prod binary in production
Ah I see the issue, for some reason the file sizes for all of the database schemas are indeed 0 in the build/prod/db folder!
It looks like for some reason the file copy command partially failed? If you copy the schemas over manually it should hopefully fix this issue (or run a make clean && make prod
!) Also I think microSD card write failures are quite common in raspberry Pis (I've certainly had a fair few from overuse) so please do check that yours hasn't been worn out!
The devel build process should work just fine but I would highly recommend using the prod build process if you are deploying as it should be getting rid of debug code, run faster and minify the JavaScript :)
I have been building ARM versions of commento (plus plus) to run on my Raspberry Pi.
I built the original commento by doing git clone, make prod etc. and it works fine. I built commentoplusplus the same way and I can run it just fine replacing the original commento in a place where the original has set up the database and registered the first user If I use commentoplusplus to setup the database and register the first user it fails.
By doing repeated dropdb/createdb I have been able to reproduce this at will.
This is commento working
This is commentoplusplus not working