Skip to content
This repository was archived by the owner on Jul 18, 2022. It is now read-only.
This repository was archived by the owner on Jul 18, 2022. It is now read-only.

UnboundLocalError: local variable 'conf_values' referenced before assignment #146

@kitbeepan

Description

@kitbeepan

twistlock.conf contents are properly updated --
[default]
[pcc]
console_addr = https://twistlock-ctools.ews.int:8083
username = ewssvcsplunk

Screenshot of the setup page is also attached. But the integration fails due to this error:
10-27-2021 13:20:00.000 -0500 INFO ExecProcessor - setting reschedule_ms=300000, for command=/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/twistlock/bin/poll_incidents.py
10-27-2021 13:20:00.208 -0500 INFO ExecProcessor - message from "/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/twistlock/bin/poll_incidents.py" Prisma Cloud Compute poll_incidents script started.
10-27-2021 13:20:00.388 -0500 ERROR ExecProcessor - message from "/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/twistlock/bin/poll_incidents.py" Failed getting configuration from Splunk: ResourceNotFound('https://127.0.0.1:8089/servicesNS/nobody/twistlock/configs/conf-twistlock/None')
10-27-2021 13:20:00.390 -0500 ERROR ExecProcessor - message from "/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/twistlock/bin/poll_incidents.py" Traceback (most recent call last):
10-27-2021 13:20:00.390 -0500 ERROR ExecProcessor - message from "/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/twistlock/bin/poll_incidents.py" File "/opt/splunk/etc/apps/twistlock/bin/poll_incidents.py", line 229, in
10-27-2021 13:20:00.390 -0500 ERROR ExecProcessor - message from "/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/twistlock/bin/poll_incidents.py" main()
10-27-2021 13:20:00.390 -0500 ERROR ExecProcessor - message from "/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/twistlock/bin/poll_incidents.py" File "/opt/splunk/etc/apps/twistlock/bin/poll_incidents.py", line 194, in main
10-27-2021 13:20:00.390 -0500 ERROR ExecProcessor - message from "/opt/splunk/bin/python3.7 /opt/splunk/etc/apps
()
/twistlock/bin/poll_incidents.py" configs = generate_configs(session_key)
10-27-2021 13:20:00.390 -0500 ERROR ExecProcessor - message from "/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/twistlock/bin/poll_incidents.py" File "/opt/splunk/etc/apps/twistlock/bin/utils/splunk.py", line 59, in generate_configs
10-27-2021 13:20:00.390 -0500 ERROR ExecProcessor - message from "/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/twistlock/bin/poll_incidents.py" stanza = get_config_stanza(credential["realm"], session_key)
10-27-2021 13:20:00.390 -0500 ERROR ExecProcessor - message from "/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/twistlock/bin/poll_incidents.py" File "/opt/splunk/etc/apps/twistlock/bin/utils/splunk.py", line 43, in get_config_stanza
10-27-2021 13:20:00.390 -0500 ERROR ExecProcessor - message from "/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/twistlock/bin/poll_incidents.py" "console_addr": conf_values["console_addr"],
10-27-2021 13:20:00.390 -0500 ERROR ExecProcessor - message from "/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/twistlock/bin/poll_incidents.py" UnboundLocalError: local variable 'conf_values' referenced before assignmen
Uploading prisma-setup-screen.PNG…
t

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions