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

Broker does not log nor panic on listener setup errors #1057

Closed
2 tasks
sgnn7 opened this issue Dec 24, 2019 · 4 comments
Closed
2 tasks

Broker does not log nor panic on listener setup errors #1057

sgnn7 opened this issue Dec 24, 2019 · 4 comments

Comments

@sgnn7
Copy link
Contributor

sgnn7 commented Dec 24, 2019

Our connectors do not exit when there’s a problem with them starting and on top of it, on some errors we don’t log what the problem is.

Example problematic config (though others can apply fine):

version: 2
services:
  some-connector:
    connector: generic_http
    listenOn: tcp://0.0.0.0:8080
    credentials:
      jwtToken:
        from: literal
        get: some-value
    config:
      headers:
        ClientID: "12345678"
        ClientSecret: "{{ .jwtToken }}"
      forceSSL: true
      match:
        - ^http

AC:

  • Add fatal exit on any connector errors
  • Log all startup errors
@sgnn7
Copy link
Contributor Author

sgnn7 commented Dec 24, 2019

CC: @izgeri

@sgnn7
Copy link
Contributor Author

sgnn7 commented Dec 26, 2019

Draft PR that may need tests for it: #1059

@sgnn7
Copy link
Contributor Author

sgnn7 commented Jan 2, 2020

CR ready: #1059

@izgeri
Copy link
Contributor

izgeri commented Jan 9, 2020

This was released in v1.4.2

Note that before this change was released, if you ran Secretless with the config above Secretless would hang on startup at the following line:

2020/01/09 13:42:54 Secretless v1.4.1-dev starting up...
2020/01/09 13:42:54 Initializing health check on :5335...
2020/01/09 13:42:54 Initialization of health check done. You can access the endpoint at `/live` and `/ready`.
2020/01/09 13:42:54 [WARN]  Plugin hashes were not provided - tampering will not be detectable!
2020/01/09 13:42:54 Trying to load configuration file: ../secretless-other/test.yml
2020/01/09 13:42:54 Registering reload signal listeners...

with these changes, however, Secretless dies and shares an error message related to the problem:

2020/01/09 13:54:19 Secretless v1.4.2-dev starting up...
2020/01/09 13:54:19 Initializing health check on :5335...
2020/01/09 13:54:19 Initialization of health check done. You can access the endpoint at `/live` and `/ready`.
2020/01/09 13:54:19 [WARN]  Plugin hashes were not provided - tampering will not be detectable!
2020/01/09 13:54:19 Trying to load configuration file: ../secretless-other/test.yml
2020/01/09 13:54:19 Registering reload signal listeners...
2020/01/09 13:54:19 [WARN]  Starting HTTP listener on 0.0.0.0:8080...
2020/01/09 13:54:19 [ERROR] configuration parsing of 'generic_http' failed: 'authenticateURLsMatching' key has incorrect type, must be a string or list of strings
2020/01/09 13:54:19 [ERROR] Fatal error in 'HTTP Proxy on tcp://0.0.0.0:8080': unable to create HTTP proxy service on 'tcp://0.0.0.0:8080': 'authenticateURLsMatching' key has incorrect type, must be a string or list of strings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment