Skip to main content

Troubleshooting Agents

FAQ

Q: How do I exclude specific files from a watch folder from being uploaded for an agent that uploads files and runs flows?

A: To exclude specific files from being uploaded, you can use the fp function to specify which files should be included. For example, to exclude files that contain the string "exclude" in the filename, you can use the following code:

    def fp_res(x: str):
x = parse.unquote(x)

# files excluding temp files
files_to_capture = [filename in glob.glob(os.path.join(watch_dir, pattern), recursive=True) if not 'exclude' in filename]

return files_to_capture

return fp_res

Q: How do I capture a file that is periodically overwritten by an instrument?

A: File watcher Agents automatically capture modified files, which they then upload for processing in flows. You can implement logic within the flow or agent to handle the intended behavior, depending on whether the instrument appends to or overwrites the file.

Q: Can I access environment secrets from the Agent?

A: Yes, environment secrets can be accessed from the Agent by using the get_secret method.

Q: Can I access an environment variable from a cron Agent? For example, can I access the input_path variable configured upon installation?

A: Yes, environment variables can be accessed from a cron Agent through the kwargs dictionary. For example, to access the input_path variable, you can use the following code:

# .get method for dictionries is used to handle the case where the variable may not be present without erroring out
# note: assumes DEFAULT_PATH is configured in the agent
watch_directory = Path(kwargs.get("vars", {}).get("input_path", DEFAULT_PATH))

Q: Are there any command-line scripts (e.g. - .vbs or .bat) that need to run for Windows Agents to work?

A: No, there are no command-line scripts that need to execute for the Windows Agent.

Q: Are there any known application dependencies or pre-requisites for the Windows Agent (e.g. - .NET, KBs, Redist)?

A: No, the full set of Agent requirements can be found on the Agent System Requirements page.

Troubleshooting

Issue: I am unable to install an Agent Connection on Windows; the installer is failing at the final step.

Ensure that you are running the installer as an administrator.

Check for existing installations that might conflict with the current installation:

  • Open Task Manager and navigate to the Services tab.
  • Look for any service starting with "GanymedeAgent-" and stop it by right-clicking and selecting "Stop."
  • Open "Add or Remove Programs" and uninstall any existing Ganymede Agent installations.
  • Try installing the Agent again.

Issue: I've installed an Agent Connection, but do not see the Connection in logs.

This is likely a network issue, which can be confirmed by testing connectivity.

Another way to confirm this is to see

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate`

in the Connection logs file found locally on the computer. These logs can be found in the directory that the Agent Connection is installed in.

To resolve, ensure that outbound port 443 communication is available to the web addresses mentioned on the Agent System Requirements page.

Issue: The Agent Connection is not actively running. How do I check?

On Windows:

  • Open Task Manager and navigate to the Services tab.
  • Look for the Connection of interest (a service with a name starting with "GanymedeAgent-") and verify that its status is "Running."
  • If the service is not running, right-click on it and select "Start." Connections are configured to start upon reboot by default.

On Linux:

  • Open a terminal and run the following command to check the Agent's status:

    sudo systemctl status GanymedeAgent-<agent_name>

    If the Agent is installed but not running, you can start it by running:

    sudo systemctl start GanymedeAgent-<agent_name>

Issue: Agent Connection is showing as disconnected after running for a while

On Windows:

  • Ensure that the PC where the Agent is installed is not asleep. PCs running cron Agents should be configured to never sleep:
    • Open the Control Panel and navigate to "Hardware and Sound" -> "Power Options."
    • Select "Change when the computer sleeps" and set "Put the computer to sleep" to "Never."
  • Verify that the system time is properly synced:
    • Right-click on the time in the bottom right corner of the screen and select "Adjust date/time."
    • Ensure that "Set time automatically" is enabled, and click "Sync now."

Issue: The flow is failing to trigger when files are being dropped

On Windows:

Look at the logs for the agent in Ganymede App. If you see the JWT error below, click on the system clock in the lower right corner of the screen and select "Adjust date/time". Ensure that the "Set time automatically" option is enabled, and click "Sync now".

_thread.ExceptHookArgs(exc_type=<class 'google.auth.exceptions.RefreshError'>, exc_value=RefreshError('invalid_grant: Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values in the JWT claim.', {'error': 'invalid_grant', 'error_description': 'Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values in the JWT claim.'})
  • Right-click on the system clock and select "Adjust date/time."
  • Ensure that "Set time automatically" is enabled, and click "Sync now."

Verify that the watch folder is correctly specified during Agent installation.

-v "input_path=C:/Users/<username>/Desktop/watch_folder"
Take care when copying and pasting commands

Be careful when copying and pasting commands. The quote character " can sometimes be replaced with left or right quotes ( or ), which may cause issues. Always ensure that the straight quote character " is used.

Issue: All files are present in the watched directory, but the flow does not trigger. The logs show files being collected in two different waiting groups.

A: Unquote the string referenced within the fp function, which specifies which filename patterns the Agent should watch for. An example is shown below:

def fp(watch_dir: str, parent_dir: str, pattern: str) -> Callable[[str], bool]:
def fp_res(x: str):
x = parse.unquote(x)
return x in glob.glob(os.path.join(watch_dir, pattern), recursive=True)

return fp_res