Open deadcxap opened 4 days ago
Hi
onnection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections?
do you install postgresql on this server?
I reinstalled the entire stack, used an external postgre, created a database and user there, and the error changed to this:
deadcxap@ubucxap:~/EloraVPNManager$ alembic upgrade head
Telegram Payment Bot not set!
Order JOBS are disabled!
Sync accounts JOBS are disabled!
Remove disabled account JOBS are disabled!
Notification jobs are disabled!
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 704bb66b328f, Create a baseline migrations
INFO [alembic.runtime.migration] Running upgrade 704bb66b328f -> d8b2d9e1700d, Add network field to InboundConfig
INFO [alembic.runtime.migration] Running upgrade d8b2d9e1700d -> 8c6b724752e9, Add Notification models
INFO [alembic.runtime.migration] Running upgrade 8c6b724752e9 -> 3b5685f8dd99, Init commerce tables
INFO [alembic.runtime.migration] Running upgrade 3b5685f8dd99 -> 33bad9194cea, Add column enable to service model
INFO [alembic.runtime.migration] Running upgrade 33bad9194cea -> c48ee34607da, Add date columns to service model
INFO [alembic.runtime.migration] Running upgrade c48ee34607da -> 42f7b8e1a7af, Add referral user id columns to user model
INFO [alembic.runtime.migration] Running upgrade 42f7b8e1a7af -> c639b45954ac, Add commerce types to notificationtype
INFO [alembic.runtime.migration] Running upgrade c639b45954ac -> 9b69e8d4688e, Add user_id to Notification model
INFO [alembic.runtime.migration] Running upgrade 9b69e8d4688e -> 76945c05dad7, Add HostZone model
INFO [alembic.runtime.migration] Running upgrade 76945c05dad7 -> 1d0e2502f045, Add Reality to InboundSecurity
INFO [alembic.runtime.migration] Running upgrade 1d0e2502f045 -> 6f6fcd3424aa, Add gRPC to InboundNetwork
INFO [alembic.runtime.migration] Running upgrade 6f6fcd3424aa -> 82515a1003a8, Add Reality params to InboundConfig
INFO [alembic.runtime.migration] Running upgrade 82515a1003a8 -> b21f5b2d77ec, Add InboundFlow type
INFO [alembic.runtime.migration] Running upgrade b21f5b2d77ec -> 2b59bac07ae2, Add IP Limit
INFO [alembic.runtime.migration] Running upgrade 2b59bac07ae2 -> 0a889efbe845, Add host zone id to Order model
INFO [alembic.runtime.migration] Running upgrade 0a889efbe845 -> 77c9260b83e6, Add force_join_channel to User model
INFO [alembic.runtime.migration] Running upgrade 77c9260b83e6 -> 56e35f688981, Add Monitoring Result model
INFO [alembic.runtime.migration] Running upgrade 56e35f688981 -> f452162261a7, add send_to_admin to Notification model
INFO [alembic.runtime.migration] Running upgrade f452162261a7 -> d986a59ac521, Add some fields to Account model
INFO [alembic.runtime.migration] Running upgrade d986a59ac521 -> c1ea3c87fe77, Add service host zones relation
INFO [alembic.runtime.migration] Running upgrade c1ea3c87fe77 -> fe1a3ae27e35, Add Club Score model
INFO [alembic.runtime.migration] Running upgrade fe1a3ae27e35 -> 318548385b4c, Add Desription To Club Score
INFO [alembic.runtime.migration] Running upgrade 318548385b4c -> b70bc92791cd, Add Club Profile Model
INFO [alembic.runtime.migration] Running upgrade b70bc92791cd -> 5c89d4bccd15, Add photo_url and keyboard to Notification Model
Traceback (most recent call last):
File "/home/deadcxap/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1969, in _exec_single_context
self.dialect.do_execute(
File "/home/deadcxap/.local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 922, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.UndefinedObject: index "ix_account_used_traffic_account_id" does not exist
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/bin/alembic", line 33, in <module>
sys.exit(load_entry_point('alembic==1.13.1.dev0', 'console_scripts', 'alembic')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/config.py", line 632, in main
CommandLine(prog=prog).main(argv=argv)
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/config.py", line 626, in main
self.run_cmd(cfg, options)
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/config.py", line 603, in run_cmd
fn(
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/command.py", line 385, in upgrade
script.run_env()
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/script/base.py", line 582, in run_env
util.load_python_file(self.dir, "env.py")
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 94, in load_python_file
module = load_module_py(module_id, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 110, in load_module_py
spec.loader.exec_module(module) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/home/deadcxap/EloraVPNManager/src/migration/alembic/env.py", line 82, in <module>
run_migrations_online()
File "/home/deadcxap/EloraVPNManager/src/migration/alembic/env.py", line 76, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/runtime/environment.py", line 928, in run_migrations
self.get_context().run_migrations(**kw)
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/runtime/migration.py", line 628, in run_migrations
step.migration_fn(**kw)
File "/home/deadcxap/EloraVPNManager/src/migration/alembic/versions/5c89d4bccd15_add_photo_url_and_keyboard_to_.py", line 22, in upgrade
op.drop_index(
File "<string>", line 8, in drop_index
File "<string>", line 3, in drop_index
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/operations/ops.py", line 1094, in drop_index
return operations.invoke(op)
^^^^^^^^^^^^^^^^^^^^^
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/operations/base.py", line 395, in invoke
return fn(self, operation)
^^^^^^^^^^^^^^^^^^^
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/operations/toimpl.py", line 104, in drop_index
operations.impl.drop_index(
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/ddl/impl.py", line 395, in drop_index
self._exec(schema.DropIndex(index))
File "/home/deadcxap/.local/lib/python3.12/site-packages/alembic/ddl/impl.py", line 193, in _exec
return conn.execute( # type: ignore[call-overload]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/deadcxap/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1416, in execute
return meth(
^^^^^
File "/home/deadcxap/.local/lib/python3.12/site-packages/sqlalchemy/sql/ddl.py", line 181, in _execute_on_connection
return connection._execute_ddl(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/deadcxap/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1528, in _execute_ddl
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/home/deadcxap/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1848, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/deadcxap/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1988, in _exec_single_context
self._handle_dbapi_exception(
File "/home/deadcxap/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2343, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/home/deadcxap/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1969, in _exec_single_context
self.dialect.do_execute(
File "/home/deadcxap/.local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 922, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedObject) index "ix_account_used_traffic_account_id" does not exist
[SQL:
DROP INDEX ix_account_used_traffic_account_id]
(Background on this error at: https://sqlalche.me/e/20/f405)
I did a clean install of ubuntu 22, installed only python 3.10.12, pip 22.0.2, libpq-dev, Nodejs 20.18.0, npm 10.8.2, yarn 1.22.22 I configured api_token in .env, admin_id and sub_base_url When I try to launch I get this error after the "alembic upgrade head" command
If I run main.py, the service starts, but any attempt to contact the telegram bot gives an error
EloraVPNManagerPanel is installed and starts, but when I try to log in with the username/password admin I get an error
I tried installing postgresql separately, but that didn't solve the problem. Should the script configure the database itself, or should it be done manually?