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

Plugin did not respond #213

Open
Chriskmob opened this issue Oct 12, 2023 · 4 comments
Open

Plugin did not respond #213

Chriskmob opened this issue Oct 12, 2023 · 4 comments

Comments

@Chriskmob
Copy link

Chriskmob commented Oct 12, 2023

Hello, thank you for your plugin.
it worked for me last week but now it doesn't working . i don't know why, because i didn't made any changes. I also tried with the version 1.10.2 of the plugin. if you have some ideas ..?

i tried with terraform 1.6.1 and 1.4.7 on two different machines with a very basic config file
i checked the opened ports on the esxi 22 and 443 are open.

Thanks

my ESXi version : 7.0.2

my config file XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

provider "esxi" {
esxi_hostname = var.esxi_hostname
esxi_hostport = var.esxi_hostport
esxi_hostssl = var.esxi_hostssl
esxi_username = var.esxi_username
esxi_password = var.esxi_password
}

resource "esxi_guest" "ubuntu_vm" {
guest_name = var.vm_hostname
disk_store = var.disk_store

ovf_source = var.ovf_file

network_interfaces {
virtual_network = var.virtual_network
}

ovf_properties {
key = "user-data"
value = base64encode(file(var.script_deploy))
}
}

The error XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

root@ubuntu-108:/ubuntu-198# which tf147
/usr/local/bin/tf147
root@ubuntu-108:
/ubuntu-198# tf147 init

Initializing the backend...

Initializing provider plugins...

  • Reusing previous version of josenk/esxi from the dependency lock file
  • Using previously-installed josenk/esxi v1.10.3

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
root@ubuntu-108:~/ubuntu-198# tf147 apply

Terraform used the selected providers to generate the following execution plan. Resource
actions are indicated with the following symbols:

  • create

Terraform will perform the following actions:

esxi_guest.ubuntu_vm will be created

  • resource "esxi_guest" "ubuntu_vm" {
    • boot_disk_size = (known after apply)

    • boot_disk_type = "thin"

    • boot_firmware = "bios"

    • disk_store = "datastore1"

    • guest_name = "ubuntu-198"

    • guest_shutdown_timeout = (known after apply)

    • guest_startup_timeout = (known after apply)

    • guestos = (known after apply)

    • id = (known after apply)

    • ip_address = (known after apply)

    • memsize = (known after apply)

    • notes = (known after apply)

    • numvcpus = (known after apply)

    • ovf_properties_timer = (known after apply)

    • ovf_source = "http://192.168.137.1:7845/jammy-server-cloudimg-amd64.ova"

    • power = (known after apply)

    • resource_pool_name = "/"

    • virthwver = (known after apply)

    • network_interfaces {

      • mac_address = (known after apply)
      • nic_type = (known after apply)
      • virtual_network = "VM Network"
        }
        }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.

Enter a value: yes

esxi_guest.ubuntu_vm: Creating...

│ Error: Plugin did not respond

│ with esxi_guest.ubuntu_vm,
│ on u-198.tf line 9, in resource "esxi_guest" "ubuntu_vm":
│ 9: resource "esxi_guest" "ubuntu_vm" {

│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more
│ details.

Stack trace from the terraform-provider-esxi_v1.10.3 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xcc3cce]

goroutine 45 [running]:
github.com/josenk/terraform-provider-esxi/esxi.guestCREATE(0xc0004f50e0, 0xc0000356c0, 0xa, 0xc0000356a0, 0xa, 0xc0000cb1c0, 0x39, 0x1492fb8, 0x1, 0x0, ...)
github.com/josenk/terraform-provider-esxi/esxi/guest-create.go:212 +0x1eae
github.com/josenk/terraform-provider-esxi/esxi.resourceGUESTCreate(0xc00010d8f0, 0xd96900, 0xc0004f50e0, 0x2, 0x152de40)
github.com/josenk/terraform-provider-esxi/esxi/resource_guest.go:403 +0x1ace
github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc000124b80, 0xc0003e4410, 0xc0004c9a80, 0xd96900, 0xc0004f50e0, 0xda4f01, 0xc0000a3378, 0xc0003e9200)
github.com/hashicorp/[email protected]/helper/schema/resource.go:286 +0x375
github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc000124e80, 0xc00013b8d8, 0xc0003e4410, 0xc0004c9a80, 0xc0003ec2c8, 0xc00000eb20, 0xda6f20)
github.com/hashicorp/[email protected]/helper/schema/provider.go:285 +0x99
github.com/hashicorp/terraform/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc000098a50, 0x101a2d0, 0xc0003e0a50, 0xc0003a29c0, 0xc000098a50, 0xc0003e0a50, 0xc00026aa50)
github.com/hashicorp/[email protected]/helper/plugin/grpc_provider.go:851 +0x88b
github.com/hashicorp/terraform/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0xe7bc20, 0xc000098a50, 0x101a2d0, 0xc0003e0a50, 0xc0003e4140, 0x0, 0x101a2d0, 0xc0003e0a50, 0xc0003a5400, 0x3f2)
github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3217 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000001680, 0x1021ed8, 0xc00009cf00, 0xc0003bd400, 0xc00007e330, 0x14ef2a0, 0x0, 0x0, 0x0)
google.golang.org/[email protected]/server.go:966 +0x486
google.golang.org/grpc.(*Server).handleStream(0xc000001680, 0x1021ed8, 0xc00009cf00, 0xc0003bd400, 0x0)
google.golang.org/[email protected]/server.go:1245 +0xcbd
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc000412e10, 0xc000001680, 0x1021ed8, 0xc00009cf00, 0xc0003bd400)
google.golang.org/[email protected]/server.go:685 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:683 +0xa5

Error: The terraform-provider-esxi_v1.10.3 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

@Melrieoi
Copy link

Hi Chriskmob,

I am experiencing the same/very simmilair issue. Did you find a way to solve it?

Thanks.

@josenk
Copy link
Owner

josenk commented Feb 22, 2024

Ensure ovftool is fully functional. You may need to reinstall it or update it to the latest version.

@Melrieoi
Copy link

Ensure ovftool is fully functional. You may need to reinstall it or update it to the latest version.

Well i was just writing the two outcomes i have which both fail. but i just tried running the apply command with a log attached. which is something i already tried before. and now, it just works. even when i remove the vm again and apply without the log it now just... works. when 15 minutes ago it did not... i hate technology.

@Chriskmob
Copy link
Author

yes, for me the problem was here
ovf_source = "http://192.168.137.1:7845/jammy-server-cloudimg-amd64.ova"

i have to make more tests but it seems that the plugin could not access to this http.

i workaround temporarly with local location of the ova

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