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

Unable to startup "context canceled" #40

Closed
covert8 opened this issue Jun 28, 2024 · 3 comments
Closed

Unable to startup "context canceled" #40

covert8 opened this issue Jun 28, 2024 · 3 comments

Comments

@covert8
Copy link

covert8 commented Jun 28, 2024

When trying to start the following error is presented

The zone in question has two A records root and www.
Its either a http context or it's trying to save the turnstile password somewhere readonly, but i can't really follow the flow easily.
Connection to the lapi is working as a json blob is visible in the debug log.

DEBU[0009] Done listing existing turnstile widgets       account=redacted
DEBU[0009] Done cleaning up existing turnstile widgets   account=redacted
DEBU[0009] Listing worker routes                         account=redacted zone=redacted.com
DEBU[0009] Done listing worker routes                    account=redacted zone=redacted.com
DEBU[0009] Deleting worker route with ID 11111  account=redacted zone=redacted.com
DEBU[0010] Done deleting worker route with ID 11111  account=redacted zone=redacted.com
DEBU[0010] Deleting worker route with ID 11111  account=redacted zone=redacted.com
DEBU[0011] Done deleting worker route with ID 11111  account=redacted zone=redacted.com
DEBU[0011] Listing worker KV Namespaces                  account=redacted
DEBU[0011] Done listing worker KV Namespaces             account=redacted
DEBU[0011] Deleting worker KV Namespace with ID 11111  account=redacted
DEBU[0013] Done deleting worker KV Namespace with ID 11111  account=redacted
DEBU[0013] Attempting to delete worker script crowdsec-cloudflare-worker-bouncer  account=redacted
DEBU[0014] Deleted worker script crowdsec-cloudflare-worker-bouncer  account=redacted
INFO[0014] Done cleaning up existing workers             account=redacted
FATA[0014] context canceled            
crowdsec_config:
  lapi_url: "http://crowdsec-service.crowdsec:8080/"
  lapi_key: redacted
  update_frequency: 10s
  insecure_skip_verify: true
  include_scenarios_containing: [] # ignore IPs banned for triggering scenarios not containing either of provided word
  exclude_scenarios_containing: [ssh,http-bad-user-agent] # ignore IPs banned for triggering scenarios containing either of provided word
  only_include_decisions_from: [] # only include IPs banned due to decisions orginating from provided sources. eg value ["cscli", "crowdsec"]
  key_path: ""
  cert_path: ""
  ca_cert_path: ""
cloudflare_config:
  accounts:
    - id: redacted
      token: "redacted"
      account_name: redacted.com
      ip_list_prefix: crowdsec
      default_action: ban
      zones:
        - zone_id: redacted # 
          actions: # supported actions for this zone. eg value ["ban", "captcha"]
            - ban
          default_action: ban
          routes_to_protect:
            - "redacted.com/"
            - "www.redacted.com/"
@covert8
Copy link
Author

covert8 commented Jun 28, 2024

followed the flow, problem was the prometheus listener

@covert8 covert8 closed this as completed Jun 28, 2024
@blotus
Copy link
Member

blotus commented Jun 28, 2024

Hello,

Do you have more information ? Was the bouncer failing to setup the prometheus handler ?
If so, that's likely a bug, as failing to setup the handler should probably not cause the bouncer to exit.

@covert8
Copy link
Author

covert8 commented Jun 28, 2024

Yes it did, I'll replicate it monday.

The listen() was failing because of a "*" in the addr

prometheus:
  enabled: true
  listen_addr: "*"
  listen_port: "2112"

Changing to "0.0.0.0" solved it. Bad habit of me working in some ipv6 only clusters I'm guessing.

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