Cloudron say app is running, but there is an Internal Server Error
-
See https://books.uniteddiversity.coop/
It's actually been like this for a while but I've not got around to reporting it yet!
Traceback (most recent call last): File "/app/code/calibre-web/cps/db.py", line 627, in fill_indexpage_with_archived_books len(query.all())) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/query.py", line 3373, in all return list(self) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/query.py", line 3535, in __iter__ return self._execute_and_instances(context) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/query.py", line 3557, in _execute_and_instances querycontext, self._connection_from_session, close_with_result=True File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/query.py", line 3572, in _get_bind_args mapper=self._bind_mapper(), clause=querycontext.statement, **kw File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/query.py", line 3550, in _connection_from_session conn = self.session.connection(**kw) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 1145, in connection execution_options=execution_options, File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 1151, in _connection_for_bind engine, execution_options File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 409, in _connection_for_bind self._assert_active() File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/session.py", line 296, in _assert_active code="7s2a", sqlalchemy.exc.InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (sqlite3.OperationalError) attempt to write a readonly database [SQL: DELETE FROM books_authors_link WHERE books_authors_link.book = ? AND books_authors_link.author = ?] [parameters: ((1159, 1143), (1159, 1144), (1159, 1145))] (Background on this error at: http://sqlalche.me/e/13/e3q8) (Background on this error at: http://sqlalche.me/e/13/7s2a) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/app/code/calibre-web/cps/usermanagement.py", line 38, in decorated_view return login_required(func)(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/flask_login/utils.py", line 272, in decorated_view return func(*args, **kwargs) File "/app/code/calibre-web/cps/web.py", line 718, in index return render_books_list("newest", sort_param, 1, page) File "/app/code/calibre-web/cps/web.py", line 421, in render_books_list entries, random, pagination = calibre_db.fill_indexpage(page, 0, db.Books, True, order) File "/app/code/calibre-web/cps/db.py", line 608, in fill_indexpage return self.fill_indexpage_with_archived_books(page, pagesize, database, db_filter, order, False, *join) File "/app/code/calibre-web/cps/db.py", line 630, in fill_indexpage_with_archived_books logger.debug(e) AttributeError: module 'cps.logger' has no attribute 'debug'
I also just noticed that this package is still Calibre Web Version 0.6.10 whereas the current package is 0.6.12
https://github.com/janeczku/calibre-web/releases/tag/0.6.12
I can't help wondering if upgrading might fix what the issue is I'm having.
As a related aside, I'm wondering what left is required to get this from unstable to stable?
-
@jdaviescoates said in Cloudron say app is running, but there is an Internal Server Error:
I think this is perhaps somehow related to Volumes because I was just able to recreate it.
It was.
I looked at the File Manager for the Volume and spotted that some folders and the metadata.db were owned by root instead of Cloudron.
I started changing them one by one via the File Manager but that was tiresome so I open the Web Terminal and ran:
chown -R cloudron:cloudron /library
That fixed the issue on another test I installed, but didn't resolve the issue with my initial install. So I just kept the next test install and moved it books.uniteddiversity.coop which is now working again (well, working in a unstable and outdated state )
I'm pretty sure the issue was created when I rsync'd up a load more books to the Hetzner Storage Box where the Volume actually lives. I'd forgotten that I need to do the chown thing afterwards (and now I'm wondering if I can edit my rsync command to stop me having to chown afterwards...)
-
I think this is perhaps somehow related to Volumes because I was just able to recreate it.
I did a fresh install at booktest.ud.coop and as soon as I entered /media/books/library/ as the library location in basic config, the same thing happened to what has happened at books.uniteddiversity.coop
Note, when entering other incorrect values into that box (which I did before I got it right) didn't result in the same thing happening. Only when I put the correct path to the relevant folder in the volume did it happen.
-
@jdaviescoates said in Cloudron say app is running, but there is an Internal Server Error:
this package is still Calibre Web Version 0.6.10 whereas the current package is 0.6.12
Also, 0.6.10 was obsoleted by 0.6.11 on 2021-02-02 --- so the Cloudron package is 5 months out of date!
-
@hillside502 yeah, although given it's still in unstable I guess that's understandable. I take unstable to mean "unsupported and unmaintained"
-
@jdaviescoates said in Cloudron say app is running, but there is an Internal Server Error:
I think this is perhaps somehow related to Volumes because I was just able to recreate it.
It was.
I looked at the File Manager for the Volume and spotted that some folders and the metadata.db were owned by root instead of Cloudron.
I started changing them one by one via the File Manager but that was tiresome so I open the Web Terminal and ran:
chown -R cloudron:cloudron /library
That fixed the issue on another test I installed, but didn't resolve the issue with my initial install. So I just kept the next test install and moved it books.uniteddiversity.coop which is now working again (well, working in a unstable and outdated state )
I'm pretty sure the issue was created when I rsync'd up a load more books to the Hetzner Storage Box where the Volume actually lives. I'd forgotten that I need to do the chown thing afterwards (and now I'm wondering if I can edit my rsync command to stop me having to chown afterwards...)