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

Unable to connect to ChaosHub using LitmusPortal #2804

Open
jnsrikanth opened this issue May 14, 2021 · 18 comments
Open

Unable to connect to ChaosHub using LitmusPortal #2804

jnsrikanth opened this issue May 14, 2021 · 18 comments

Comments

@jnsrikanth
Copy link

What happened:
Unable to connect to the ChaosHub URI from the Litmus Portal after having forked the github chaos-charts repository to my private github user account and have provided my Github Access Token in the LitmusPortal.

What you expected to happen:
Expected to connect to the ChaosHub to explore and launch ChaosExperiments from the Workflow Engine in the LitmusPortal.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

@jnsrikanth
Copy link
Author

litmus-portal-error-2

@imrajdas
Copy link
Member

imrajdas commented May 14, 2021

Hi @jnsrikanth , Can you send the git URL that you trying to add?

@amityt
Copy link
Contributor

amityt commented May 14, 2021

Hi @jnsrikanth , thanks for trying out the Litmus Portal. Can you share the portal version and the git url as mentioned by @rajdas98 .

@jnsrikanth
Copy link
Author

jnsrikanth commented May 14, 2021

Hi, Thanks for the quick response. The Git URL I am using to connect is https://github.com/jnsrikanth/chaos-charts and the portal version I am using is: 2.0.0-Beta5

@jnsrikanth
Copy link
Author

Hi, Any updates on this issue? Please let me know. Thanks.

@amityt
Copy link
Contributor

amityt commented May 15, 2021

Hi @jnsrikanth , I was able to connect a hub with the above git url. Can you check if there is some network issue while connecting the hub. @rajdas98 Can it be related to pod permissions?

@jnsrikanth
Copy link
Author

Hi @amityt I am still unable to connect to the URL above from my Litmus Portal 2.0.0-Beta5 - I am still getting the same error. I am not facing any network issue when I tried doing a "git clone" of the above URL in my AKS cluster. Can you provide any further insights?
Also earlier, when we installed a Litmus Portal, a default ChaosHub used to be pre-packaged with the Litmus Portal. Now we do not have that?
Are we missing any other installation steps? Please let us know.
Can you help us understand better about the pod permissions? We are using an AKS Cluster and not applying any RBAC for this namespace (litmus)?

@amityt
Copy link
Contributor

amityt commented May 31, 2021

Hi @jnsrikanth, the default ChaosHub is still available with litmus-portal. If possible, can you share the pod logs of litmus-portal server?
You can do kubectl logs <litmus-portal-server-pod-name> -n litmus -c graphql-server

@imrajdas
Copy link
Member

Hi @jnsrikanth, If you're using the azure repository then it might not work because we're using the go-git utility to do the git operations and it doesn't support the azure repository.
Issue- go-git/go-git#64

@jnsrikanth
Copy link
Author

Hi @rajdas98 , please find below the logs from the litmus-portal-server on the AKS cluster.

2021/05/31 12:55:48 Connected To MONGODB
2021/05/31 12:55:49 Go Version: go1.14.15
2021/05/31 12:55:49 Go OS/Arch: linux/amd64
time="2021-05-31T12:55:49Z" level=info msg="Running GitOps DB Sync..."
time="2021-05-31T12:55:49Z" level=info msg="Updating : []"
time="2021-05-31T12:55:49Z" level=info msg="GitOps DB Sync Complete"
2021/05/31 12:55:49 connect to http://localhost:8080/ for GraphQL playground
time="2021-05-31T12:55:49Z" level=info msg="Running GitOps DB Sync..."
time="2021-05-31T12:55:49Z" level=info msg="Updating : []"
time="2021-05-31T12:55:49Z" level=info msg="GitOps DB Sync Complete"
2021/05/31 12:56:25 Error getting project with query :[{members [{$elemMatch [{user_id 773e0aae-7c5b-478a-a110-9f2154b20e00} {role [{$in [Owner Editor Viewer]}]} {invitation Accepted}]}]} {_id 9d
c4349d-25fa-49a7-9792-8b2626202ae7}]
2021/05/31 12:56:26 USER JWT ERROR: token contains an invalid number of segments
2021/05/31 12:56:26 USER JWT ERROR: token contains an invalid number of segments
time="2021-05-31T12:57:49Z" level=info msg="Running GitOps DB Sync..."
time="2021-05-31T12:57:49Z" level=info msg="Updating : []"
time="2021-05-31T12:57:49Z" level=info msg="GitOps DB Sync Complete"
2021/05/31 12:57:49 Error getting project with query :[{members [{$elemMatch [{user_id 773e0aae-7c5b-478a-a110-9f2154b20e00} {role [{$in [Owner Editor Viewer]}]} {invitation Accepted}]}]} {_id 9d
c4349d-25fa-49a7-9792-8b2626202ae7}]
2021/05/31 12:57:53 Error getting project with query :[{members [{$elemMatch [{user_id 773e0aae-7c5b-478a-a110-9f2154b20e00} {role [{$in [Owner Editor Viewer]}]} {invitation Accepted}]}]} {_id 9d
c4349d-25fa-49a7-9792-8b2626202ae7}]
2021/05/31 12:57:53 NEW WORKFLOW EVENT LISTENER: 9dc4349d-25fa-49a7-9792-8b2626202ae7
2021/05/31 12:57:53 NEW WORKFLOW EVENT LISTENER: 9dc4349d-25fa-49a7-9792-8b2626202ae7
2021/05/31 12:57:55 CLOSED WORKFLOW LISTENER: 9dc4349d-25fa-49a7-9792-8b2626202ae7
2021/05/31 12:57:55 CLOSED WORKFLOW LISTENER: 9dc4349d-25fa-49a7-9792-8b2626202ae7
2021/05/31 12:57:55 Error getting project with query :[{members [{$elemMatch [{user_id 773e0aae-7c5b-478a-a110-9f2154b20e00} {role [{$in [Owner Editor Viewer]}]} {invitation Accepted}]}]} {_id 9d
c4349d-25fa-49a7-9792-8b2626202ae7}]
2021/05/31 12:58:09 Error getting project with query :[{members [{$elemMatch [{user_id 773e0aae-7c5b-478a-a110-9f2154b20e00} {role [{$in [Owner Editor Viewer]}]} {invitation Accepted}]}]} {_id 9d
c4349d-25fa-49a7-9792-8b2626202ae7}]
2021/05/31 12:58:12 Error getting project with query :[{members [{$elemMatch [{user_id 773e0aae-7c5b-478a-a110-9f2154b20e00} {role [{$in [Owner Editor Viewer]}]} {invitation Accepted}]}]} {_id 9d
c4349d-25fa-49a7-9792-8b2626202ae7}]
time="2021-05-31T12:59:49Z" level=info msg="Running GitOps DB Sync..."
time="2021-05-31T12:59:49Z" level=info msg="Updating : []"
time="2021-05-31T12:59:49Z" level=info msg="GitOps DB Sync Complete"
2021/05/31 13:00:23 USER JWT ERROR: token contains an invalid number of segments
2021/05/31 13:00:23 USER JWT ERROR: token contains an invalid number of segments
2021/05/31 13:00:36 Error getting project with query :[{members [{$elemMatch [{user_id 0e6771ff-d8b5-4d5f-847a-9d30f3290ea3} {role [{$in [Owner Editor Viewer]}]} {invitation Accepted}]}]} {_id }]
2021/05/31 13:00:56 Error getting user with username: admin error: mongo: no documents in result
2021/05/31 13:00:56 Error getting user with username: admin error: mongo: no documents in result
2021/05/31 13:00:56 Cloning https://github.com/litmuschaos/chaos-charts
2021/05/31 13:00:56 Starting self deployer
2021/05/31 13:00:56 NEW CLUSTER REGISTERED : ID-132cf837-6ad1-483f-bd50-385218101eaf PID-dee582ca-83eb-4c27-97eb-a41e11ce18b1
2021/05/31 13:00:56 Server endpoint: http://obs-monitoring-az.crd.com/backend/query
2021/05/31 13:00:56 Already exists
2021/05/31 13:00:57 Resource successfully created
2021/05/31 13:00:57 Already exists
2021/05/31 13:00:57 Error getting project with query :[{members [{$elemMatch [{user_id 0e6771ff-d8b5-4d5f-847a-9d30f3290ea3} {role [{$in [Owner Editor Viewer]}]} {invitation Accepted}]}]} {_id }]
2021/05/31 13:00:57 Already exists
2021/05/31 13:00:57 Already exists

@jnsrikanth
Copy link
Author

Here is the follow-up set of logs from the same log file. I did not want to dump all the logs in one message, hence.

time="2021-05-31T13:07:49Z" level=info msg="Updating : []"
time="2021-05-31T13:07:49Z" level=info msg="GitOps DB Sync Complete"
time="2021-05-31T13:09:49Z" level=info msg="Running GitOps DB Sync..."
time="2021-05-31T13:09:49Z" level=info msg="Updating : []"
time="2021-05-31T13:09:49Z" level=info msg="GitOps DB Sync Complete"
time="2021-05-31T13:11:49Z" level=info msg="Running GitOps DB Sync..."
time="2021-05-31T13:11:49Z" level=info msg="Updating : []"
time="2021-05-31T13:11:49Z" level=info msg="GitOps DB Sync Complete"
time="2021-05-31T13:13:49Z" level=info msg="Running GitOps DB Sync..."
time="2021-05-31T13:13:49Z" level=info msg="Updating : []"
time="2021-05-31T13:13:49Z" level=info msg="GitOps DB Sync Complete"
Error in cloningError in cloningFile reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/MyHub/charts/: no such file or directory
time="2021-05-31T13:14:01Z" level=info msg="Executed isRepositoryExists()... " repositoryExists=false
time="2021-05-31T13:14:01Z" level=error msg="Get "https://github.com/jnsrikanth/chaos-charts.git/info/refs?service=git-upload-pack\": EOF"
Error in cloningFile reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/MyHub/charts/: no such file or directory
time="2021-05-31T13:14:11Z" level=info msg="Executed isRepositoryExists()... " repositoryExists=false
time="2021-05-31T13:14:11Z" level=error msg="Get "https://github.com/jnsrikanth/chaos-charts.git/info/refs?service=git-upload-pack\": EOF"
Error in cloningFile reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/MyHub/charts/: no such file or directory
Error in cloningFile reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/MyHub/charts/: no such file or directory
File reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/AlphaHub/charts/: no such file or directory
time="2021-05-31T13:15:34Z" level=info msg="Executed isRepositoryExists()... " repositoryExists=false
time="2021-05-31T13:15:34Z" level=error msg="Get "https://github.com/jnsrikanth/chaos-charts.git/info/refs?service=git-upload-pack\": EOF"
Error in cloningFile reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/MyHub/charts/: no such file or directory
File reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/AlphaHub/charts/: no such file or directory
File reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/MyHub/charts/: no such file or directory
File reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/AlphaHub/charts/: no such file or directory
time="2021-05-31T13:15:49Z" level=info msg="Running GitOps DB Sync..."
time="2021-05-31T13:15:49Z" level=info msg="Updating : []"
time="2021-05-31T13:15:49Z" level=info msg="GitOps DB Sync Complete"
2021/05/31 13:17:27 Error getting project with query :[{members [{$elemMatch [{user_id 0e6771ff-d8b5-4d5f-847a-9d30f3290ea3} {role [{$in [Owner Editor Viewer]}]} {invitation Accepted}]}]} {_id }]
2021/05/31 13:17:28 Error getting project with query :[{members [{$elemMatch [{user_id 0e6771ff-d8b5-4d5f-847a-9d30f3290ea3} {role [{$in [Owner Editor Viewer]}]} {invitation Accepted}]}]} {_id }]
2021/05/31 13:17:36 NEW WORKFLOW EVENT LISTENER: dee582ca-83eb-4c27-97eb-a41e11ce18b1
2021/05/31 13:17:36 NEW WORKFLOW EVENT LISTENER: dee582ca-83eb-4c27-97eb-a41e11ce18b1
2021/05/31 13:17:38 CLOSED WORKFLOW LISTENER: dee582ca-83eb-4c27-97eb-a41e11ce18b1
2021/05/31 13:17:38 CLOSED WORKFLOW LISTENER: dee582ca-83eb-4c27-97eb-a41e11ce18b1
File reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/MyHub/charts/: no such file or directory
File reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/AlphaHub/charts/: no such file or directory
time="2021-05-31T13:17:47Z" level=info msg="Executed isRepositoryExists()... " repositoryExists=false
time="2021-05-31T13:17:47Z" level=error msg="Get "https://github.com/jnsrikanth/chaos-charts.git/info/refs?service=git-upload-pack\": EOF"
Error in cloningFile reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/MyHub/charts/: no such file or directory
File reading error open /tmp/version/dee582ca-83eb-4c27-97eb-a41e11ce18b1/AlphaHub/charts/: no such file or directory
time="2021-05-31T13:17:49Z" level=info msg="Running GitOps DB Sync..."
time="2021-05-31T13:17:49Z" level=info msg="Updating : []"
time="2021-05-31T13:17:49Z" level=info msg="GitOps DB Sync Complete"

@amityt
Copy link
Contributor

amityt commented Jun 1, 2021

Thanks @jnsrikanth for sharing the logs.
Can you try the following methods:

  1. Connect a hub with http instead of https in the url?
  2. Try to connect a private chaos-charts repository using ssh-key and ssh url.

@jnsrikanth
Copy link
Author

Hi @amityt - No luck so far. Tried with all the options below:

  1. Public Repository with http and https based URL - Did Not Work
  2. Private Github Repo with http and https - and with both SSH key and Personal Access Token - Did Not Work.
  3. Went for a Public Repo from our Enterprise Github Account that is accessible from our AKS cluster - Did Not Work.
    I am attaching a screenshot for the Option 3 above.

We are running out of ideas. Maybe there is a better and a simpler way to add a ChaosHub? Or is there any access restriction from our end? Not sure at this time.

@jnsrikanth
Copy link
Author

Updating the Image here.
chaoshub

@jnsrikanth
Copy link
Author

@amityt - any further pointers for us ? Does the above error give any insight into it?

@amityt
Copy link
Contributor

amityt commented Jun 8, 2021

Hi @jnsrikanth Can I know if the AKS cluster where you have Litmus Portal is private or not? If possible, can you try to exec into the litmus-portal-server and curl .

@jnsrikanth
Copy link
Author

@amityt yes the AKS cluster is private and I am able to exec into the portal-server, however, the curl command is not available and I am unable to install essential utils in the container. Any further pointers please?

@zot24
Copy link

zot24 commented May 17, 2023

I'm having a similar issue x509 cert... on my end any ideas what could it be? I'm running Litmus locally on the latest version beta7

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

No branches or pull requests

5 participants