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

Failed to connect to org1-ca.localho.st port 443: Connection refused. #162

Open
rohitshukla11 opened this issue Apr 14, 2023 · 4 comments
Open

Comments

@rohitshukla11
Copy link

What happened?

While running "curl -k https://org1-ca.localho.st:443/cainfo" I am getting "curl: (7) Failed to connect to org1-ca.localho.st port 443: Connection refused" error.

What did you expect to happen?

It should deployed and worked perfect.

How can we reproduce it (as minimally and precisely as possible)?

Run following commands:

kubectl hlf ca create --image=$CA_IMAGE --version=$CA_VERSION --storage-class=standard --capacity=1Gi --name=org1-ca
--enroll-id=enroll --enroll-pw=enrollpw --hosts=org1-ca.localho.st --istio-port=443

kubectl wait --timeout=180s --for=condition=Running fabriccas.hlf.kungfusoftware.es --all

curl -k https://org1-ca.localho.st:443/cainfo

Anything else we need to know?

No response

Kubernetes version

# kubectl get nodes -o wide
@rohitrj22
Copy link
Contributor

Hey @rohitshukla11 , looks like you are following the readme to set up HLF network locally.

If that's the case then, the host you are trying to connect to resolves to ClusterIP of the proxy that you are using (in this case , istio). ClusterIP cannot be accessed locally , hence you are getting the connection refused error. The above curl command works only inside the cluster i.e; you need to run that inside some pod inside the cluster.

@rohitshukla11
Copy link
Author

Hey @rohitrj22 thanks for the response I am running this inside the Google cloud Kubernetes cluster. Can you guide me or provide a resource to set up hyperledger fabric network inside Kubernetes cluster. Thanks

@rohitrj22
Copy link
Contributor

Hey @rohitshukla11 , You need to exec into a pod and execute the curl command as the host resolves to ClusterIP
of the istio proxy.

@McXD
Copy link

McXD commented Aug 29, 2023

You can try this command kubectl run curl --image=appropriate/curl --restart=Never --rm -it -- curl -k https://org1-ca.localho.st:443/cainfo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants