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

crashes on launch #589

Closed
justinhj opened this issue May 6, 2017 · 11 comments
Closed

crashes on launch #589

justinhj opened this issue May 6, 2017 · 11 comments

Comments

@justinhj
Copy link

justinhj commented May 6, 2017

Crashes on launch. Note that removing the networks section fixes the problem. This bug occurs in version 0.6.0. I tried to build the project from HEAD but wasn't able to get it working.

version: '2'

services:
dynamodb:
image: deangiberson/aws-dynamodb-local
expose:
- 8000
networks:
- appnet

redis:
image: redis:3.0-alpine
expose:
- 6379
networks:
- appnet

appseed1:
image: justinhj/app:latest
expose:
- 1600
environment:
- APP_CONFIG=/app/appseed1.conf
networks:
- appnet

appseed2:
image: justinhj/app:latest
ports:
- 11080:11080
expose:
- 1601
environment:
- APP_CONFIG=/app/appseed2.conf
networks:
- appnet

justapp:
image: justinhj/app:latest
environment:
- APP_CONFIG=/app/justapp.conf
networks:
- appnet

networks:
appnet:

justinhjmbp1:dockerlocal justinhj$ kompose -f docker-compose.yml convert
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x21f008c]

goroutine 1 [running]:
github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project.(*Project).handleNetworkConfig(0xc4200c01c0)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project/project.go:292 +0x19c
github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project.(*Project).load(0xc4200c01c0, 0x7fff5fbffa23, 0x12, 0xc420092b00, 0x30c, 0x50c, 0xc4204cb340, 0xc4204cb340)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project/project.go:245 +0x490
github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project.(*Project).Parse(0xc4200c01c0, 0x0, 0x0)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project/project.go:123 +0x162
github.com/kubernetes-incubator/kompose/pkg/loader/compose.(*Compose).LoadFile(0x3673be8, 0xc42025a410, 0x1, 0x1, 0xc4201ef830, 0x0, 0xfeb5e8fa9faab678, 0xc4204cb9e0, 0x100141e)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/pkg/loader/compose/compose.go:306 +0x10f
github.com/kubernetes-incubator/kompose/pkg/app.Convert(0x100000100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc42025a410, 0x1, 0x1, ...)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/pkg/app/app.go:213 +0x145
github.com/kubernetes-incubator/kompose/cmd.glob..func3(0x3645be0, 0xc4201f1b40, 0x0, 0x2)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/cmd/convert.go:85 +0x5a
github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra.(*Command).execute(0x3645be0, 0xc4201f1ae0, 0x2, 0x2, 0x3645be0, 0xc4201f1ae0)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra/command.go:635 +0x23a
github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x3646060, 0xc42006e058, 0x0, 0xc4204cbf48)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra/command.go:710 +0x339
github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra.(*Command).Execute(0x3646060, 0x1, 0x1)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra/command.go:669 +0x2b
github.com/kubernetes-incubator/kompose/cmd.Execute()
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/cmd/root.go:92 +0x31
main.main()
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/main.go:22 +0x20

@cdrage
Copy link
Member

cdrage commented May 7, 2017

@justinhj That is REALLY odd, how did you get the "wikus" log and all? Looks like you may have copied and pasted the wrong log from a different issue?

@surajnarwade
Copy link
Contributor

surajnarwade commented May 8, 2017

@justinhj @cdrage , error is due to root level network key and it's coming from libcompose which is tracked here, docker/libcompose#456
same issue was reported earlier at #474

@cdrage
Copy link
Member

cdrage commented May 8, 2017

@surajnarwade Yup, but his logs say "wikus" and has the dropbox dir, which is my computer username

@surajnarwade
Copy link
Contributor

@cdrage , didn't get you ?

@cdrage
Copy link
Member

cdrage commented May 8, 2017

@surajnarwade

For some reason, his logs show:

justinhjmbp1:dockerlocal justinhj$ kompose -f docker-compose.yml convert
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x21f008c]

goroutine 1 [running]:
github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project.(*Project).handleNetworkConfig(0xc4200c01c0)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project/project.go:292 +0x19c
github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project.(*Project).load(0xc4200c01c0, 0x7fff5fbffa23, 0x12, 0xc420092b00, 0x30c, 0x50c, 0xc4204cb340, 0xc4204cb340)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project/project.go:245 +0x490
github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project.(*Project).Parse(0xc4200c01c0, 0x0, 0x0)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project/project.go:123 +0x162
github.com/kubernetes-incubator/kompose/pkg/loader/compose.(*Compose).LoadFile(0x3673be8, 0xc42025a410, 0x1, 0x1, 0xc4201ef830, 0x0, 0xfeb5e8fa9faab678, 0xc4204cb9e0, 0x100141e)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/pkg/loader/compose/compose.go:306 +0x10f
github.com/kubernetes-incubator/kompose/pkg/app.Convert(0x100000100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc42025a410, 0x1, 0x1, ...)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/pkg/app/app.go:213 +0x145
github.com/kubernetes-incubator/kompose/cmd.glob..func3(0x3645be0, 0xc4201f1b40, 0x0, 0x2)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/cmd/convert.go:85 +0x5a
github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra.(*Command).execute(0x3645be0, 0xc4201f1ae0, 0x2, 0x2, 0x3645be0, 0xc4201f1ae0)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra/command.go:635 +0x23a
github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x3646060, 0xc42006e058, 0x0, 0xc4204cbf48)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra/command.go:710 +0x339
github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra.(*Command).Execute(0x3646060, 0x1, 0x1)
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra/command.go:669 +0x2b
github.com/kubernetes-incubator/kompose/cmd.Execute()
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/cmd/root.go:92 +0x31
main.main()
/home/wikus/dropbox/dev/go/src/github.com/kubernetes-incubator/kompose/main.go:22 +0x20

Which is actually from MY computer (hence the wikus part). So I'm asking whether or not he may of copied-and-pasted a different issue or if he actually had these errors appear on his computer.

@justinhj
Copy link
Author

justinhj commented May 8, 2017

That is strange. Pretty sure I copied straight from my prompt and you can see my name at the start. I'll reproduce the error and check

@justinhj
Copy link
Author

justinhj commented May 8, 2017

I ran again and no wikus, so yeah it's possible something unintended happened when copy and pasting the issue. Here's the updated version...

justinhjmbp1:dockerlocal justinhj$ kompose convert
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x21f6a8c]

goroutine 1 [running]:
github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project.(*Project).handleNetworkConfig(0xc42038c0e0)
/private/tmp/kompose-20170428-47922-jvhlih/kompose-0.6.0/src/github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project/project.go:292 +0x19c
github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project.(*Project).load(0xc42038c0e0, 0x2880c6a, 0x12, 0xc420096580, 0x30c, 0x50c, 0xc4204df340, 0xc4204df340)
/private/tmp/kompose-20170428-47922-jvhlih/kompose-0.6.0/src/github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project/project.go:245 +0x490
github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project.(*Project).Parse(0xc42038c0e0, 0x0, 0x0)
/private/tmp/kompose-20170428-47922-jvhlih/kompose-0.6.0/src/github.com/kubernetes-incubator/kompose/vendor/github.com/docker/libcompose/project/project.go:123 +0x162
github.com/kubernetes-incubator/kompose/pkg/loader/compose.(*Compose).LoadFile(0x368df28, 0xc4203ad8f0, 0x1, 0x1, 0xc420051ef0, 0x0, 0x1040bfb, 0x20, 0x25865a0)
/private/tmp/kompose-20170428-47922-jvhlih/kompose-0.6.0/src/github.com/kubernetes-incubator/kompose/pkg/loader/compose/compose.go:306 +0x10f
github.com/kubernetes-incubator/kompose/pkg/app.Convert(0x100000100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc4203ad8f0, 0x1, 0x1, ...)
/private/tmp/kompose-20170428-47922-jvhlih/kompose-0.6.0/src/github.com/kubernetes-incubator/kompose/pkg/app/app.go:213 +0x145
github.com/kubernetes-incubator/kompose/cmd.glob..func3(0x365ff60, 0x368df28, 0x0, 0x0)
/private/tmp/kompose-20170428-47922-jvhlih/kompose-0.6.0/src/github.com/kubernetes-incubator/kompose/cmd/convert.go:85 +0x5a
github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra.(*Command).execute(0x365ff60, 0x368df28, 0x0, 0x0, 0x365ff60, 0x368df28)
/private/tmp/kompose-20170428-47922-jvhlih/kompose-0.6.0/src/github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra/command.go:635 +0x23a
github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x36603e0, 0xc420072058, 0x0, 0xc4204dff48)
/private/tmp/kompose-20170428-47922-jvhlih/kompose-0.6.0/src/github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra/command.go:710 +0x339
github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra.(*Command).Execute(0x36603e0, 0x1, 0x1)
/private/tmp/kompose-20170428-47922-jvhlih/kompose-0.6.0/src/github.com/kubernetes-incubator/kompose/vendor/github.com/spf13/cobra/command.go:669 +0x2b
github.com/kubernetes-incubator/kompose/cmd.Execute()
/private/tmp/kompose-20170428-47922-jvhlih/kompose-0.6.0/src/github.com/kubernetes-incubator/kompose/cmd/root.go:92 +0x31
main.main()
/private/tmp/kompose-20170428-47922-jvhlih/kompose-0.6.0/main.go:22 +0x20

@cdrage
Copy link
Member

cdrage commented May 8, 2017

@justinhj
Are you running this in a Docker container (I see /private/ as well as dockerlocal username).

Any way that we can re-produce this setup? (I think you're on Mac OS X?)

@justinhj
Copy link
Author

justinhj commented May 8, 2017

No, dockerlocal is just the directory name. I'm running in Mac OS X terminal

surajnarwade added a commit to surajnarwade/kompose that referenced this issue May 15, 2017
It resolves issues kubernetes#474 and kubernetes#589 which were coming from libcompose,
as well as resolves kubernetes#440 and kubernetes#437 partially as `group_add` & `stop_grace_period`
are supported by libcompose now.
@surajnarwade
Copy link
Contributor

@cdrage @justinhj , since #601 is merged now, issue has been resolved
I tried with above docker-compose file, it works well,

$ kompose convert -f docker-compose.yml 
WARN Unsupported root level networks key - ignoring 
WARN Unsupported networks key - ignoring          
INFO file "appseed1-service.yaml" created         
INFO file "appseed2-service.yaml" created         
INFO file "dynamodb-service.yaml" created         
INFO file "justapp-service.yaml" created          
INFO file "redis-service.yaml" created            
INFO file "appseed1-deployment.yaml" created      
INFO file "appseed2-deployment.yaml" created      
INFO file "dynamodb-deployment.yaml" created      
INFO file "justapp-deployment.yaml" created       
INFO file "redis-deployment.yaml" created 

@surajssd
Copy link
Member

closing this one then!

cdrage pushed a commit to cdrage/kompose that referenced this issue May 17, 2017
It resolves issues kubernetes#474 and kubernetes#589 which were coming from libcompose,
as well as resolves kubernetes#440 and kubernetes#437 partially as `group_add` & `stop_grace_period`
are supported by libcompose now.
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

4 participants