Skip to content

Error: rpc error: code = Unavailable desc = transport is closing #302

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

Closed
RafiGreenberg opened this issue Sep 2, 2020 · 1 comment
Closed

Comments

@RafiGreenberg
Copy link

Terraform CLI and Terraform MongoDB Atlas Provider Version

 % terraform version
Terraform v0.12.29
+ provider.google v3.37.0
+ provider.google-beta v3.37.0
+ provider.mongodbatlas v0.6.3
+ provider.null v2.1.2
+ provider.template v2.1.2

Terraform Configuration File

provider "mongodbatlas" {
  version = "0.6.3"
  public_key = "FOO"
  private_key = "BAR"
}

data "mongodbatlas_project" "default" {
  name = "FOO"
}

resource "mongodbatlas_cluster" "default" {
  name                  = "${var.env}-cluster-1"
  project_id            = data.mongodbatlas_project.default.id
  mongo_db_major_version = "4.0"
  provider_name         = "GCP"
  provider_region_name  = "WESTERN_US"
  provider_instance_size_name = "M10"
  backup_enabled        = false
  auto_scaling_disk_gb_enabled = "true"
  disk_size_gb          = "10"
}

Steps to Reproduce

  1. terraform init
  2. terraform apply

Expected Behavior

run plan/apply

Actual Behavior

Error: rpc error: code = Unavailable desc = transport is closing

Debug Output

Crash Output

panic: runtime error: index out of range [1] with length 1
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4:
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4: goroutine 84 [running]:
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4: github.com/terraform-providers/terraform-provider-mongodbatlas/mongodbatlas.decodeStateID(0xc00047e2c0, 0x18, 0xc00009f730)
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/mongodbatlas/provider.go:126 +0x23d
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4: github.com/terraform-providers/terraform-provider-mongodbatlas/mongodbatlas.resourceMongoDBAtlasClusterRead(0xc0001887e0, 0xfcbda0, 0xc0001d0000, 0xc0001887e0, 0x0)
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/mongodbatlas/resource_mongodbatlas_cluster.go:603 +0x9a
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc000786510, 0xc0002885a0, 0xfcbda0, 0xc0001d0000, 0xc000881c50, 0xc0002885a0, 0x0)
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go:460 +0x119
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4: github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ReadResource(0xc00020e078, 0x136cc00, 0xc00016bf50, 0xc0002066c0, 0xc00020e078, 0xc00016bf50, 0xc00063ab88)
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin/grpc_provider.go:525 +0x3d8
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4: github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ReadResource_Handler(0x1078e60, 0xc00020e078, 0x136cc00, 0xc00016bf50, 0xc000206660, 0x0, 0x136cc00, 0xc00016bf50, 0xc00062f600, 0x551)
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.pb.go:3269 +0x217
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4: google.golang.org/grpc.(*Server).processUnaryRPC(0xc0005441a0, 0x1378240, 0xc0006c2480, 0xc0001a6400, 0xc00018bc20, 0x1ade5d0, 0x0, 0x0, 0x0)
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/google.golang.org/grpc/server.go:1082 +0x50a
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4: google.golang.org/grpc.(*Server).handleStream(0xc0005441a0, 0x1378240, 0xc0006c2480, 0xc0001a6400, 0x0)
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/google.golang.org/grpc/server.go:1405 +0xcc9
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4: google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0000340a0, 0xc0005441a0, 0x1378240, 0xc0006c2480, 0xc0001a6400)
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/google.golang.org/grpc/server.go:746 +0xa1
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4: created by google.golang.org/grpc.(*Server).serveStreams.func1
2020-09-02T09:21:26.535-0700 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.6.3_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-mongodbatlas/vendor/google.golang.org/grpc/server.go:744 +0xa1
2020/09/02 09:21:26 [ERROR] <root>: eval: *terraform.EvalRefresh, err: rpc error: code = Unavailable desc = transport is closing
2020-09-02T09:21:26.536-0700 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2020/09/02 09:21:26 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/09/02 09:21:26 [TRACE] [walkRefresh] Exiting eval tree: mongodbatlas_cluster.default

Additional Context

References

@RafiGreenberg
Copy link
Author

Nevermind, I fixed it by removing resources from state and re-importing.

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

1 participant