Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handshake failed with fatal error SSL_ERROR_SSL: error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED #356

Closed
daanishmahajan opened this issue May 16, 2024 · 4 comments
Labels

Comments

@daanishmahajan
Copy link

Hi @Adoni5,

I am facing the above mentioned error while running readfish in MacOS with apple silicon. Also I am connecting via wifi using my mobile hotspot.
I have verified the readfish toml file and PyBasecallClient connection using:

python -c 'from pybasecall_client_lib.pyclient import PyBasecallClient as PGC; c = PGC("ipc:///tmp/.guppy/5555", "dna_r10.4.1_e8.2_400bps_fast.cfg"); c.connect(); print(c)'

Also I have implemented the steps for Apple silicon chip mentioned here:
https://github.com/LooseLab/readfish?tab=readme-ov-file#apple-silicon

Other important files and commands:

  1. readfish toml file:
[caller_settings.dorado]
config = "dna_r10.4.1_e8.2_400bps_fast.cfg"
address = "ipc:///tmp/.guppy/5555"

[mapper_settings.mappy_rs]
fn_idx_in = "/Users/daanishmahajan/Projects/AdaptiveSampling/Icarust/experiments/data/readfish_simulation/data/reduced_ref.mmi"

[[regions]]
name = "Human_sub Enrichment"
control = false
min_chunks = 1
max_chunks = 6
targets = ["chr21_MATERNAL", "chr22_PATERNAL"]
single_on = "stop_receiving"
multi_on = "stop_receiving"
single_off = "unblock"
multi_off = "unblock"
no_seq = "proceed"
no_map = "proceed"
  1. Icarust toml file
output_path = "/Users/daanishmahajan/Projects/AdaptiveSampling/Icarust/experiments/data/readfish_simulation/output"
random_seed = 10
target_yield = 100000000000
working_pore_percent = 85
pore_type = "R10"

[parameters]
sample_name = "human_sub_enrichment"
experiment_name = "readfish_simulation"
flowcell_name = "FAQ1234"
experiment_duration_set = 7200
device_id = "Bantersaurus"
position = "FenceSitter"
break_read_ms = 400

[[sample]]
name = "HG002_sub"
input_genome = "/Users/daanishmahajan/Projects/AdaptiveSampling/Icarust/experiments/data/readfish_simulation/data/reduced_21_22.fasta"
mean_read_length = 15000
weight = 1
  1. config.ini
[TLS]
cert-dir = ./static/tls_certs
; cert-dir = /opt/ont/minknow/conf/rpc-certs
[PORTS]
manager = 10000
position = 10001

[SEQUENCER]
channels = 3000
  1. Dorado command
/Users/daanishmahajan/Projects/AdaptiveSampling/Icarust/dorado/ont-dorado-server/bin/dorado_basecall_server \
--log_path /Users/daanishmahajan/Projects/AdaptiveSampling/Icarust/dorado/dorado/log \
--config /Users/daanishmahajan/Projects/AdaptiveSampling/Icarust/dorado/ont-dorado-server/data/dna_r10.4.1_e8.2_400bps_fast.cfg \
--ipc_threads 3 \
--port /tmp/.guppy/5555 \
--dorado_download_path /Users/daanishmahajan/Projects/AdaptiveSampling/Icarust/dorado/dorado/models
  1. Readfish command
sudo /opt/anaconda3/envs/readfish/bin/readfish targets --device Bantersaurus \
--experiment-name test_connect \
--log-level info \
--toml /Users/daanishmahajan/Projects/AdaptiveSampling/Icarust/Profile_tomls/readfish.toml \
--port 10000 \
--chunk-log /Users/daanishmahajan/Projects/AdaptiveSampling/Icarust/experiments/data/readfish_simulation/log/control_icarust_R10_chunks.tsv
  1. Icarust command
cargo run -r -- -s Profile_tomls/test.toml -v 
  1. Full error log
E0516 11:07:55.535760000 7950916672 ssl_transport_security.cc:1653]    Handshake failed with fatal error SSL_ERROR_SSL: error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED.
E0516 11:07:55.540749000 7950916672 ssl_transport_security.cc:1653]    Handshake failed with fatal error SSL_ERROR_SSL: error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED.
Traceback (most recent call last):
  File "/opt/anaconda3/envs/readfish/bin/readfish", line 8, in <module>
    sys.exit(main())
  File "/opt/anaconda3/envs/readfish/lib/python3.10/site-packages/readfish/_cli_base.py", line 61, in main
    raise SystemExit(args.func(parser, args, extras))
  File "/opt/anaconda3/envs/readfish/lib/python3.10/site-packages/readfish/entry_points/targets.py", line 587, in run
    minknow_version = _get_minknow_version(host=args.host, port=args.port)
  File "/opt/anaconda3/envs/readfish/lib/python3.10/site-packages/readfish/_compatibility.py", line 58, in _get_minknow_version
    manager = Manager(host=host, port=port)
  File "/opt/anaconda3/envs/readfish/lib/python3.10/site-packages/minknow_api/manager.py", line 355, in __init__
    version_info = self.rpc.get_version_info()
  File "/opt/anaconda3/envs/readfish/lib/python3.10/site-packages/minknow_api/manager_service.py", line 476, in get_version_info
    return run_with_retry(self._stub.get_version_info,
  File "/opt/anaconda3/envs/readfish/lib/python3.10/site-packages/minknow_api/manager_service.py", line 99, in run_with_retry
    result = MessageWrapper(method(message, timeout=timeout), unwraps=unwraps)
  File "/opt/anaconda3/envs/readfish/lib/python3.10/site-packages/grpc/_channel.py", line 1181, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/opt/anaconda3/envs/readfish/lib/python3.10/site-packages/grpc/_channel.py", line 1006, in _end_unary_response_blocking
    raise _InactiveRpcError(state)  # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:10000: Ssl handshake failed: SSL_ERROR_SSL: error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED"
        debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2024-05-16T11:07:55.540956+05:30", grpc_status:14, grpc_message:"failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:10000: Ssl handshake failed: SSL_ERROR_SSL: error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED"}"
Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@Adoni5
Copy link
Contributor

Adoni5 commented May 22, 2024

HI @daanishmahajan,

Sorry for the slow reply, I've been busy writing up!

I'm not 100% certain that our TLS certificates will allow remote connections. Can I check that you have run the steps for exporting the certificates listed here?

export MINKNOW_TRUSTED_CA="/Path/to/icarust/static/tls_certs/ca.crt"
readfish --blah

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jun 22, 2024
Copy link

This issue was closed because there has been no response for 5 days after becoming stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants