skovaka / UNCALLED

Raw nanopore signal mapper that enables real-time targeted sequencing
MIT License
520 stars 44 forks source link

uncalled failed to connect to minknow instance #44

Closed ccr25 closed 2 years ago

ccr25 commented 2 years ago

Hi,

I have been running uncalled successfully for the past several months on Ubuntu 20.04. After a round of updates, I now get the following error message:

uncalled realtime reference_genomes/Ames/genome.fasta -t 10 --enrich --full -c 3 | tee test.paf [15:23:21 - ReadUntil] Creating many chunk client with ReadCache data queue filtering to strand2, strand1, and strand read chunks. [15:23:21 - ReadUntil] Using pre-defined read classification map. [15:23:21 - ReadUntil] Creating rpc connection on port 8000. [15:23:21 - minknow_api] Error received from rpc [15:23:21 - minknow_api] Failed to connect to minknow instance (retry 1/5): failed to connect to all addresses [15:23:22 - minknow_api] Error received from rpc [15:23:22 - minknow_api] Failed to connect to minknow instance (retry 2/5): failed to connect to all addresses [15:23:24 - minknow_api] Error received from rpc [15:23:24 - minknow_api] Failed to connect to minknow instance (retry 3/5): failed to connect to all addresses [15:23:26 - minknow_api] Error received from rpc [15:23:26 - minknow_api] Failed to connect to minknow instance (retry 4/5): failed to connect to all addresses [15:23:29 - minknow_api] Error received from rpc [15:23:29 - minknow_api] Failed to connect to minknow instance (retry 5/5): failed to connect to all addresses Traceback (most recent call last): File "/home/jason/.local/lib/python3.8/site-packages/uncalled-2.2-py3.8-linux-x86_64.egg/EGG-INFO/scripts/uncalled", line 195, in realtime_cmd client = unc.minknow_client.Client(conf.host, conf.port, conf.chunk_time, conf.num_channels) File "/home/jason/.local/lib/python3.8/site-packages/uncalled-2.2-py3.8-linux-x86_64.egg/uncalled/minknow_client.py", line 43, in init read_until.ReadUntilClient.init( File "/home/jason/anaconda3/envs/pima/lib/python3.8/site-packages/read_until/base.py", line 255, in init self.connection = minknow_api.Connection(host=self.mk_host, port=self.grpc_port) File "/home/jason/anaconda3/envs/pima/lib/python3.8/site-packages/minknow_api/init.py", line 327, in init raise error File "/home/jason/anaconda3/envs/pima/lib/python3.8/site-packages/minknow_api/init.py", line 299, in init self.instance.get_version_info() File "/home/jason/anaconda3/envs/pima/lib/python3.8/site-packages/minknow_api/instance_service.py", line 93, in get_version_info return run_with_retry(self._stub.get_version_info, File "/home/jason/anaconda3/envs/pima/lib/python3.8/site-packages/minknow_api/instance_service.py", line 37, in run_with_retry result = MessageWrapper(method(message, timeout=timeout), unwraps=unwraps) File "/home/jason/anaconda3/envs/pima/lib/python3.8/site-packages/grpc/_channel.py", line 946, in call return _end_unary_response_blocking(state, call, False, None) File "/home/jason/anaconda3/envs/pima/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.UNAVAILABLE details = "failed to connect to all addresses" debug_error_string = "{"created":"@1652912609.827260489","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3008,"referenced_errors":[{"created":"@1652912609.827259173","description":"failed to connect to all addresses","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":397,"grpc_status":14}]}"

Is this an uncalled problem or a minknow problem? Thanks,

Chandler

skovaka commented 2 years ago

Sorry for the issue, I haven't tested the minknow connection recently so I'm not sure what's wrong. You could try changing the --port option, but not sure to what. Unfortunately I'm currently on vacation, and probably won't be able to look into this until June. I'll let you know if I get a chance before then.

skovaka commented 2 years ago

Sorry for the delay, but I think I've figured out the problem! It looks like you need to update the "minknow-api" python package to version >= 5. I just added that dependency to setup.py, but you could also clone and install from here: https://github.com/nanoporetech/minknow_api.

It's also possible you'll get that error if you've had multiple MinIONs plugged in, which could change the port number. If that's the case you can look for the correct port in MinKNOW log files, which on Ubuntu are located at /var/log/minknow/mk_manager_svc_log-*.txt. If you look in the most recent of those log files for the line labeled "grpc_secure_port" above the MinION of interest, you'll find the correct port which you can specify with the --port option. Sorry that's a bit hacky, I used to have a script to find that information but the log file format changed.

ccr25 commented 2 years ago

Yep, that did it! Thanks!