-
Notifications
You must be signed in to change notification settings - Fork 902
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
panic: runtime error: invalid memory address or nil pointer dereference #141
Comments
I've been a bit hasty with the above - this is probably due to us using vsphere 5. I'll close this, and you can add vSphere 5.0.0 to your incompatible list! |
If credentials are not provided in the govc url, govc would panic. Fixes github issue vmware#141
I've just updated to the latest, but I still see the same issue. |
Fixes github issue vmware#141
I should have looked closer at your stack trace.. looks like you are using 32-bit go and we were bitten by this issue: https://code.google.com/p/go/issues/detail?id=6404 I did reproduce with 32-bit go. Can you try updating again to include #143 ? |
That seems to have fixed this issue - Thanks. I'm not yet getting a valid response back from 'about', but that's more likely to be something I'm not doing right or a problem due to versions than an issue! govc about Thanks Jon |
Hi @jonc650, I think a version incompatibility is the most likely here. Any chance you can upgrade to 5.5? |
Works for me against ESX 5.0 - @jonc650 does your url point directly to an ESX box or vCenter? You can try: govc about -debug ... and have a look at ~/.govmomi/debug//.res.xml to see the response. In your case, the error happens when trying to unmarshal the response: vim25/xml/read.go: e := "expected element <" + finfo.name + "> in name space " + finfo.xmlns + " but have " % govc about |
Hello This is using vCenter. Strangely I randomly started getting a cert error instead of the above yesterday, and when I added -k=true I got a result, so it must have been something to do with our infrastructure at the time. I don't look after the VMware infrastructure, I just need to extract info from it as a sysadmin. There is the possibility we will be upgrading next year, but until then it now seems to work. Thanks for your help with this. Jon |
If credentials are not provided in the govc url, govc would panic. Fixes github issue vmware#141
Fixes github issue vmware#141
I currently get the following error on both OSX and Linux for all commands:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x1 pc=0x80e7fbc]
goroutine 1 [running]:
runtime.panic(0x8691a20, 0x9584c28)
/usr/lib/golang/src/pkg/runtime/panic.c:266 +0xac
sync/atomic.AddUint64(0x1982eb44, 0x1, 0x0, 0x1980a5e0, 0x0)
/usr/lib/golang/src/pkg/sync/atomic/asm_386.s:118 +0xc
github.com/vmware/govmomi/vim25/soap.(_Client).RoundTrip(0x1982eaf0, 0xb78941a0, 0x1980a5d0, 0xb78941a0, 0x1980a5e0, ...)
/workspace/src/github.com/vmware/govmomi/vim25/soap/client.go:127 +0x11b
github.com/vmware/govmomi/vim25/methods.RetrieveServiceContent(0xb7894188, 0x1982eaf0, 0x1980a5c0, 0x9588790, 0x1, ...)
/workspace/src/github.com/vmware/govmomi/vim25/methods/methods.go:9657 +0x99
github.com/vmware/govmomi.serviceContent(0xb7894188, 0x1982eaf0, 0x9587e70, 0xb7894188, 0x1981cee0, ...)
/workspace/src/github.com/vmware/govmomi/client.go:43 +0x8b
github.com/vmware/govmomi.NewClient(0xbfd5a89f, 0x5, 0x0, 0x0, 0x1981cee0, ...)
/workspace/src/github.com/vmware/govmomi/client.go:79 +0xbe
github.com/vmware/govmomi/govc/flags.(_ClientFlag).newClient(0x1981ce80, 0x0, 0x0, 0x0)
/workspace/src/github.com/vmware/govmomi/govc/flags/client.go:141 +0x61
github.com/vmware/govmomi/govc/flags.(_ClientFlag).Client(0x1981ce80, 0x19800680, 0x196, 0x198a34a4)
/workspace/src/github.com/vmware/govmomi/govc/flags/client.go:207 +0xcf
github.com/vmware/govmomi/govc/about.(_about).Run(0x19800680, 0x198a3680, 0x0, 0x0)
/workspace/src/github.com/vmware/govmomi/govc/about/command.go:42 +0x3a
github.com/vmware/govmomi/govc/cli.Run(0x1980a008, 0x1, 0x1, 0x19800680)
/workspace/src/github.com/vmware/govmomi/govc/cli/command.go:151 +0x4f2
main.main()
/workspace/src/github.com/vmware/govmomi/govc/main.go:42 +0x54
An strace show's it having issues with the session file not existing.
clock_gettime(CLOCK_REALTIME, {1413556864, 473082132}) = 0
open("/root/.govmomi/sessions/myuser@myesxhost.com?insecure=true", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
clock_gettime(CLOCK_REALTIME, {1413556864, 474050323}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
rt_sigreturn(0x198010a0) = 140738048
write(2, "panic: ", 7panic: ) = 7
write(2, "runtime error: invalid memory ad"..., 64runtime error: invalid memory address or nil pointer dereference) = 64
/root/.govmomi/sessions/ didn't exist, so I created it, but still get the same error.
The text was updated successfully, but these errors were encountered: