acoustic-van-30942
02/04/2023, 2:23 AMacoustic-van-30942
02/04/2023, 2:23 AMDEBUG:asyncio:Using selector: EpollSelector
/root/services/ui_backend_service/ui_server.py:50: DeprecationWarning: loop argument is deprecated
_app = web.Application(loop=loop)
/root/services/ui_backend_service/ui_server.py:51: DeprecationWarning: loop argument is deprecated
app = web.Application(loop=loop) if len(PATH_PREFIX) > 0 else _app
ERROR:root:Encountered an exception: [Errno 2] No such file or directory
ERROR:AsyncPostgresDB:ui:Exception occurred
Traceback (most recent call last):
File "/root/services/data/postgres_async_db.py", line 83, in _init
echo=AIOPG_ECHO)
File "/opt/latest/lib/python3.7/site-packages/aiopg/pool.py", line 300, in from_pool_fill
await self._fill_free_pool(False)
File "/opt/latest/lib/python3.7/site-packages/aiopg/pool.py", line 343, in _fill_free_pool
**self._conn_kwargs,
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 1225, in _connect
await self._poll(self._waiter, self._timeout) # type: ignore
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 884, in _poll
raise exc
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 881, in _poll
await asyncio.wait_for(self._waiter, timeout)
File "/usr/lib/python3.7/asyncio/tasks.py", line 423, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
ERROR:root:Encountered an exception: [Errno 2] No such file or directory
ERROR:AsyncPostgresDB:ui:Exception occurred
Traceback (most recent call last):
File "/root/services/data/postgres_async_db.py", line 83, in _init
echo=AIOPG_ECHO)
File "/opt/latest/lib/python3.7/site-packages/aiopg/pool.py", line 300, in from_pool_fill
await self._fill_free_pool(False)
File "/opt/latest/lib/python3.7/site-packages/aiopg/pool.py", line 343, in _fill_free_pool
**self._conn_kwargs,
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 1225, in _connect
await self._poll(self._waiter, self._timeout) # type: ignore
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 884, in _poll
raise exc
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 881, in _poll
await asyncio.wait_for(self._waiter, timeout)
File "/usr/lib/python3.7/asyncio/tasks.py", line 423, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
ERROR:root:Encountered an exception: [Errno 2] No such file or directory
ERROR:AsyncPostgresDB:ui:Exception occurred
Traceback (most recent call last):
File "/root/services/data/postgres_async_db.py", line 83, in _init
echo=AIOPG_ECHO)
File "/opt/latest/lib/python3.7/site-packages/aiopg/pool.py", line 300, in from_pool_fill
await self._fill_free_pool(False)
File "/opt/latest/lib/python3.7/site-packages/aiopg/pool.py", line 343, in _fill_free_pool
**self._conn_kwargs,
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 1225, in _connect
await self._poll(self._waiter, self._timeout) # type: ignore
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 884, in _poll
raise exc
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 881, in _poll
await asyncio.wait_for(self._waiter, timeout)
File "/usr/lib/python3.7/asyncio/tasks.py", line 423, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/root/services/ui_backend_service/ui_server.py", line 152, in <module>
main()
File "/root/services/ui_backend_service/ui_server.py", line 129, in main
the_app = app(loop, DBConfiguration())
File "/root/services/ui_backend_service/ui_server.py", line 54, in app
loop.run_until_complete(async_db._init(db_conf=db_conf, create_triggers=DB_TRIGGER_CREATE))
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/root/services/data/postgres_async_db.py", line 98, in _init
raise e
File "/root/services/data/postgres_async_db.py", line 83, in _init
echo=AIOPG_ECHO)
File "/opt/latest/lib/python3.7/site-packages/aiopg/pool.py", line 300, in from_pool_fill
await self._fill_free_pool(False)
File "/opt/latest/lib/python3.7/site-packages/aiopg/pool.py", line 343, in _fill_free_pool
**self._conn_kwargs,
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 1225, in _connect
await self._poll(self._waiter, self._timeout) # type: ignore
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 884, in _poll
raise exc
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 881, in _poll
await asyncio.wait_for(self._waiter, timeout)
File "/usr/lib/python3.7/asyncio/tasks.py", line 423, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutErroracoustic-van-30942
02/04/2023, 2:26 AM2
connecting
booting...
[Errno 111] Connection refused
1
connecting
booting...
[Errno 111] Connection refused
ran out of retries to get migration version, exiting
Failed to get env versionaverage-beach-28850
02/04/2023, 2:43 AMaverage-beach-28850
02/04/2023, 2:51 AMacoustic-van-30942
02/04/2023, 2:54 AM"outerbounds/metaflow/aws". I refactored some of the code to meet our own custom security requirements.average-beach-28850
02/04/2023, 2:58 AMacoustic-van-30942
02/04/2023, 3:00 AMacoustic-van-30942
02/04/2023, 6:22 AM[root@ip-10-91-115-53 ~]# telnet <http://metaflow-metaflow-ampsdemo.cc1tsv3ywqpu.us-west-2.rds.amazonaws.com|metaflow-metaflow-ampsdemo.cc1tsv3ywqpu.us-west-2.rds.amazonaws.com> 5432
Trying 10.91.115.82...
Connected to metaflow-metaflow-ampsdemo.cc1tsv3ywqpu.us-west-2.rds.amazonaws.com.
Could it be the python handler within the ecs container?average-beach-28850
02/04/2023, 7:10 AMacoustic-van-30942
02/04/2023, 7:16 AMnetflixoss/metaflow_metadata_service inside the test ec2 instance we created that is inside the same subnet & using the same security group as the RDS instance. Then we ran the docker container, as follows:
docker pull netflixoss/metaflow_metadata_service
docker run -e MF_METADATA_DB_HOST='<instance_name>.<http://us-east-1.rds.amazonaws.com|us-east-1.rds.amazonaws.com>' \
-e MF_METADATA_DB_PORT=5432 \
-e MF_METADATA_DB_USER='metaflow' \
-e MF_METADATA_DB_PSWD='BLAHBLAHBLAH' \
-e MF_METADATA_DB_NAME='metaflow' \
-it -p 8082:8082 -p 8080:8080 metaflow_metadata_service
We were able to recreate the same error, unfortunately:
5
connecting
booting...
[Errno 111] Connection refused
/root/services/migration_service/migration_server.py:16: DeprecationWarning: loop argument is deprecated
app = web.Application(loop=loop)
ERROR:asyncio:Exception in callback Connection._ready(<weakref at 0...x7f70c88ac198>) at /opt/latest/lib/python3.7/site-packages/aiopg/connection.py:779
handle: <Handle Connection._ready(<weakref at 0...x7f70c88ac198>) at /opt/latest/lib/python3.7/site-packages/aiopg/connection.py:779>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 838, in _ready
self._fileno, self._ready, weak_self # type: ignore
File "/usr/lib/python3.7/asyncio/selector_events.py", line 334, in add_writer
return self._add_writer(fd, callback, *args)
File "/usr/lib/python3.7/asyncio/selector_events.py", line 294, in _add_writer
(reader, handle))
File "/usr/lib/python3.7/selectors.py", line 389, in modify
self._selector.modify(key.fd, selector_events)
FileNotFoundError: [Errno 2] No such file or directory
4
connecting
booting...
[Errno 111] Connection refused
3
connecting
booting...
[Errno 111] Connection refused
2
connecting
booting...
[Errno 111] Connection refused
1
connecting
booting...
[Errno 111] Connection refused
ran out of retries to get migration version, exiting
Failed to get env versionacoustic-van-30942
02/04/2023, 7:24 AMaverage-beach-28850
02/04/2023, 4:11 PMacoustic-van-30942
02/05/2023, 6:31 AMacoustic-van-30942
02/05/2023, 8:08 AMpsql.
Unfortunately, I am getting this new error though.
DEBUG:asyncio:Using selector: EpollSelector
/root/services/ui_backend_service/ui_server.py:50: DeprecationWarning: loop argument is deprecated
_app = web.Application(loop=loop)
/root/services/ui_backend_service/ui_server.py:51: DeprecationWarning: loop argument is deprecated
app = web.Application(loop=loop) if len(PATH_PREFIX) > 0 else _app
INFO:AsyncPostgresDB:ui:Setting up notify trigger for flows_v3
Keys: ['flow_id']
ERROR:AsyncPostgresDB:ui:Exception occurred
Traceback (most recent call last):
File "/root/services/data/postgres_async_db.py", line 86, in _init
await table._init(create_triggers=create_triggers)
File "/root/services/data/postgres_async_db.py", line 163, in _init
await PostgresUtils.setup_trigger_notify(db=self.db, table_name=self.table_name, keys=self.trigger_keys)
File "/root/services/data/postgres_async_db.py", line 462, in setup_trigger_notify
commands=_commands
File "/root/services/data/postgres_async_db.py", line 394, in create_trigger_if_missing
await cur.execute(command)
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 426, in execute
await self._conn._poll(waiter, timeout)
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 881, in _poll
await asyncio.wait_for(self._waiter, timeout)
File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 788, in _ready
state = self._conn.poll()
psycopg2.errors.UndefinedTable: relation "public.flows_v3" does not exist
10.91.115.86 - - [05/Feb/2023:07:40:33 +0000] "GET / HTTP/1.1" 200 1194 "-" "ELB-HealthChecker/2.0" "-"
/opt/latest/lib/python3.7/site-packages/aiopg/pool.py:479: ResourceWarning: Unclosed 1 connections in <aiopg.pool.Pool object at 0x7f4e348a8198>
f"Unclosed {left} connections in {self!r}", ResourceWarning
INFO:AsyncPostgresDB:ui:Setting up notify trigger for flows_v3
Keys: ['flow_id']
ERROR:AsyncPostgresDB:ui:Exception occurred
Traceback (most recent call last):
File "/root/services/data/postgres_async_db.py", line 86, in _init
await table._init(create_triggers=create_triggers)
File "/root/services/data/postgres_async_db.py", line 163, in _init
await PostgresUtils.setup_trigger_notify(db=self.db, table_name=self.table_name, keys=self.trigger_keys)
File "/root/services/data/postgres_async_db.py", line 462, in setup_trigger_notify
commands=_commands
File "/root/services/data/postgres_async_db.py", line 394, in create_trigger_if_missing
await cur.execute(command)
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 426, in execute
await self._conn._poll(waiter, timeout)
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 881, in _poll
await asyncio.wait_for(self._waiter, timeout)
File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 788, in _ready
state = self._conn.poll()
psycopg2.errors.UndefinedTable: relation "public.flows_v3" does not exist
/opt/latest/lib/python3.7/site-packages/aiopg/pool.py:479: ResourceWarning: Unclosed 1 connections in <aiopg.pool.Pool object at 0x7f4e348a8550>
f"Unclosed {left} connections in {self!r}", ResourceWarning
INFO:AsyncPostgresDB:ui:Setting up notify trigger for flows_v3
Keys: ['flow_id']
ERROR:AsyncPostgresDB:ui:Exception occurred
Traceback (most recent call last):
File "/root/services/data/postgres_async_db.py", line 86, in _init
await table._init(create_triggers=create_triggers)
File "/root/services/data/postgres_async_db.py", line 163, in _init
await PostgresUtils.setup_trigger_notify(db=self.db, table_name=self.table_name, keys=self.trigger_keys)
File "/root/services/data/postgres_async_db.py", line 462, in setup_trigger_notify
commands=_commands
File "/root/services/data/postgres_async_db.py", line 394, in create_trigger_if_missing
await cur.execute(command)
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 426, in execute
await self._conn._poll(waiter, timeout)
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 881, in _poll
await asyncio.wait_for(self._waiter, timeout)
File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 788, in _ready
state = self._conn.poll()
psycopg2.errors.UndefinedTable: relation "public.flows_v3" does not exist
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/root/services/ui_backend_service/ui_server.py", line 152, in <module>
main()
File "/root/services/ui_backend_service/ui_server.py", line 129, in main
the_app = app(loop, DBConfiguration())
File "/root/services/ui_backend_service/ui_server.py", line 54, in app
loop.run_until_complete(async_db._init(db_conf=db_conf, create_triggers=DB_TRIGGER_CREATE))
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/root/services/data/postgres_async_db.py", line 98, in _init
raise e
File "/root/services/data/postgres_async_db.py", line 86, in _init
await table._init(create_triggers=create_triggers)
File "/root/services/data/postgres_async_db.py", line 163, in _init
await PostgresUtils.setup_trigger_notify(db=self.db, table_name=self.table_name, keys=self.trigger_keys)
File "/root/services/data/postgres_async_db.py", line 462, in setup_trigger_notify
commands=_commands
File "/root/services/data/postgres_async_db.py", line 394, in create_trigger_if_missing
await cur.execute(command)
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 426, in execute
await self._conn._poll(waiter, timeout)
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 881, in _poll
await asyncio.wait_for(self._waiter, timeout)
File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/opt/latest/lib/python3.7/site-packages/aiopg/connection.py", line 788, in _ready
state = self._conn.poll()
psycopg2.errors.UndefinedTable: relation "public.flows_v3" does not existaverage-beach-28850
02/05/2023, 4:37 PM\dt in psql), if there is nothing then migrations didn't run at all. If there are some tables it may help to DROP all of them and restart metadata service to create them againacoustic-van-30942
02/06/2023, 1:29 AMconnection refused error.acoustic-van-30942
02/06/2023, 1:32 AMmetadata service container environment variables and all looks consistent. Will now check the tables available.acoustic-van-30942
02/06/2023, 1:39 AMaverage-beach-28850
02/06/2023, 4:13 AMacoustic-van-30942
02/06/2023, 4:21 AMacoustic-van-30942
02/06/2023, 5:17 AM2023/02/06 05:14:50 goose run: pq: no pg_hba.conf entry for host "10.91.115.57", user "metaflow", database "metaflow", SSL off
/root/services/migration_service/migration_server.py:16: DeprecationWarning: loop argument is deprecated
app = web.Application(loop=loop)
/opt/latest/lib/python3.7/site-packages/aiopg/pool.py:479: ResourceWarning: Unclosed 1 connections in <aiopg.pool.Pool object at 0x7fe279f2df98>
f"Unclosed {left} connections in {self!r}", ResourceWarning
/opt/latest/lib/python3.7/site-packages/aiopg/pool.py:479: ResourceWarning: Unclosed 1 connections in <aiopg.pool.Pool object at 0x7fe279eed9e8>
f"Unclosed {left} connections in {self!r}", ResourceWarning
/root/services/migration_service/migration_server.py:26: DeprecationWarning: Application.make_handler(...) is deprecated, use AppRunner API instead
handler = the_app.make_handler()
Running initial migration..
ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File "/opt/latest/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/opt/latest/lib/python3.7/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/root/services/migration_service/api/admin.py", line 53, in version
version = await ApiUtils.get_latest_compatible_version()
File "/root/services/migration_service/api/utils.py", line 62, in get_latest_compatible_version
raise Exception("Failed to run initial migration")
Exception: Failed to run initial migration
INFO:aiohttp.access:127.0.0.1 [06/Feb/2023:05:14:50 +0000] "GET /version HTTP/1.1" 500 244 "-" "python-requests/2.27.1"
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/root/services/migration_service/get_virtual_env.py", line 39, in <module>
r.raise_for_status()
File "/opt/latest/lib/python3.7/site-packages/requests/models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: <http://localhost:8082/version>average-beach-28850
02/06/2023, 3:57 PMacoustic-van-30942
02/06/2023, 5:09 PMaverage-beach-28850
02/07/2023, 3:44 PMacoustic-van-30942
02/07/2023, 5:53 PMaverage-beach-28850
02/07/2023, 6:22 PMacoustic-van-30942
02/07/2023, 6:24 PM