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

mantl-api error #41

Closed
hussainsultan opened this issue Apr 25, 2016 · 3 comments
Closed

mantl-api error #41

hussainsultan opened this issue Apr 25, 2016 · 3 comments

Comments

@hussainsultan
Copy link

hussainsultan commented Apr 25, 2016

This happens whenever i run mantl-api docker container after i provide force-sync option from marathon via environment variable. When mantl-api is first deployed, everything works but after force-sync i have not gotten it to work.

curl -k -u admin:xxx https://xxx/api/1/packages
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.6.2</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

here are the logs from mesos:

time="2016-04-25T04:51:34Z" level=debug msg="GET /1/packages" 
2016/04/25 04:51:35 http: panic serving xxx.xxx.xxx.xx:xxx: interface conversion: interface is nil, not bool
goroutine 28 [running]:
net/http.(*conn).serve.func1(0xc820134c60, 0x7f5eaca5c0e8, 0xc82011e810)
    /usr/lib/go/src/net/http/server.go:1287 +0xb5
github.com/CiscoCloud/mantl-api/install.packageCatalog.packagesIndex(0xc8203a0b40, 0xc82011e060, 0x0, 0x0, 0x0, 0x0, 0x0)
    /go/src/github.com/CiscoCloud/mantl-api/install/catalog.go:82 +0x631
github.com/CiscoCloud/mantl-api/install.(*Install).getPackages(0xc8201c6c30, 0x0, 0x0, 0x0, 0x0, 0x0)
    /go/src/github.com/CiscoCloud/mantl-api/install/package.go:324 +0xb2
github.com/CiscoCloud/mantl-api/install.(*Install).Packages(0xc8201c6c30, 0x0, 0x0, 0x0, 0x0, 0x0)
    /go/src/github.com/CiscoCloud/mantl-api/install/install.go:58 +0x3e
github.com/CiscoCloud/mantl-api/api.(*Api).packages(0xc8203a04e0, 0x7f5eaca65048, 0xc820134d10, 0xc8203ac380, 0x0, 0x0, 0x0)
    /go/src/github.com/CiscoCloud/mantl-api/api/api.go:90 +0x86
github.com/CiscoCloud/mantl-api/api.(*Api).(github.com/CiscoCloud/mantl-api/api.packages)-fm(0x7f5eaca65048, 0xc820134d10, 0xc8203ac380, 0x0, 0x0, 0x0)
    /go/src/github.com/CiscoCloud/mantl-api/api/api.go:68 +0x5c
github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc82037fe80, 0x7f5eaca65048, 0xc820134d10, 0xc8203ac380)
    /go/src/github.com/julienschmidt/httprouter/router.go:344 +0x195
github.com/CiscoCloud/mantl-api/api.logHandler.func1(0x7f5eaca65048, 0xc820134d10, 0xc8203ac380)
    /go/src/github.com/CiscoCloud/mantl-api/api/api.go:46 +0x1a4
net/http.HandlerFunc.ServeHTTP(0xc820326980, 0x7f5eaca65048, 0xc820134d10, 0xc8203ac380)
    /usr/lib/go/src/net/http/server.go:1422 +0x3a
net/http.serverHandler.ServeHTTP(0xc8202d3e60, 0x7f5eaca65048, 0xc820134d10, 0xc8203ac380)
    /usr/lib/go/src/net/http/server.go:1862 +0x19e
net/http.(*conn).serve(0xc820134c60)
    /usr/lib/go/src/net/http/server.go:1361 +0xbee
created by net/http.(*Server).Serve
    /usr/lib/go/src/net/http/server.go:1910 +0x3f6

@hussainsultan
Copy link
Author

hussainsultan commented Apr 25, 2016

update This error popped up because i had a non-conforming mantl package in the custom universe repository. When i manually deleted the consul mantl-install keys, i was able to run the mantl-api again without errors. However, if i just fixed the repo and asked it to force-sync with a conforming mantl universe repository the above error still persisted.

@ryane
Copy link
Contributor

ryane commented May 6, 2016

@hussainsultan sorry for the delay in response. do you happen to have the invalid package handy? do you know if it was due to a missing framework field as in #42 or was it something else?

@ryane
Copy link
Contributor

ryane commented May 12, 2016

that last commit should fix this problem. please open another issue if you continue to run into issues

@ryane ryane closed this as completed May 12, 2016
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

2 participants