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

panic: runtime error: invalid memory address or nil pointer dereference #202

Closed
beravelli opened this issue Oct 12, 2016 · 6 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@beravelli
Copy link

I am facing this issue when converting the docker-compose.yml file . It is a straighforward compose file with couple of volume mounts and no env variables.

Kompose version : kompose version 0.1.0 (8227684)

Error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x18 pc=0xbbff5c]

goroutine 1 [running]:
panic(0x15a9b60, 0xc82000e0e0)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/skippbox/kompose/vendor/github.com/docker/libcompose/project.(_Project).handleNetworkConfig(0xc8201762a0)
/home/tuna/workspace/gocode-kompose/src/github.com/skippbox/kompose/vendor/github.com/docker/libcompose/project/project.go:254 +0x26c
github.com/skippbox/kompose/vendor/github.com/docker/libcompose/project.(_Project).load(0xc8201762a0, 0xc820355c40, 0x12, 0xc8201e4800, 0x4c3, 0x6c3, 0x0, 0x0)
/home/tuna/workspace/gocode-kompose/src/github.com/skippbox/kompose/vendor/github.com/docker/libcompose/project/project.go:209 +0x638
github.com/skippbox/kompose/vendor/github.com/docker/libcompose/project.(_Project).Parse(0xc8201762a0, 0x0, 0x0)
/home/tuna/workspace/gocode-kompose/src/github.com/skippbox/kompose/vendor/github.com/docker/libcompose/project/project.go:87 +0x335
github.com/skippbox/kompose/pkg/loader/compose.(_Compose).LoadFile(0x22db590, 0xc820355c40, 0x12, 0x0)
/home/tuna/workspace/gocode-kompose/src/github.com/skippbox/kompose/pkg/loader/compose/compose.go:121 +0x52f
github.com/skippbox/kompose/cli/app.Convert(0xc8202e1400)
/home/tuna/workspace/gocode-kompose/src/github.com/skippbox/kompose/cli/app/app.go:145 +0x4e8
github.com/skippbox/kompose/cli/command.ConvertCommand.func1(0xc8202e1400)
/home/tuna/workspace/gocode-kompose/src/github.com/skippbox/kompose/cli/command/command.go:32 +0x21
github.com/skippbox/kompose/vendor/github.com/urfave/cli.Command.Run(0x1811338, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc8203947d0, 0x4b, 0x0, ...)
/home/tuna/workspace/gocode-kompose/src/github.com/skippbox/kompose/vendor/github.com/urfave/cli/command.go:179 +0x1399
github.com/skippbox/kompose/vendor/github.com/urfave/cli.(*App).Run(0xc8203c2840, 0xc82000a140, 0x4, 0x4, 0x0, 0x0)
/home/tuna/workspace/gocode-kompose/src/github.com/skippbox/kompose/vendor/github.com/urfave/cli/app.go:196 +0x137c
main.main()
/home/tuna/workspace/gocode-kompose/src/github.com/skippbox/kompose/cli/main/main.go:47 +0x33b

@kadel
Copy link
Member

kadel commented Oct 12, 2016

Hi @beravelli
from trace you posted it looks like issue with libcompose, during parsing network definition.

Can you please show docker-compose file that you used, or at least snippet of it with network definitions?

@beravelli
Copy link
Author

Hi kadel,

networks:
- incubator

networks:
incubator:

@beravelli
Copy link
Author

beravelli commented Oct 12, 2016

It works when I take out the networks and volumes section in the docker-compose.yml file.

@ngtuna
Copy link
Contributor

ngtuna commented Oct 12, 2016

@beravelli network definition was improved with this recent PR #195. We will soon publish new release included this fix. Right now could you try getting kompose HEAD and test with your compose file?

@ngtuna
Copy link
Contributor

ngtuna commented Oct 12, 2016

Similar issue: #149

@ngtuna ngtuna added the bug label Oct 12, 2016
@kadel kadel added kind/bug Categorizes issue or PR as related to a bug. and removed bug labels Oct 19, 2016
@ngtuna
Copy link
Contributor

ngtuna commented Oct 22, 2016

close via #195

@ngtuna ngtuna closed this as completed Oct 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants