Open Amirnikoo66 opened 1 year ago
سلام امیر جان وقتت بخیر اسکریپت دیشب ساعت حدودا ۴ بامداد آپدیت شده لطفا با آپدیت جدید تست کن. توی آپدیت جدید مشکلات بکاپ و بازگردانی حل شده و بکاپ رو میتونی توی HOME ببینی. و اینکه توی این آپدیت یک فایل output.txt میسازه و لاگ دستورات رو اونجا مینویسه که میتونی توی همون مسیر HOME یا /root ببینیش.
اگه هنوز با اسکریپت مشکل داری لطفا محتویات فایل output.txt رو اینجا برام بزار که بررسی کنم.
سلام موقعه نصب این ارور رو میده مشکل از چیه ؟
سلام موقعه نصب این ارور رو میده مشکل از چیه ؟
داره میگه از قبل مرزبان روی MySQL اجرا شده ، احتیاج نیست شما کاری انجام بدی
احتمالا قبل از استفاده از این اسکریپت شما سعی کردید بصورت دستی دیتابیس مرزبان رو تغییر بدید. برای رفع این مشکل کافیه این دستور پایینی رو بزنید و دوباره اسکریپت رو اجرا کنید. این دستور پوشه mysql رو در مسیر /var/lib/marzban/mysql حذف میکنه :
rm -r /var/lib/marzban/mysql
متاسفانه کار نمیکنه. و من از روی اسنپشات برگردوندم سرور رو
marzban-marzban-1 | Traceback (most recent call last):
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3361, in _wrap_pool_connect
marzban-marzban-1 | return fn()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 325, in connect
marzban-marzban-1 | return _ConnectionFairy._checkout(self)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 888, in _checkout
marzban-marzban-1 | fairy = _ConnectionRecord.checkout(pool)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 491, in checkout
marzban-marzban-1 | rec = pool._do_get()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 145, in _do_get
marzban-marzban-1 | with util.safe_reraise():
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
marzban-marzban-1 | compat.raise_(
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 210, in raise_
marzban-marzban-1 | raise exception
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 143, in _do_get
marzban-marzban-1 | return self._create_connection()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 271, in _create_connection
marzban-marzban-1 | return _ConnectionRecord(self)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 386, in __init__
marzban-marzban-1 | self.__connect()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 684, in __connect
marzban-marzban-1 | with util.safe_reraise():
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
marzban-marzban-1 | compat.raise_(
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 210, in raise_
marzban-marzban-1 | raise exception
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 680, in __connect
marzban-marzban-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 578, in connect
marzban-marzban-1 | return dialect.connect(*cargs, **cparams)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 598, in connect
marzban-marzban-1 | return self.dbapi.connect(*cargs, **cparams)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 352, in __init__
marzban-marzban-1 | self.connect()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 668, in connect
marzban-marzban-1 | raise exc
marzban-marzban-1 | pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '@127.0.0.1' ([Errno -2] Name or service not known)")
marzban-marzban-1 |
marzban-marzban-1 | The above exception was the direct cause of the following exception:
marzban-marzban-1 |
marzban-marzban-1 | Traceback (most recent call last):
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 671, in lifespan
marzban-marzban-1 | async with self.lifespan_context(app):
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 566, in __aenter__
marzban-marzban-1 | await self._router.startup()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 650, in startup
marzban-marzban-1 | handler()
marzban-marzban-1 | File "/code/app/jobs/1_start_nodes.py", line 7, in app_startup
marzban-marzban-1 | config = xray.config.include_db_users()
marzban-marzban-1 | File "/code/app/xray/config.py", line 319, in include_db_users
marzban-marzban-1 | for user in get_users(db, status=UserStatus.active):
marzban-marzban-1 | File "/code/app/db/crud.py", line 148, in get_users
marzban-marzban-1 | return query.all()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2772, in all
marzban-marzban-1 | return self._iter().all()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2915, in _iter
marzban-marzban-1 | result = self.session.execute(
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1713, in execute
marzban-marzban-1 | conn = self._connection_for_bind(bind)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1552, in _connection_for_bind
marzban-marzban-1 | return self._transaction._connection_for_bind(
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 747, in _connection_for_bind
marzban-marzban-1 | conn = bind.connect()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3315, in connect
marzban-marzban-1 | return self._connection_cls(self, close_with_result=close_with_result)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 96, in __init__
marzban-marzban-1 | else engine.raw_connection()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3394, in raw_connection
marzban-marzban-1 | return self._wrap_pool_connect(self.pool.connect, _connection)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3364, in _wrap_pool_connect
marzban-marzban-1 | Connection._handle_dbapi_exception_noconnection(
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2198, in _handle_dbapi_exception_noconnection
marzban-marzban-1 | util.raise_(
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 210, in raise_
marzban-marzban-1 | raise exception
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3361, in _wrap_pool_connect
marzban-marzban-1 | return fn()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 325, in connect
marzban-marzban-1 | return _ConnectionFairy._checkout(self)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 888, in _checkout
marzban-marzban-1 | fairy = _ConnectionRecord.checkout(pool)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 491, in checkout
marzban-marzban-1 | rec = pool._do_get()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 145, in _do_get
marzban-marzban-1 | with util.safe_reraise():
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
marzban-marzban-1 | compat.raise_(
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 210, in raise_
marzban-marzban-1 | raise exception
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 143, in _do_get
marzban-marzban-1 | return self._create_connection()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 271, in _create_connection
marzban-marzban-1 | return _ConnectionRecord(self)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 386, in __init__
marzban-marzban-1 | self.__connect()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 684, in __connect
marzban-marzban-1 | with util.safe_reraise():
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
marzban-marzban-1 | compat.raise_(
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 210, in raise_
marzban-marzban-1 | raise exception
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 680, in __connect
marzban-marzban-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 578, in connect
marzban-marzban-1 | return dialect.connect(*cargs, **cparams)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 598, in connect
marzban-marzban-1 | return self.dbapi.connect(*cargs, **cparams)
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 352, in __init__
marzban-marzban-1 | self.connect()
marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 668, in connect
marzban-marzban-1 | raise exc
marzban-marzban-1 | sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on '@127.0.0.1' ([Errno -2] Name or service not known)")
marzban-marzban-1 | (Background on this error at: https://sqlalche.me/e/14/e3q8)
marzban-marzban-1 |
marzban-marzban-1 | ERROR: Application startup failed. Exiting.
marzban-marzban-1 exited with code 3
متاسفانه کار نمیکنه. و من از روی اسنپشات برگردوندم سرور رو
marzban-marzban-1 | Traceback (most recent call last): marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3361, in _wrap_pool_connect marzban-marzban-1 | return fn() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 325, in connect marzban-marzban-1 | return _ConnectionFairy._checkout(self) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 888, in _checkout marzban-marzban-1 | fairy = _ConnectionRecord.checkout(pool) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 491, in checkout marzban-marzban-1 | rec = pool._do_get() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 145, in _do_get marzban-marzban-1 | with util.safe_reraise(): marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__ marzban-marzban-1 | compat.raise_( marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 210, in raise_ marzban-marzban-1 | raise exception marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 143, in _do_get marzban-marzban-1 | return self._create_connection() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 271, in _create_connection marzban-marzban-1 | return _ConnectionRecord(self) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 386, in __init__ marzban-marzban-1 | self.__connect() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 684, in __connect marzban-marzban-1 | with util.safe_reraise(): marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__ marzban-marzban-1 | compat.raise_( marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 210, in raise_ marzban-marzban-1 | raise exception marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 680, in __connect marzban-marzban-1 | self.dbapi_connection = connection = pool._invoke_creator(self) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 578, in connect marzban-marzban-1 | return dialect.connect(*cargs, **cparams) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 598, in connect marzban-marzban-1 | return self.dbapi.connect(*cargs, **cparams) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 352, in __init__ marzban-marzban-1 | self.connect() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 668, in connect marzban-marzban-1 | raise exc marzban-marzban-1 | pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '@127.0.0.1' ([Errno -2] Name or service not known)") marzban-marzban-1 | marzban-marzban-1 | The above exception was the direct cause of the following exception: marzban-marzban-1 | marzban-marzban-1 | Traceback (most recent call last): marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 671, in lifespan marzban-marzban-1 | async with self.lifespan_context(app): marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 566, in __aenter__ marzban-marzban-1 | await self._router.startup() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 650, in startup marzban-marzban-1 | handler() marzban-marzban-1 | File "/code/app/jobs/1_start_nodes.py", line 7, in app_startup marzban-marzban-1 | config = xray.config.include_db_users() marzban-marzban-1 | File "/code/app/xray/config.py", line 319, in include_db_users marzban-marzban-1 | for user in get_users(db, status=UserStatus.active): marzban-marzban-1 | File "/code/app/db/crud.py", line 148, in get_users marzban-marzban-1 | return query.all() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2772, in all marzban-marzban-1 | return self._iter().all() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2915, in _iter marzban-marzban-1 | result = self.session.execute( marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1713, in execute marzban-marzban-1 | conn = self._connection_for_bind(bind) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 1552, in _connection_for_bind marzban-marzban-1 | return self._transaction._connection_for_bind( marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 747, in _connection_for_bind marzban-marzban-1 | conn = bind.connect() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3315, in connect marzban-marzban-1 | return self._connection_cls(self, close_with_result=close_with_result) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 96, in __init__ marzban-marzban-1 | else engine.raw_connection() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3394, in raw_connection marzban-marzban-1 | return self._wrap_pool_connect(self.pool.connect, _connection) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3364, in _wrap_pool_connect marzban-marzban-1 | Connection._handle_dbapi_exception_noconnection( marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2198, in _handle_dbapi_exception_noconnection marzban-marzban-1 | util.raise_( marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 210, in raise_ marzban-marzban-1 | raise exception marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3361, in _wrap_pool_connect marzban-marzban-1 | return fn() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 325, in connect marzban-marzban-1 | return _ConnectionFairy._checkout(self) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 888, in _checkout marzban-marzban-1 | fairy = _ConnectionRecord.checkout(pool) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 491, in checkout marzban-marzban-1 | rec = pool._do_get() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 145, in _do_get marzban-marzban-1 | with util.safe_reraise(): marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__ marzban-marzban-1 | compat.raise_( marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 210, in raise_ marzban-marzban-1 | raise exception marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 143, in _do_get marzban-marzban-1 | return self._create_connection() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 271, in _create_connection marzban-marzban-1 | return _ConnectionRecord(self) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 386, in __init__ marzban-marzban-1 | self.__connect() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 684, in __connect marzban-marzban-1 | with util.safe_reraise(): marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__ marzban-marzban-1 | compat.raise_( marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 210, in raise_ marzban-marzban-1 | raise exception marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 680, in __connect marzban-marzban-1 | self.dbapi_connection = connection = pool._invoke_creator(self) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 578, in connect marzban-marzban-1 | return dialect.connect(*cargs, **cparams) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 598, in connect marzban-marzban-1 | return self.dbapi.connect(*cargs, **cparams) marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 352, in __init__ marzban-marzban-1 | self.connect() marzban-marzban-1 | File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 668, in connect marzban-marzban-1 | raise exc marzban-marzban-1 | sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on '@127.0.0.1' ([Errno -2] Name or service not known)") marzban-marzban-1 | (Background on this error at: https://sqlalche.me/e/14/e3q8) marzban-marzban-1 | marzban-marzban-1 | ERROR: Application startup failed. Exiting. marzban-marzban-1 exited with code 3
سلام عزیز متاسفانه لاگ کاملی نزاشتید که حداقل متوجه بشم توی کدوم ریستارت ارور داده. لطفا به آیدی من در تلگرام پیام بدید : @call_the_cops
سلام . من دیشب تست کردم و متاسفانه هم درست کار نکرد این سکریپت هم بکاپ نگرفته بود