litmuschaos / litmus

Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
https://litmuschaos.io
Apache License 2.0
4.36k stars 686 forks source link

Not able to create environments in Litmus chaos #4594

Closed Devendranathashok closed 4 months ago

Devendranathashok commented 4 months ago

Hello Team, We have created litmus setup in restricted environment and using proxy to connect with github(chaos hub).

while creating the environment it is sending request but we are not getting any response. Log from Litmus server: {"file":"/gql-server/graph/environment.resolvers.go:77","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph.(queryResolver).ListEnvironments","level":"info","msg":"request received to list environments","projectId":"fc47a5b1-036a-466f-b9f9-3fb2e72100e2","time":"2024-04-22T08:48:17Z"} {"file":"/gql-server/graph/environment.resolvers.go:18","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph.(mutationResolver).CreateEnvironment","level":"info","msg":"request received to create new environment","projectId":"fc47a5b1-036a-466f-b9f9-3fb2e72100e2","time":"2024-04-22T08:48:23Z"}

Please let us know why our pods are not getting response.

Thank you.

Devendranathashok commented 4 months ago

More logs : {"error":"(NamespaceExists) a collection 'litmus.chaosExperimentRuns' already exists","file":"/gql-server/pkg/database/mongodb/init.go:178","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb.(MongoClient).initAllCollection","level":"error","msg":"failed to create chaosExperimentRuns collection","time":"2024-04-22T08:46:49Z"} {"error":"(NamespaceExists) a collection 'litmus.chaosHubs' already exists","file":"/gql-server/pkg/database/mongodb/init.go:196","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb.(MongoClient).initAllCollection","level":"error","msg":"failed to create chaosHubs collection","time":"2024-04-22T08:46:49Z"} {"error":"(NamespaceExists) a collection 'litmus.chaosProbes' already exists","file":"/gql-server/pkg/database/mongodb/init.go:273","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb.(MongoClient).initAllCollection","level":"error","msg":"failed to create chaosProbes collection","time":"2024-04-22T08:46:49Z"} {"file":"/gql-server/server.go:115","func":"main.main","level":"info","msg":"chaos manager running at http://localhost:8080","time":"2024-04-22T08:46:49Z"} {"file":"/gql-server/pkg/chaoshub/service.go:1021","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaoshub.(chaosHubService).SyncDefaultChaosHubs","level":"info","msg":"syncing default chaos hub directories","time":"2024-04-22T08:46:49Z"} {"file":"/gql-server/server.go:132","func":"main.startGRPCServer","level":"info","msg":"GRPC server listening on [::]:8000","time":"2024-04-22T08:46:49Z"} {"file":"/gql-server/pkg/chaoshub/ops/gitops.go:172","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaoshub/ops.ChaosHubConfig.chaosChartSyncHandler","level":"info","msg":"executed isRepositoryExists()... ","repositoryExists":false,"time":"2024-04-22T08:46:49Z"} {"file":"/gql-server/pkg/projects/project_handler.go:60","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/projects.ProjectEvents","level":"error","msg":"(Location40573) The $changeStream stage is only supported on replica sets","time":"2024-04-22T08:46:49Z"} {"file":"/gql-server/graph/environment.resolvers.go:77","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph.(queryResolver).ListEnvironments","level":"info","msg":"request received to list environments","projectId":"fc47a5b1-036a-466f-b9f9-3fb2e72100e2","time":"2024-04-22T08:48:17Z"} {"file":"/gql-server/graph/environment.resolvers.go:18","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph.(mutationResolver).CreateEnvironment","level":"info","msg":"request received to create new environment","projectId":"fc47a5b1-036a-466f-b9f9-3fb2e72100e2","time":"2024-04-22T08:48:23Z"} {"file":"/gql-server/graph/environment.resolvers.go:18","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph.(mutationResolver).CreateEnvironment","level":"info","msg":"request received to create new environment","projectId":"fc47a5b1-036a-466f-b9f9-3fb2e72100e2","time":"2024-04-22T11:35:12Z"} {"chaosExperimentIds":null,"file":"/gql-server/graph/chaos_experiment.resolvers.go:164","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph.(queryResolver).ListExperiment","level":"info","msg":"request received to list chaos experiments","projectId":"fc47a5b1-036a-466f-b9f9-3fb2e72100e2","time":"2024-04-22T11:38:47Z"} {"file":"/gql-server/graph/chaos_infrastructure.resolvers.go:119","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph.(queryResolver).ListInfras","level":"info","msg":"request received to list chaos infrastructures","projectId":"fc47a5b1-036a-466f-b9f9-3fb2e72100e2","time":"2024-04-22T11:38:47Z"} {"file":"/gql-server/graph/chaos_infrastructure.resolvers.go:119","func":"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph.(queryResolver).ListInfras","level":"info","msg":"request received to list chaos infrastructures","projectId":"fc47a5b1-036a-466f-b9f9-3fb2e72100e2","time":"2024-04-22T11:38:49Z"}

dariolstella commented 4 months ago

I am facing the same issue in Openshift 4. All pods are running and I have an external mongodb. The issue is with graphql server. There is no response to any request that I made. The only request that has any response is the for listChaosHub. Any idea?

Devendranathashok commented 4 months ago

Yes, we have also deployed in Openshift 4.14.21. All our services are up and running as well. For mongo we have used our image.

dariolstella commented 4 months ago

@Devendranathashok we have resolved the issue in our env. Regarding this error --> (Location40573) The $changeStream stage is only supported on replica sets. We have an external standalone mongodb, so we changed the replicaset to one node. Then we configured the http_proxy, https_proxy and no_proxy values and everything started to run well.

Devendranathashok commented 4 months ago

Yes, It was looking for replicaset and we were able to solve the issue and now our litmus is up and running Thank you @dariolstella .