{"record":{"id":"20ce8ce0b15ca3e5","repo":"Netflix/chaosmonkey","slug":"fatal-no-spinnaker-endpoint-specified-in-config","errorCode":null,"errorMessage":"FATAL: no spinnaker endpoint specified in config","messagePattern":"FATAL: no spinnaker endpoint specified in config","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"spinnaker/spinnaker.go","lineNumber":114,"sourceCode":"\ttlsConfig := &tls.Config{\n\t\tCertificates:       []tls.Certificate{cert},\n\t\tInsecureSkipVerify: true,\n\t}\n\ttransport := &http.Transport{TLSClientConfig: tlsConfig}\n\treturn &http.Client{Transport: transport}, nil\n}\n\n// NewFromConfig returns a Spinnaker based on config\nfunc NewFromConfig(cfg *config.Monkey) (Spinnaker, error) {\n\tspinnakerEndpoint := cfg.SpinnakerEndpoint()\n\tcertPath := cfg.SpinnakerCertificate()\n\tencryptedPassword := cfg.SpinnakerEncryptedPassword()\n\tuser := cfg.SpinnakerUser()\n\tx509Cert := cfg.SpinnakerX509Cert()\n\tx509Key := cfg.SpinnakerX509Key()\n\n\tif spinnakerEndpoint == \"\" {\n\t\treturn Spinnaker{}, errors.New(\"FATAL: no spinnaker endpoint specified in config\")\n\t}\n\n\tvar password string\n\tvar err error\n\tvar decryptor chaosmonkey.Decryptor\n\n\tif encryptedPassword != \"\" {\n\t\tdecryptor, err = deps.GetDecryptor(cfg)\n\t\tif err != nil {\n\t\t\treturn Spinnaker{}, err\n\t\t}\n\n\t\tpassword, err = decryptor.Decrypt(encryptedPassword)\n\t\tif err != nil {\n\t\t\treturn Spinnaker{}, err\n\t\t}\n\t}\n","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/Netflix/chaosmonkey/blob/eaa28fb761c0ebe8644d1333e5d164e9cc3071e9/spinnaker/spinnaker.go#L96-L132","documentation":"NewFromConfig builds a Spinnaker client from chaos monkey configuration. It requires a Spinnaker endpoint (spinnaker.endpoint in the chaos monkey config); if the endpoint string is empty, construction fails immediately with this fatal-style error before any network call is made.","triggerScenarios":"Calling spinnaker.NewFromConfig (via chaosmonkey.Execute) when cfg.SpinnakerEndpoint() returns \"\" — i.e. the config file/flags provided to chaos monkey define no spinnaker.endpoint value.","commonSituations":"Fresh deployment where chaos_monkey.json omits the spinnaker.endpoint key; typo in the config key name; config loaded from the wrong file or environment so endpoint fields are zero-valued; endpoint set only in an environment that isn't read by the config loader.","solutions":["Add \"spinnaker\": {\"endpoint\": \"https://your-spinnaker-api\"} to the chaos monkey config file","Verify the config file actually being loaded (check the -config flag / config path used by Execute)","Check the key spelling and nesting of the endpoint in the config JSON","Print/log cfg.SpinnakerEndpoint() early in startup to confirm what the loader sees"],"exampleFix":"// before: chaos_monkey.json\n{\"spinnaker\": {\"user\": \"cm\", \"password\": \"...\"}}\n// after\n{\"spinnaker\": {\"endpoint\": \"https://spinnaker.example.com/api/v1\", \"user\": \"cm\", \"password\": \"...\"}}","handlingStrategy":"validation","validationCode":"if cfg.SpinnakerEndpoint() == \"\" {\n    return errors.New(\"chaos monkey config missing spinnaker.endpoint\")\n}\n// safe to call Execute / NewFromConfig","typeGuard":"func spinnakerConfigured(cfg *chaosmonkey.Config) bool {\n    return cfg != nil && cfg.SpinnakerEndpoint() != \"\"\n}","tryCatchPattern":"_, err := spinnaker.NewFromConfig(cfg)\nif err != nil {\n    if strings.Contains(err.Error(), \"no spinnaker endpoint specified\") {\n        return fmt.Errorf(\"startup aborted: %w\", err) // fail fast before scheduling terminations\n    }\n    return err\n}","preventionTips":["Validate all required config keys (endpoint, user, credentials) at process startup with fail-fast checks","Commit a config template/example listing spinnaker.endpoint as required","Check the -config flag points at the intended file in each environment","Smoke-test NewFromConfig in CI against the real config file"],"tags":["go","config","spinnaker","startup","missing-config"],"backgroundTag":"missing-env-var","analyzedSha":"eaa28fb761c0ebe8644d1333e5d164e9cc3071e9","analyzedAt":"2026-09-03T17:04:39.020Z","contentChangedAt":"2026-09-03T17:04:39.020Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}