aurora-admin-panel / deploy Goto Github PK
View Code? Open in Web Editor NEW一个多服务器端口租用管理面板
License: MIT License
一个多服务器端口租用管理面板
License: MIT License
问题描述:
数据库连接数太多。
使用docker-compose跑了几天,今天发现页面报错,日志上显示连接数过多。
日志:
nginx_1 | 192.168.1.111 - - [28/Jan/2021:01:26:13 +0000] "GET /api/v1/servers/1/ports HTTP/1.1" 500 21 "http://192.168.1.189:8000/app/servers/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" "-"
backend_1 | ERROR: Exception in ASGI application
backend_1 | Traceback (most recent call last):
backend_1 | File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 389, in run_asgi
backend_1 | result = await app(self.scope, self.receive, self.send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in call
backend_1 | return await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 179, in call
backend_1 | await super().call(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 111, in call
backend_1 | await self.middleware_stack(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in call
backend_1 | raise exc from None
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in call
backend_1 | await self.app(scope, receive, _send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in call
backend_1 | response = await self.dispatch_func(request, self.call_next)
backend_1 | File "/app/app/main.py", line 70, in db_session_middleware
backend_1 | response = await call_next(request)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 45, in call_next
backend_1 | task.result()
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in call
backend_1 | response = await self.dispatch_func(request, self.call_next)
backend_1 | File "/app/app/main.py", line 64, in sentry_exception
backend_1 | raise e
backend_1 | File "/app/app/main.py", line 56, in sentry_exception
backend_1 | response = await call_next(request)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 45, in call_next
backend_1 | task.result()
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/cors.py", line 78, in call
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in call
backend_1 | raise exc from None
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in call
backend_1 | await self.app(scope, receive, sender)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 566, in call
backend_1 | await route.handle(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
backend_1 | response = await func(request)
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 172, in app
backend_1 | solved_result = await solve_dependencies(
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 518, in solve_dependencies
backend_1 | solved_result = await solve_dependencies(
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 550, in solve_dependencies
backend_1 | solved = await call(**sub_values)
backend_1 | File "/app/app/core/auth.py", line 31, in get_current_user
backend_1 | user = get_user_by_email(db, token_data.email)
backend_1 | File "/app/app/db/crud/user.py", line 33, in get_user_by_email
backend_1 | return db.query(User).filter(User.email == email).first()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3402, in first
backend_1 | ret = list(self[0:1])
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3176, in getitem
backend_1 | return list(res)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3508, in iter
backend_1 | return self._execute_and_instances(context)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3529, in _execute_and_instances
backend_1 | conn = self._get_bind_args(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3544, in _get_bind_args
backend_1 | return fn(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3523, in _connection_from_session
backend_1 | conn = self.session.connection(**kw)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1138, in connection
backend_1 | return self._connection_for_bind(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1146, in _connection_for_bind
backend_1 | return self.transaction._connection_for_bind(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 433, in _connection_for_bind
backend_1 | conn = bind._contextual_connect()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2304, in _contextual_connect
backend_1 | self._wrap_pool_connect(self.pool.connect, None),
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2341, in _wrap_pool_connect
backend_1 | Connection.handle_dbapi_exception_noconnection(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1583, in handle_dbapi_exception_noconnection
backend_1 | util.raise(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise
backend_1 | raise exception
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2338, in _wrap_pool_connect
backend_1 | return fn()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 364, in connect
backend_1 | return _ConnectionFairy._checkout(self)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 778, in _checkout
backend_1 | fairy = _ConnectionRecord.checkout(pool)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 495, in checkout
backend_1 | rec = pool._do_get()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 140, in do_get
backend_1 | self.dec_overflow()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
backend_1 | compat.raise(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise
backend_1 | raise exception
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 137, in _do_get
backend_1 | return self._create_connection()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 309, in _create_connection
backend_1 | return _ConnectionRecord(self)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 440, in init
backend_1 | self.__connect(first_connect_check=True)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 661, in connect
backend_1 | pool.logger.debug("Error on connect(): %s", e)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
backend_1 | compat.raise(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise
backend_1 | raise exception
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 656, in __connect
backend_1 | connection = pool._invoke_creator(self)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
backend_1 | return dialect.connect(*cargs, **cparams)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 493, in connect
backend_1 | return self.dbapi.connect(*cargs, **cparams)
backend_1 | File "/usr/local/lib/python3.8/site-packages/psycopg2/init.py", line 127, in connect
backend_1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
backend_1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: sorry, too many clients already
backend_1 |
backend_1 | (Background on this error at: http://sqlalche.me/e/13/e3q8)
nginx_1 | 192.168.1.111 - - [28/Jan/2021:01:26:18 +0000] "GET /app/servers/1 HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" "-"
nginx_1 | 192.168.1.111 - - [28/Jan/2021:01:26:18 +0000] "GET /static/css/main.81158702.chunk.css HTTP/1.1" 304 0 "http://192.168.1.189:8000/app/servers/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" "-"
nginx_1 | 192.168.1.111 - - [28/Jan/2021:01:26:18 +0000] "GET /static/js/1.b3a9922d.chunk.js HTTP/1.1" 304 0 "http://192.168.1.189:8000/app/servers/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" "-"
nginx_1 | 192.168.1.111 - - [28/Jan/2021:01:26:18 +0000] "GET /static/js/7.83a760e0.chunk.js HTTP/1.1" 304 0 "http://192.168.1.189:8000/app/servers/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" "-"
nginx_1 | 192.168.1.111 - - [28/Jan/2021:01:26:18 +0000] "GET /static/js/12.d499cca5.chunk.js HTTP/1.1" 304 0 "http://192.168.1.189:8000/app/servers/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" "-"
nginx_1 | 192.168.1.111 - - [28/Jan/2021:01:26:18 +0000] "GET /static/js/0.da4c9520.chunk.js HTTP/1.1" 304 0 "http://192.168.1.189:8000/app/servers/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" "-"
nginx_1 | 192.168.1.111 - - [28/Jan/2021:01:26:18 +0000] "GET /static/js/8.0042e93f.chunk.js HTTP/1.1" 304 0 "http://192.168.1.189:8000/app/servers/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" "-"
postgres_1 | 2021-01-28 01:26:18.932 UTC [8640] FATAL: sorry, too many clients already
backend_1 | INFO: 192.168.224.4:53366 - "GET /api/v1/users/me HTTP/1.0" 500 Internal Server Error
nginx_1 | 192.168.1.111 - - [28/Jan/2021:01:26:18 +0000] "GET /api/v1/users/me HTTP/1.1" 500 21 "http://192.168.1.189:8000/app/servers/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" "-"
backend_1 | ERROR: Exception in ASGI application
backend_1 | Traceback (most recent call last):
backend_1 | File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 389, in run_asgi
backend_1 | result = await app(self.scope, self.receive, self.send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in call
backend_1 | return await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 179, in call
backend_1 | await super().call(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 111, in call
backend_1 | await self.middleware_stack(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in call
backend_1 | raise exc from None
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in call
backend_1 | await self.app(scope, receive, _send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in call
backend_1 | response = await self.dispatch_func(request, self.call_next)
backend_1 | File "/app/app/main.py", line 70, in db_session_middleware
backend_1 | response = await call_next(request)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 45, in call_next
backend_1 | task.result()
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in call
backend_1 | response = await self.dispatch_func(request, self.call_next)
backend_1 | File "/app/app/main.py", line 64, in sentry_exception
backend_1 | raise e
backend_1 | File "/app/app/main.py", line 56, in sentry_exception
backend_1 | response = await call_next(request)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 45, in call_next
backend_1 | task.result()
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/cors.py", line 78, in call
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in call
backend_1 | raise exc from None
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in call
backend_1 | await self.app(scope, receive, sender)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 566, in call
backend_1 | await route.handle(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
backend_1 | response = await func(request)
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 172, in app
backend_1 | solved_result = await solve_dependencies(
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 518, in solve_dependencies
backend_1 | solved_result = await solve_dependencies(
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 550, in solve_dependencies
backend_1 | solved = await call(**sub_values)
backend_1 | File "/app/app/core/auth.py", line 31, in get_current_user
backend_1 | user = get_user_by_email(db, token_data.email)
backend_1 | File "/app/app/db/crud/user.py", line 33, in get_user_by_email
backend_1 | return db.query(User).filter(User.email == email).first()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3402, in first
backend_1 | ret = list(self[0:1])
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3176, in getitem
backend_1 | return list(res)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3508, in iter
backend_1 | return self._execute_and_instances(context)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3529, in _execute_and_instances
backend_1 | conn = self._get_bind_args(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3544, in _get_bind_args
backend_1 | return fn(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3523, in _connection_from_session
backend_1 | conn = self.session.connection(**kw)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1138, in connection
backend_1 | return self._connection_for_bind(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1146, in _connection_for_bind
backend_1 | return self.transaction._connection_for_bind(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 433, in _connection_for_bind
backend_1 | conn = bind._contextual_connect()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2304, in _contextual_connect
backend_1 | self._wrap_pool_connect(self.pool.connect, None),
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2341, in _wrap_pool_connect
backend_1 | Connection.handle_dbapi_exception_noconnection(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1583, in handle_dbapi_exception_noconnection
backend_1 | util.raise(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise
backend_1 | raise exception
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2338, in _wrap_pool_connect
backend_1 | return fn()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 364, in connect
backend_1 | return _ConnectionFairy._checkout(self)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 778, in _checkout
backend_1 | fairy = _ConnectionRecord.checkout(pool)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 495, in checkout
backend_1 | rec = pool._do_get()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 140, in do_get
backend_1 | self.dec_overflow()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
backend_1 | compat.raise(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise
backend_1 | raise exception
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 137, in _do_get
backend_1 | return self._create_connection()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 309, in _create_connection
backend_1 | return _ConnectionRecord(self)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 440, in init
backend_1 | self.__connect(first_connect_check=True)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 661, in connect
backend_1 | pool.logger.debug("Error on connect(): %s", e)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
backend_1 | compat.raise(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise
backend_1 | raise exception
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 656, in __connect
backend_1 | connection = pool._invoke_creator(self)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
backend_1 | return dialect.connect(*cargs, **cparams)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 493, in connect
backend_1 | return self.dbapi.connect(*cargs, **cparams)
backend_1 | File "/usr/local/lib/python3.8/site-packages/psycopg2/init.py", line 127, in connect
backend_1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
backend_1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: sorry, too many clients already
backend_1 |
backend_1 | (Background on this error at: http://sqlalche.me/e/13/e3q8)
postgres_1 | 2021-01-28 01:26:18.976 UTC [8641] FATAL: sorry, too many clients already
backend_1 | INFO: 192.168.224.4:53370 - "GET /api/v1/servers/1/ports HTTP/1.0" 500 Internal Server Error
nginx_1 | 192.168.1.111 - - [28/Jan/2021:01:26:18 +0000] "GET /api/v1/servers/1/ports HTTP/1.1" 500 21 "http://192.168.1.189:8000/app/servers/1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" "-"
backend_1 | ERROR: Exception in ASGI application
backend_1 | Traceback (most recent call last):
backend_1 | File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 389, in run_asgi
backend_1 | result = await app(self.scope, self.receive, self.send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in call
backend_1 | return await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 179, in call
backend_1 | await super().call(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 111, in call
backend_1 | await self.middleware_stack(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in call
backend_1 | raise exc from None
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in call
backend_1 | await self.app(scope, receive, _send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in call
backend_1 | response = await self.dispatch_func(request, self.call_next)
backend_1 | File "/app/app/main.py", line 70, in db_session_middleware
backend_1 | response = await call_next(request)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 45, in call_next
backend_1 | task.result()
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 25, in call
backend_1 | response = await self.dispatch_func(request, self.call_next)
backend_1 | File "/app/app/main.py", line 64, in sentry_exception
backend_1 | raise e
backend_1 | File "/app/app/main.py", line 56, in sentry_exception
backend_1 | response = await call_next(request)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 45, in call_next
backend_1 | task.result()
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/base.py", line 38, in coro
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/cors.py", line 78, in call
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in call
backend_1 | raise exc from None
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in call
backend_1 | await self.app(scope, receive, sender)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 566, in call
backend_1 | await route.handle(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
backend_1 | response = await func(request)
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 172, in app
backend_1 | solved_result = await solve_dependencies(
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 518, in solve_dependencies
backend_1 | solved_result = await solve_dependencies(
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 550, in solve_dependencies
backend_1 | solved = await call(**sub_values)
backend_1 | File "/app/app/core/auth.py", line 31, in get_current_user
backend_1 | user = get_user_by_email(db, token_data.email)
backend_1 | File "/app/app/db/crud/user.py", line 33, in get_user_by_email
backend_1 | return db.query(User).filter(User.email == email).first()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3402, in first
backend_1 | ret = list(self[0:1])
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3176, in getitem
backend_1 | return list(res)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3508, in iter
backend_1 | return self._execute_and_instances(context)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3529, in _execute_and_instances
backend_1 | conn = self._get_bind_args(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3544, in _get_bind_args
backend_1 | return fn(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3523, in _connection_from_session
backend_1 | conn = self.session.connection(**kw)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1138, in connection
backend_1 | return self._connection_for_bind(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1146, in _connection_for_bind
backend_1 | return self.transaction._connection_for_bind(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 433, in _connection_for_bind
backend_1 | conn = bind._contextual_connect()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2304, in _contextual_connect
backend_1 | self._wrap_pool_connect(self.pool.connect, None),
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2341, in _wrap_pool_connect
backend_1 | Connection.handle_dbapi_exception_noconnection(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1583, in handle_dbapi_exception_noconnection
backend_1 | util.raise(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise
backend_1 | raise exception
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2338, in _wrap_pool_connect
backend_1 | return fn()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 364, in connect
backend_1 | return _ConnectionFairy._checkout(self)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 778, in _checkout
backend_1 | fairy = _ConnectionRecord.checkout(pool)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 495, in checkout
backend_1 | rec = pool._do_get()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 140, in do_get
backend_1 | self.dec_overflow()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
backend_1 | compat.raise(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise
backend_1 | raise exception
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 137, in _do_get
backend_1 | return self._create_connection()
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 309, in _create_connection
backend_1 | return _ConnectionRecord(self)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 440, in init
backend_1 | self.__connect(first_connect_check=True)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 661, in connect
backend_1 | pool.logger.debug("Error on connect(): %s", e)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
backend_1 | compat.raise(
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise
backend_1 | raise exception
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 656, in __connect
backend_1 | connection = pool._invoke_creator(self)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
backend_1 | return dialect.connect(*cargs, **cparams)
backend_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 493, in connect
backend_1 | return self.dbapi.connect(*cargs, **cparams)
backend_1 | File "/usr/local/lib/python3.8/site-packages/psycopg2/init.py", line 127, in connect
backend_1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
backend_1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: sorry, too many clients already
backend_1 |
backend_1 | (Background on this error at: http://sqlalche.me/e/13/e3q8)
临时解决方法:
docker-compose restart
能否添加一个kcptun?
gost虽然带kcptun但是不支持命令行设置参数,要配置文件, 还得手动去上传,很麻烦
可以加一个原版的kcptun吗?
https://github.com/xtaci/kcptun
ssh链接成功后,添加端口会无限转圈,docker reboot后正常,但是端口数会变,跟原来的设置毫无关系
作者大大 能不能增加个邀请码注册哇
没有邀请码注册不了,一个邀请码只能使用一次
注册后 自动分配端口
[信息] 正在下载最新配置文件 ...
-----------------------------------
[信息] 面板监听端口: 8000
[信息] 开启错误跟踪: 'yes'
[信息] 流量同步周期: 10 分钟
[信息] DDNS同步周期: 2 分钟
-----------------------------------
ERROR: The Compose file './docker-compose.yml' is invalid because:
networks.worker value 'enable_ipv6' does not match any of the regexes: '^x-'
networks.worker.ipam.config value Additional properties are not allowed ('gateway' was unexpected)
[错误] 极光面板安装失败!
有使用命令打开IPV6
ip6tables -t nat -A POSTROUTING -s fd00:ea23:9c80:4a54:e242:5f97::/96 -j MASQUERADE
Docker 版本
docker version
Client: Docker Engine - Community
Version: 20.10.17
API version: 1.41
Go version: go1.17.11
Git commit: 100c701
Built: Mon Jun 6 23:03:17 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.17
API version: 1.41 (minimum version 1.12)
Go version: go1.17.11
Git commit: a89b842
Built: Mon Jun 6 23:01:23 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.6
GitCommit: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
runc:
Version: 1.1.2
GitCommit: v1.1.2-0-ga916309
docker-init:
Version: 0.19.0
GitCommit: de40ad0
cat /etc/issue
Debian GNU/Linux 11 \n \l
RT
目前面板的 wstunnel 仅支持转发到服务端自身的端口,即 wstunnel --server wss://0.0.0.0:443 -r 127.0.0.1:22
,希望添加对非 127.0.0.1
远程服务的支持,谢谢。
安装过程 添加管理账号 密码无法输入
建议将文档的 “生成 SSH 密钥” 章节设置为可选选项,否则容易误导初学者进行该步操作增加部署复杂度(直接用密码登陆更方便,适合大多数人),影响部署体验,谢谢。
我添加好中转机,但是不想让它中转 落地机的80端口,可以实现吗
RT,ssr支持应该很容易,vless可以大幅减低cpu占用率
有时间能给用户加个按注册时间或者到期时间排序吗?
这样方便点
作者大大辛苦了
可以加一个探针一样的监测功能嘛,这样方便我观察服务器负载状况
我点击了SSH状态
然后就提示下面的错误了,但转发还能用,有办法解决吗
STDOUT
Identity added: /app/ansible/priv_data_dirs/2/artifacts/c2e89ac3-e52e-47c3-80b3-ce83ca43c02a/ssh_key_data (/app/ansible/priv_data_dirs/2/artifacts/c2e89ac3-e52e-47c3-80b3-ce83ca43c02a/ssh_key_data)
PLAY [Add iptables port forward rule] ******************************************
TASK [setup] *******************************************************************
[WARNING]: Unhandled error in Python interpreter discovery for host
64.64.225.xx: Failed to connect to the host via ssh: Warning: Permanently added
'[64.64.225.xx]:65432' (ECDSA) to the list of known hosts. [email protected]:
Permission denied (publickey,password).
fatal: [64.64.225.xx]: UNREACHABLE! => {"changed": false, "msg": "Data could not be sent to remote host "64.64.225.xx". Make sure this host can be reached over ssh: Warning: Permanently added '[64.64.225.xx]:65432' (ECDSA) to the list of known hosts.\r\[email protected]: Permission denied (publickey,password).\r\n", "unreachable": true}
PLAY RECAP *********************************************************************
64.64.225.xx : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
多个位置的vps有不同的ssh_key,能否单独在面板上设置?使用密码的话有被爆破风险。谢谢大佬
提示如下:
SSH连接失败Data could not be sent to remote host "20.187.xx.xx". Make sure this host can be reached over ssh:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:5
remove with:
ssh-keygen -f "/root/.ssh/known_hosts" -R "[20.187.xx.xx]:61xx"
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
[email protected]: Permission denied (publickey,password).
原因:重装系统后 worker 保存的 host key 跟新的 host key 不匹配。
手动解决方案:删除 worker 的 /root/.ssh/known_hosts
文件的对应 host key。
希望后续更新能加入自动解决方案,谢谢。
啥时候加个
您好
請問有打算支持Haproxy嗎
謝謝
端口同时连接数限制可以有效防止滥用, 感觉非常实用, 可以考虑一下吗 :)
az小鸡翻车后新补的能通过修改原来规则上的ip和密码来实现恢复原有的规则吗
部分中转机器出厂系统不自带 python 和 systemd ,导致部分转发功能失败,建议在每次 ssh 连接到中转机时检测 python 和 systemd 安装是否正常,谢谢。
TASK [sync wstunnel binary] ****************************************************
TASK [wstunnel_sync : Sync wstunnel-template.service] **************************
fatal: [linode-sg]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "checksum": "ea905df8cd32010558020aa1fd700caa8e72024c", "msg": "Destination directory /usr/lib/systemd/system does not exist"}
linode-sg : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
PLAY RECAP *********************************************************************
linode-sg : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
看大佬说明,gost只支持linux x86,但是gost有64的包,想知道问题出在哪里
请问V2RAY 转发怎么设置呢?
Network aurora_worker Error 0.0s
failed to create network aurora_worker: Error response from daemon: failed to allocate gateway (fd00:ea23:9c80:4a54:e242:5f97::0): Address already in use
[错误] 极光面板安装失败!
可否添加一个流量统计的功能,可以记录每个端口每个服务器通过中转的流量。(貌似可以用vnstat?)
密码忘记还能找回吗?
非常感谢作者提供的管理面板,该面板功能强大,希望能越做越好。现有如下需求不知可否满足,欢迎讨论。
场景描述:
因为网络或其他因素,有时代理服务器无法访问,需要能代理验证是否可用,以及若不可用则发出通知
功能描述:
1.代理验证
可以配置验证频率,验证地址,返回值,超时时间等参数
2.代理验证结果展示
提供验证结果展示页面,该页面包含,验证成功/失败次数,平均响应速度,全部验证代理的结果集汇总
3.通知预警
可配置邮件、或webhook类通知方式,关联代理验证结果
部分中转机器出厂系统不自带 iptables 导致流量监控和限速功能失效,建议在每次 ssh 连接到中转机时检测 iptables 安装是否正常,如果不存在 iptables 则自动安装,保证流量监控和限速功能能正常运行,谢谢。
有api方便操作啊
这个极光面板对主机配置有什么要求 最低需要多大
ERROR: The Compose file './docker-compose.yml' is invalid because:
networks.worker value 'enable_ipv6' does not match any of the regexes: '^x-'
networks.worker.ipam.config value Additional properties are not allowed ('gateway' was unexpected)
[错误] 极光面板安装失败!
Centos/Debian/Ubuntu 都安裝不了
/etc/docker/daemon.json 開啟 ipv6也不行
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.