SelfhostedPro/Yacht

When opening any tab on yacht error message Internal Server Error: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))

Monkeybeam3 opened this issue · 5 comments

I'm running yacht on on my imac late 2015 8 gig ram MacOS monteray version 12.5.1. Whenever I open the control pannel it shows an error message: Internal Server Error: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied')). I have tried rebooting, reinstalling docker and yacht and none of it works. Also, on Docker v4.14.0 and Yacht version 0.0.7-alpha-2022-07-27--05. Any ideas on how to fix? Thanks!

Did you do the sudo adduser $user docker and then reboot? This gives your current user docker permissions. Bottom of the main readme file if you need details.

Saw no reason to open a new issue when I found this one. I seem to be experiencing the same issue.
My user is in the docker group. Tried both newgrp, relogging and restarting. Neither seem to work. I have no issues running Docker rootless with any other containers, only Yacht.

Fedora 37
Docker 4.15.0
Yacht v0.0.7-alpha-2022-07-27--05

Log
2022-12-11 16:12:41 [s6-init] ensuring user provided files have correct perms...exited 0.
2022-12-11 16:12:41 [fix-attrs.d] applying ownership & permissions fixes...
2022-12-11 16:12:41 [fix-attrs.d] done.
2022-12-11 16:12:41 [cont-init.d] executing container initialization scripts...
2022-12-11 16:12:41 [cont-init.d] 01-envfile: executing... 
2022-12-11 16:12:41 [cont-init.d] 01-envfile: exited 0.
2022-12-11 16:12:41 [cont-init.d] 02-tamper-check: executing... 
2022-12-11 16:12:41 [cont-init.d] 02-tamper-check: exited 0.
2022-12-11 16:12:41 [cont-init.d] 10-adduser: executing... 
2022-12-11 16:12:41 usermod: no changes
2022-12-11 16:12:41 
2022-12-11 16:12:41 -------------------------------------
2022-12-11 16:12:41           _         ()
2022-12-11 16:12:41          | |  ___   _    __
2022-12-11 16:12:41          | | / __| | |  /  \ 
2022-12-11 16:12:41          | | \__ \ | | | () |
2022-12-11 16:12:41          |_| |___/ |_|  \__/
2022-12-11 16:12:41 
2022-12-11 16:12:41 
2022-12-11 16:12:41 Brought to you by linuxserver.io
2022-12-11 16:12:41 -------------------------------------
2022-12-11 16:12:41 
2022-12-11 16:12:41 To support LSIO projects visit:
2022-12-11 16:12:41 https://www.linuxserver.io/donate/
2022-12-11 16:12:41 -------------------------------------
2022-12-11 16:12:41 GID/UID
2022-12-11 16:12:41 -------------------------------------
2022-12-11 16:12:41 
2022-12-11 16:12:41 User uid:    911
2022-12-11 16:12:41 User gid:    911
2022-12-11 16:12:41 -------------------------------------
2022-12-11 16:12:41 
2022-12-11 16:12:41 [cont-init.d] 10-adduser: exited 0.
2022-12-11 16:12:41 [cont-init.d] 30-config: executing... 
2022-12-11 16:12:41 [cont-init.d] 30-config: exited 0.
2022-12-11 16:12:41 [cont-init.d] 31-migrate: executing... 
2022-12-11 16:12:41 --- MODELS ---
2022-12-11 16:12:41 FAILED: Target database is not up to date.
2022-12-11 16:12:41 --- MODELS ---
2022-12-11 16:12:41 INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
2022-12-11 16:12:41 INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
2022-12-11 16:12:41 ERROR [alembic.util.messaging] Target database is not up to date.
2022-12-11 16:12:41 INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
2022-12-11 16:12:41 INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
2022-12-11 16:12:41 INFO  [alembic.runtime.migration] Running upgrade  -> 0ca6b74229a8, automated db upgrade
2022-12-11 16:12:41 Traceback (most recent call last):
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
2022-12-11 16:12:41     self.dialect.do_execute(
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
2022-12-11 16:12:41     cursor.execute(statement, parameters)
2022-12-11 16:12:41 sqlite3.OperationalError: table template_variables already exists
2022-12-11 16:12:41 
2022-12-11 16:12:41 The above exception was the direct cause of the following exception:
2022-12-11 16:12:41 
2022-12-11 16:12:41 Traceback (most recent call last):
2022-12-11 16:12:41   File "/usr/bin/alembic", line 8, in <module>
2022-12-11 16:12:41     sys.exit(main())
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/config.py", line 581, in main
2022-12-11 16:12:41     CommandLine(prog=prog).main(argv=argv)
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/config.py", line 575, in main
2022-12-11 16:12:41     self.run_cmd(cfg, options)
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/config.py", line 552, in run_cmd
2022-12-11 16:12:41     fn(
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/command.py", line 298, in upgrade
2022-12-11 16:12:41     script.run_env()
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/script/base.py", line 489, in run_env
2022-12-11 16:12:41     util.load_python_file(self.dir, "env.py")
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
2022-12-11 16:12:41     module = load_module_py(module_id, path)
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/util/compat.py", line 184, in load_module_py
2022-12-11 16:12:41     spec.loader.exec_module(module)
2022-12-11 16:12:41   File "<frozen importlib._bootstrap_external>", line 848, in exec_module
2022-12-11 16:12:41   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2022-12-11 16:12:41   File "/alembic/env.py", line 93, in <module>
2022-12-11 16:12:41     run_migrations_online()
2022-12-11 16:12:41   File "/alembic/env.py", line 87, in run_migrations_online
2022-12-11 16:12:41     context.run_migrations()
2022-12-11 16:12:41   File "<string>", line 8, in run_migrations
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/runtime/environment.py", line 846, in run_migrations
2022-12-11 16:12:41     self.get_context().run_migrations(**kw)
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/runtime/migration.py", line 522, in run_migrations
2022-12-11 16:12:41     step.migration_fn(**kw)
2022-12-11 16:12:41   File "/alembic/versions/0ca6b74229a8_automated_db_upgrade.py", line 21, in upgrade
2022-12-11 16:12:41     op.create_table('template_variables',
2022-12-11 16:12:41   File "<string>", line 8, in create_table
2022-12-11 16:12:41   File "<string>", line 3, in create_table
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/operations/ops.py", line 1252, in create_table
2022-12-11 16:12:41     return operations.invoke(op)
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/operations/base.py", line 373, in invoke
2022-12-11 16:12:41     return fn(self, operation)
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/operations/toimpl.py", line 101, in create_table
2022-12-11 16:12:41     operations.impl.create_table(table)
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/ddl/impl.py", line 259, in create_table
2022-12-11 16:12:41     self._exec(schema.CreateTable(table))
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/alembic/ddl/impl.py", line 141, in _exec
2022-12-11 16:12:41     return conn.execute(construct, *multiparams, **params)
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
2022-12-11 16:12:41     return meth(self, multiparams, params)
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/sqlalchemy/sql/ddl.py", line 72, in _execute_on_connection
2022-12-11 16:12:41     return connection._execute_ddl(self, multiparams, params)
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1068, in _execute_ddl
2022-12-11 16:12:41     ret = self._execute_context(
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
2022-12-11 16:12:41     self._handle_dbapi_exception(
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
2022-12-11 16:12:41     util.raise_(
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
2022-12-11 16:12:41     raise exception
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
2022-12-11 16:12:41     self.dialect.do_execute(
2022-12-11 16:12:41   File "/usr/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
2022-12-11 16:12:41     cursor.execute(statement, parameters)
2022-12-11 16:12:41 sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) table template_variables already exists
2022-12-11 16:12:41 [SQL: 
2022-12-11 16:12:41 CREATE TABLE template_variables (
2022-12-11 16:12:41 id INTEGER NOT NULL, 
2022-12-11 16:12:41 variable VARCHAR(255) NOT NULL, 
2022-12-11 16:12:41 replacement VARCHAR(255) NOT NULL, 
2022-12-11 16:12:41 PRIMARY KEY (id)
2022-12-11 16:12:41 )
2022-12-11 16:12:41 
2022-12-11 16:12:41 ]
2022-12-11 16:12:41 (Background on this error at: http://sqlalche.me/e/13/e3q8)
2022-12-11 16:12:42 INFO:     Started server process [354]
2022-12-11 16:12:42 INFO:     Waiting for application startup.
2022-12-11 16:12:42 INFO:     Application startup complete.
2022-12-11 16:12:42 INFO:     Uvicorn running on unix socket /tmp/gunicorn.sock (Press CTRL+C to quit)
2022-12-11 16:12:41 [cont-init.d] 31-migrate: exited 1.
2022-12-11 16:12:41 [cont-init.d] 32-env: executing... 
2022-12-11 16:12:41 Replacing env constants in JS
2022-12-11 16:12:41 Processing /app/js/app.37804ef8.js ...
2022-12-11 16:12:42 Processing /app/js/app.37804ef8.js.map ...
2022-12-11 16:12:42 Processing /app/index.html ...
2022-12-11 16:12:42 [cont-init.d] 32-env: exited 0.
2022-12-11 16:12:42 [cont-init.d] 90-custom-folders: executing... 
2022-12-11 16:12:42 [cont-init.d] 90-custom-folders: exited 0.
2022-12-11 16:12:42 [cont-init.d] 99-custom-files: executing... 
2022-12-11 16:12:42 [custom-init] no custom files found exiting...
2022-12-11 16:12:42 [cont-init.d] 99-custom-files: exited 0.
2022-12-11 16:12:42 [cont-init.d] done.
2022-12-11 16:12:42 [services.d] starting services
2022-12-11 16:12:42 [services.d] done.
2022-12-11 16:16:15 Secret key exists
2022-12-11 16:16:15 Secret key exists
2022-12-11 16:16:15 DISABLE_AUTH = False (<class 'bool'>)
2022-12-11 16:16:15 Users Exist
2022-12-11 16:16:15 Template Variables Exist
2022-12-11 16:16:15 INFO:      - "GET /api/apps/ HTTP/1.1" 500 Internal Server Error
2022-12-11 16:16:15 INFO:      - "GET /api/auth/me HTTP/1.1" 200 OK
2022-12-11 16:16:26 INFO:      - "GET /api/apps/ HTTP/1.1" 500 Internal Server Error
2022-12-11 16:16:30 INFO:      - "GET /api/templates/ HTTP/1.1" 200 OK

That looks like there was an issue with the SQLite database. I would export your config in settings, delete the SQLite db in the yacht folder (or all yacht data), and then import into a fresh installation.

That looks like there was an issue with the SQLite database. I would export your config in settings, delete the SQLite db in the yacht folder (or all yacht data), and then import into a fresh installation.

This seems to have fixed the problem for me. I do have another issue now, but I'm gonna troubleshoot by myself a bit, and in any case that's for another topic than this. Thanks for the help though!

@R-Sharafaldin Thank you and I will close the issue. If there is anything else feel free to open another ticket or reach out to us on discord.