Panic Crash on Ubuntu X86

Hi,

i installed today the Tyk Profressional Version and it works everything as described. After first setup, i reboot the maschine for testing if everything came up after reboot and now i´m not able to start tyk anymore.

In the log file of the dashboard i get these lines, i comment out the domain name.

/home/tyk/go/src/github.com/lonelycode/tyk-analytics/Main.go:762 +0x59
[[90m[Jun 7 14:40:48]^[[0m ^[[32m INFO^[[0m Using /opt/tyk-dashboard/tyk_analytics.conf for configuration
[[90m[Jun 7 14:40:48]^[[0m ^[[32m INFO^[[0m Creating new Redis connection pool
[[90m[Jun 7 14:40:48]^[[0m ^[[32m INFO^[[0m Creating new Redis connection pool
[[90m[Jun 7 14:40:48]^[[0m ^[[32m INFO^[[0m Creating new Redis connection pool
[[90m[Jun 7 14:40:48]^[[0m ^[[32m INFO^[[0m Creating new Redis connection pool
[[90m[Jun 7 14:40:48]^[[0m ^[[32m INFO^[[0m Adding available nodes…
[[90m[Jun 7 14:40:48]^[[0m ^[[32m INFO^[[0m Tyk Analytics Dashboard 1.1.0.0
[[90m[Jun 7 14:40:48]^[[0m ^[[32m INFO^[[0m Copyright Martin Buhr 2016
[[90m[Jun 7 14:40:48]^[[0m ^[[32m INFO^[[0m https://www.tyk.io
[[90m[Jun 7 14:40:48]^[[0m ^[[32m INFO^[[0m Listening on port: 3000
[[90m[Jun 7 14:40:48]^[[0m ^[[32m INFO^[[0m Loading routes…
[[90m[Jun 7 14:40:48]^[[0m ^[[32m INFO^[[0m Generating portal for: ******
panic: http: multiple registrations for ************

goroutine 1 [running]:
panic(0xa6f980, 0xc8202ef010)
/usr/local/go/src/runtime/panic.go:464 +0x3e6
net/http.(*ServeMux).Handle(0xc8202dfa40, 0xc8202ff3e0, 0x16, 0x7f879d671670, 0xc8203020b0)
/usr/local/go/src/net/http/server.go:1926 +0x297
main.GenerateRoutes()
/home/tyk/go/src/github.com/lonelycode/tyk-analytics/Main.go:745 +0x4222
main.main()
/home/tyk/go/src/github.com/lonelycode/tyk-analytics/Main.go:762 +0x59

Anyone had the same issues?

Thanks for any help.

Did you run the bootstrap script twice and then set up the same portal domain twice? (This sometimes happens if you are demoing and forget your temp username, it’s very tempting) but each org needs a unique portal domain, which is why it crashed.

You will need to delete one of the organisations in your MongoDB in the tyk_organisations collection

Strike! I do exactly that - run the bootstrap several times cause i had a mangodb issue where i not found the solution so quickly.

It works now!

Thank you very much for your fast response. I can now test and work again :slight_smile:

Today I encountered the same error. I don’t think that I set the same portal domain twice. Rather, I set the portal domain only once during the entire period of usage.

My Mongo collection indicates the below, which also shows that there is no duplicate CNAME entry defined.

{ “_id” : ObjectId(“57351ec15ee85737df000001”), “owner_name” : “Default Org.”, “owner_slug” : “default”, “cname_enabled” : true, “cname” : “”, “apis” : [ ], “developer_quota” : 0, “developer_count” : 0, “event_options” : { }, “hybrid_enabled” : false, “ui” : { “login_page” : { }, “nav” : { }, “uptime” : { }, “portal_section” : { }, “designer” : { }, “dont_show_admin_sockets” : false, “dont_allow_license_management” : false, “dont_allow_license_management_view” : false } }
{ “_id” : ObjectId(“5735201b5ee85737df000003”), “owner_name” : “Default Org.”, “owner_slug” : “default”, “cname_enabled” : true, “cname” : “”, “apis” : [ ], “developer_quota” : 0, “developer_count” : 0, “event_options” : { }, “hybrid_enabled” : false, “ui” : { “login_page” : { }, “nav” : { }, “uptime” : { }, “portal_section” : { }, “designer” : { }, “dont_show_admin_sockets” : false, “dont_allow_license_management” : false, “dont_allow_license_management_view” : false } }
{ “_id” : ObjectId(“57352b995ee8574ac8000001”), “owner_name” : “Default Org.”, “owner_slug” : “default”, “cname_enabled” : true, “cname” : “”, “apis” : [ ], “developer_quota” : 0, “developer_count” : 0, “event_options” : { }, “hybrid_enabled” : false, “ui” : { “login_page” : { }, “nav” : { }, “uptime” : { }, “portal_section” : { }, “designer” : { }, “dont_show_admin_sockets” : false, “dont_allow_license_management” : false, “dont_allow_license_management_view” : false } }
{ “_id” : ObjectId(“573564cb5ee85763af000001”), “owner_name” : “Default Org.”, “owner_slug” : “default”, “cname_enabled” : true, “cname” : “”, “apis” : [ ], “developer_quota” : 0, “developer_count” : 0, “event_options” : { }, “hybrid_enabled” : false, “ui” : { “login_page” : { }, “nav” : { }, “uptime” : { }, “portal_section” : { }, “designer” : { }, “dont_show_admin_sockets” : false, “dont_allow_license_management” : false, “dont_allow_license_management_view” : false } }
{ “_id” : ObjectId(“5735c8e15ee8577f1a000001”), “owner_name” : “Default Org.”, “owner_slug” : “default”, “cname_enabled” : true, “cname” : “”, “apis” : [ ], “developer_quota” : 0, “developer_count” : 0, “event_options” : { }, “hybrid_enabled” : false, “ui” : { “login_page” : { }, “nav” : { }, “uptime” : { }, “portal_section” : { }, “designer” : { }, “dont_show_admin_sockets” : false, “dont_allow_license_management” : false, “dont_allow_license_management_view” : false } }
{ “_id” : ObjectId(“5735d3e05ee85705e5000001”), “owner_name” : “emory”, “owner_slug” : “emory”, “cname_enabled” : true, “cname” : “”, “apis” : [ ], “developer_quota” : 0, “developer_count” : 0, “event_options” : { }, “hybrid_enabled” : false, “ui” : { “login_page” : { }, “nav” : { }, “uptime” : { }, “portal_section” : { }, “designer” : { }, “dont_show_admin_sockets” : false, “dont_allow_license_management” : false, “dont_allow_license_management_view” : false } }
{ “_id” : ObjectId(“5735d4335ee8570609000001”), “owner_name” : “emory”, “owner_slug” : “emory”, “cname_enabled” : true, “cname” : “”, “apis” : [ ], “developer_quota” : 0, “developer_count” : 0, “event_options” : { }, “hybrid_enabled” : false, “ui” : { “login_page” : { }, “nav” : { }, “uptime” : { }, “portal_section” : { }, “designer” : { }, “dont_show_admin_sockets” : false, “dont_allow_license_management” : false, “dont_allow_license_management_view” : false } }
{ “_id” : ObjectId(“5735d4905ee8570640000001”), “owner_name” : “emory”, “owner_slug” : “emory”, “cname_enabled” : true, “cname” : “”, “apis” : [ ], “developer_quota” : 0, “developer_count” : 0, “event_options” : { }, “hybrid_enabled” : false, “ui” : { “login_page” : { }, “nav” : { }, “uptime” : { }, “portal_section” : { }, “designer” : { }, “dont_show_admin_sockets” : false, “dont_allow_license_management” : false, “dont_allow_license_management_view” : false } }
{ “_id” : ObjectId(“5735d4f55ee857068a000001”), “owner_name” : “gmail”, “owner_slug” : “gmail”, “cname_enabled” : true, “cname” : “dashboard.tyk-local.com”, “apis” : [ { “api_human_name” : “kitten”, “api_id” : “0d014a336e344dfc41385bfdc0973266” }, { “api_human_name” : “tcia”, “api_id” : “976e691fb4bd48707fd6754a200439ba” }, { “api_human_name” : “MEDIator”, “api_id” : “cfbcb4e40b4644ff49f651e3e68e749c” } ], “developer_quota” : 0, “developer_count” : 0, “event_options” : { }, “hybrid_enabled” : false, “ui” : { “login_page” : { }, “nav” : { }, “uptime” : { }, “portal_section” : { }, “designer” : { }, “dont_show_admin_sockets” : false, “dont_allow_license_management” : false, “dont_allow_license_management_view” : false } }
{ “_id” : ObjectId(“5756fd7e5ee8570330000002”), “owner_name” : “Default Org.”, “owner_slug” : “default”, “cname_enabled” : true, “cname” : “”, “apis” : [ ], “developer_quota” : 0, “developer_count” : 0, “event_options” : { }, “hybrid_enabled” : false, “ui” : { “login_page” : { }, “nav” : { }, “uptime” : { }, “portal_section” : { }, “designer” : { }, “dont_show_admin_sockets” : false, “dont_allow_license_management” : false, “dont_allow_license_management_view” : false } }
{ “_id” : ObjectId(“5756fec35ee8572999000001”), “owner_name” : “Default Org.”, “owner_slug” : “default”, “cname_enabled” : true, “cname” : “”, “apis” : [ ], “developer_quota” : 0, “developer_count” : 0, “event_options” : { }, “hybrid_enabled” : false, “ui” : { “login_page” : { }, “nav” : { }, “uptime” : { }, “portal_section” : { }, “designer” : { }, “dont_show_admin_sockets” : false, “dont_allow_license_management” : false, “dont_allow_license_management_view” : false } }

Any hint on what went wrong?

Regards,
Pradeeban.

My entire logs are given below:
panic: http: multiple registrations for dashboard.tyk-local.com:3000/

goroutine 1 [running]:
panic(0xa60f80, 0xc8203901e0)
/usr/local/go/src/runtime/panic.go:464 +0x3e6
net/http.(*ServeMux).Handle(0xc820314360, 0xc820380d60, 0x1d, 0x7f0ab19960e0, 0xc8202b0c60)
/usr/local/go/src/net/http/server.go:1926 +0x297
main.GenerateRoutes()
/home/tyk/go/src/github.com/lonelycode/tyk-analytics/Main.go:733 +0x41b7
main.main()
/home/tyk/go/src/github.com/lonelycode/tyk-analytics/Main.go:750 +0x59
e[90m[Jul 6 17:31:28]e[0m e[32m INFOe[0m Using /opt/tyk-dashboard/tyk_analytics.conf for configuration
e[90m[Jul 6 17:31:28]e[0m e[32m INFOe[0m Creating new Redis connection pool
e[90m[Jul 6 17:31:28]e[0m e[32m INFOe[0m Creating new Redis connection pool
e[90m[Jul 6 17:31:28]e[0m e[32m INFOe[0m Creating new Redis connection pool
e[90m[Jul 6 17:31:28]e[0m e[32m INFOe[0m Creating new Redis connection pool
e[90m[Jul 6 17:31:28]e[0m e[32m INFOe[0m Adding available nodes…
e[90m[Jul 6 17:31:28]e[0m e[32m INFOe[0m Tyk Analytics Dashboard 1.0.0.0
e[90m[Jul 6 17:31:28]e[0m e[32m INFOe[0m Copyright Martin Buhr 2016
e[90m[Jul 6 17:31:28]e[0m e[32m INFOe[0m https://www.tyk.io
e[90m[Jul 6 17:31:28]e[0m e[32m INFOe[0m Listening on port: 3000
e[90m[Jul 6 17:31:28]e[0m e[32m INFOe[0m Loading routes…
e[90m[Jul 6 17:31:28]e[0m e[32m INFOe[0m Generating portal for: dashboard.tyk-local.com
panic: http: multiple registrations for dashboard.tyk-local.com:3000/

goroutine 1 [running]:
panic(0xa60f80, 0xc82037cd80)
/usr/local/go/src/runtime/panic.go:464 +0x3e6
net/http.(*ServeMux).Handle(0xc820369740, 0xc820389340, 0x1d, 0x7fa049dc5ff0, 0xc8200ed600)
/usr/local/go/src/net/http/server.go:1926 +0x297
main.GenerateRoutes()
/home/tyk/go/src/github.com/lonelycode/tyk-analytics/Main.go:733 +0x41b7
main.main()
/home/tyk/go/src/github.com/lonelycode/tyk-analytics/Main.go:750 +0x59

The problem is right there in the first line of your logs.

You can’t have the same domain for the portal and the dashbaord unless you farm that out to nginx and mnage domains that way.