Discussion Forum

Migration error in "typedb-data-bio-covid"

Hi:

A total noob here. Trying to learn about typedb through an example(typed-db-bio-covid). I received the following error while migrating data(python migrator.py -n 4):



typedb_migrating_CORD_NER

Thanks,

Hi there!

Thanks for reporting this… I think this is a tricky bug we have to track down in our client. If you re-run the whole operation (delete the database and re-try) does it succeed?

Thanks!

Thank you for the quick response, I tried again(after deleting the database in /opt/:slight_smile:
This is the server-log:


2021-11-04 10:33:59,640 [typedb-service::0] [ERROR] c.v.typedb.core.server.TypeDBService - java.nio.file.NoSuchFileException: /opt/typedb/core/server/data/bio_covid
com.vaticle.typedb.core.common.exception.TypeDBException: java.nio.file.NoSuchFileException: /opt/typedb/core/server/data/bio_covid
at com.vaticle.typedb.core.common.exception.TypeDBException.of(TypeDBException.java:51)
at com.vaticle.typedb.core.rocks.RocksDatabase.delete(RocksDatabase.java:328)
at com.vaticle.typedb.core.server.TypeDBService.databaseDelete(TypeDBService.java:140)
at com.vaticle.typedb.protocol.TypeDBGrpc$MethodHandlers.invoke(TypeDBGrpc.java:821)
at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:182)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:331)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:814)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: java.nio.file.NoSuchFileException: /opt/typedb/core/server/data/bio_covid
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:149)
at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
at java.base/java.nio.file.Files.readAttributes(Files.java:1843)
at java.base/java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
at java.base/java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
at java.base/java.nio.file.FileTreeIterator.(FileTreeIterator.java:71)
at java.base/java.nio.file.Files.walk(Files.java:3891)
at java.base/java.nio.file.Files.walk(Files.java:3945)
at com.vaticle.typedb.core.rocks.RocksDatabase.delete(RocksDatabase.java:326)
… 10 common frames omitted
2021-11-04 10:46:21,081 [typedb-scheduled::0] [WARN ] c.v.t.core.server.SessionService - Session with ID 92405a06-60d8-449c-9004-d86db2e04aab timed out due to inactivity


and this is from my terminal:



Migrate ‘Subject_CORD_NER.csv’
Sending API call to fetch articles Metadata
--------Loading journals---------
Process Process-2:
Process Process-3:
Traceback (most recent call last):
Traceback (most recent call last):
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/common/rpc/stub.py”, line 41, in resilient_call
return function()
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/common/rpc/stub.py”, line 41, in resilient_call
return function()
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/common/rpc/stub.py”, line 67, in
return resilient_call(lambda: self._stub.session_open(req))
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/common/rpc/stub.py”, line 67, in
return resilient_call(lambda: self._stub.session_open(req))
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/grpc/_channel.py”, line 946, in call
return _end_unary_response_blocking(state, call, False, None)
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/grpc/_channel.py”, line 946, in call
return _end_unary_response_blocking(state, call, False, None)
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/grpc/_channel.py”, line 849, in _end_unary_response_blocking
raise _InactiveRpcError(state)
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/grpc/_channel.py”, line 849, in _end_unary_response_blocking
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INTERNAL
details = “Received RST_STREAM with error code 5”
debug_error_string = “{“created”:”@1635997555.064032930",“description”:“Error received from peer ipv6:[::1]:1729”,“file”:“src/core/lib/surface/call.cc”,“file_line”:1066,“grpc_message”:“Received RST_STREAM with error code 5”,“grpc_status”:13}"

grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INTERNAL
details = “Received RST_STREAM with error code 5”
debug_error_string = “{“created”:”@1635997555.063982175",“description”:“Error received from peer ipv6:[::1]:1729”,“file”:“src/core/lib/surface/call.cc”,“file_line”:1066,“grpc_message”:“Received RST_STREAM with error code 5”,“grpc_status”:13}"

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/lib/python3.8/multiprocessing/process.py”, line 315, in _bootstrap
self.run()
File “/usr/lib/python3.8/multiprocessing/process.py”, line 315, in _bootstrap
self.run()
File “/usr/lib/python3.8/multiprocessing/process.py”, line 108, in run
self._target(*self._args, **self._kwargs)
File “/usr/lib/python3.8/multiprocessing/process.py”, line 108, in run
self._target(*self._args, **self._kwargs)
File “/home/bancherd/typedb-data-bio-covid/Migrators/SemMed/semmed_migrator.py”, line 88, in migrate_journals
with client.session(database, SessionType.DATA) as session:
File “/home/bancherd/typedb-data-bio-covid/Migrators/SemMed/semmed_migrator.py”, line 88, in migrate_journals
with client.session(database, SessionType.DATA) as session:
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/connection/client.py”, line 51, in session
session = _TypeDBSessionImpl(self, database, session_type, options)
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/connection/client.py”, line 51, in session
session = _TypeDBSessionImpl(self, database, session_type, options)
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/connection/session.py”, line 59, in init
res = self._stub().session_open(session_open_req(database, session_type.proto(), options.proto()))
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/connection/session.py”, line 59, in init
res = self._stub().session_open(session_open_req(database, session_type.proto(), options.proto()))
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/common/rpc/stub.py”, line 67, in session_open
return resilient_call(lambda: self._stub.session_open(req))
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/common/rpc/stub.py”, line 67, in session_open
return resilient_call(lambda: self._stub.session_open(req))
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/common/rpc/stub.py”, line 43, in resilient_call
raise TypeDBClientException.of_rpc(e)
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/common/rpc/stub.py”, line 43, in resilient_call
raise TypeDBClientException.of_rpc(e)
typedb.common.exception.TypeDBClientException: Client Error: Unable to connect to TypeDB server.
typedb.common.exception.TypeDBClientException: Client Error: Unable to connect to TypeDB server.
Exception in thread session_pulse_92405a0660d8449c9004d86db2e04aab:
Traceback (most recent call last):
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/common/rpc/stub.py”, line 41, in resilient_call
return function()
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/common/rpc/stub.py”, line 73, in
return resilient_call(lambda: self._stub.session_pulse(req))
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/grpc/_channel.py”, line 946, in call
return _end_unary_response_blocking(state, call, False, None)
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/grpc/_channel.py”, line 849, in _end_unary_response_blocking
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INTERNAL
details = “Received RST_STREAM with error code 5”
debug_error_string = “{“created”:”@1635997556.101934714",“description”:“Error received from peer ipv6:[::1]:1729”,“file”:“src/core/lib/surface/call.cc”,“file_line”:1066,“grpc_message”:“Received RST_STREAM with error code 5”,“grpc_status”:13}"

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/lib/python3.8/threading.py”, line 932, in _bootstrap_inner
self.run()
File “/usr/lib/python3.8/threading.py”, line 870, in run
self._target(*self._args, **self._kwargs)
File “/usr/lib/python3.8/sched.py”, line 151, in run
action(*argument, **kwargs)
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/connection/session.py”, line 131, in _transmit_pulse
alive = self._stub().session_pulse(pulse_req).alive
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/common/rpc/stub.py”, line 73, in session_pulse
return resilient_call(lambda: self._stub.session_pulse(req))
File “/home/bancherd/typedb-data-bio-covid/.venv/lib/python3.8/site-packages/typedb/common/rpc/stub.py”, line 43, in resilient_call
raise TypeDBClientException.of_rpc(e)
typedb.common.exception.TypeDBClientException: Client Error: Unable to connect to TypeDB server.


Thank you.