John you were right. It was a Postgres version issue. Good thinking!
I have another issue to work out now but I'd be surprised if I don't have it working by EOD:
Notable Error 1 on Action Status:
File 'nbtinsert.c', line 433, in _bt_check_unique from SERVER DETAIL: Key (id)=(ruletest_check-2370) already exists.
Notable Error 2 on Actions Status:
ConflictingIdError: 'Job identifier (ruletest_check-2370) conflicts with an existing job'
I will report back progress I've made but we appear to be past one hurdle....
------------------------------
Mr Coco
------------------------------
Original Message:
Sent: Fri November 06, 2020 08:21 AM
From: John Quirke
Subject: Help with Scheduler Function
What version of postgres are you using ?
The error that is displayed seems to point to an issue with postgres ....once I know what version we can determine if we support that version.
I am running on postgres 9.6 without issue.
This seems to be the issue with postgres.....
...postgresql.exceptions.AuthenticationMethodError: unsupported authentication request '<unknown>'(10)
Looks like postgres 10 ... can you confirm ?
------------------------------
John Quirke
Original Message:
Sent: Thu November 05, 2020 05:30 PM
From: Mr Coco
Subject: Help with Scheduler Function
Sorry I'm not sure how to do that from the container. I'm a newb there.
Would this be any easier if this wasn't Postgres running on the host OS but working from container (scheduler) to container (new postgres setup)? I'm not sure if there is a simple pre-configured Postgres container I could load to make it simpler?
Just thinking how to simplify....
------------------------------
Mr Coco
Original Message:
Sent: Thu November 05, 2020 04:50 PM
From: John Quirke
Subject: Help with Scheduler Function
This would be the expected connection string to your remote postgres database.
Ensure that your app host container can reach it ...
db_url=postgresql+pypostgresql://<user>:<pwd>@<host>:<port>/<db>
------------------------------
John Quirke
Original Message:
Sent: Thu November 05, 2020 04:30 PM
From: John Quirke
Subject: Help with Scheduler Function
Let me try and set this up in our app host environment (currently on 1.0.1 without PostgreSQL)
I see our setup doesn't have the postgres setup.
Which version of fn_scheduler are you on (latest is 1.03)
I have a remote PostgreSQL database which I can connect to.
------------------------------
John Quirke
Original Message:
Sent: Thu November 05, 2020 02:26 PM
From: Mr Coco
Subject: Help with Scheduler Function
We have scheduler running on the AppHost and Postgres (not-containered). I can connect via PSQL remotely just fine to Postgres so it's not a connectivity issue from what I see.
Unfortunately, the Download Logs gives me an error "Unable to complete the action due to an unexpected error. Access the logs using the following command on the App Host: sudo appHostPackageLogs". I ran the log collection from the CLI and attached but it really doesn't tell me much in the synchronizer or operator log.
The app and workflow status will just stay running / pending and never do anything.
------------------------------
Mr Coco
Original Message:
Sent: Wed November 04, 2020 07:06 AM
From: John Quirke
Subject: Help with Scheduler Function
Mr Coco
Could you send us your logs from app host
Administrator Settings - Apps - fn_scheduler - Details - Download logs (button on bottom right)
Also please check you action status from your incident window, under the Actions drop down menu for any errors and share.
As Sean indicate the db_url has to be un-commented and configured correctly.
Also please share your updated app.config
Regards
John
Any miss configuration should throw an error in the logs and hopefully will help troubleshooting your issue
------------------------------
John Quirke
Original Message:
Sent: Mon November 02, 2020 12:32 PM
From: Mr Coco
Subject: Help with Scheduler Function
Thanks Sean! I appreciate the help.
We setup Postgres (non-Docker) and configured but it still seems to just be hanging never populating the Scheduler data tables. I don't see any errors or know where to really look for that on AppHost.
Note, we haven't been using Docker or know what all we should do if we wanted to go that route. Do you have any suggestions for us if we were wanting to install it with a Postgres image that we could use to help us leverage Scheduler? Sorry, this is a little out of our comfort zone...
------------------------------
Mr Coco
Original Message:
Sent: Wed October 28, 2020 05:24 AM
From: Sean OGorman
Subject: Help with Scheduler Function
Hi there,
You are required to set this line:
db_url=postgresql+pypostgresql://username:password@host:port/database
to real values... as an example, you can spin up a container:
docker|podman run -d --name postgresql_database_test -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=pass -e POSTGRESQL_DATABASE=db -p 5433:5432 rhscl/postgresql-96-rhel7
The corresponding config line would be:
db_url=postgresql+pypostgresql://user:pass@<IP|URL>:5433/db
Hope that helps!
------------------------------
Sean OGorman
Original Message:
Sent: Tue October 27, 2020 01:55 PM
From: Mr Coco
Subject: Help with Scheduler Function
Mine shows the following:
# timezone. ex: utc, America/New_York
timezone = cdt
# number of rules which can run in parallel
thread_max = 20
# directory for the sqlite persistent db
#datastore_dir =
# db url if using a postgreSQL DB. Use this with AppHost
#db_url=postgresql+pypostgresql://username:password@host:port/database
Does this all have to be configured on my AppHost to work? Seems that db_url is not set but we are using postgres. I will need to review the logs but what I noticed was the Workflow & Action Status running in perpetuity with no change in the state with no jobs loading in the scheduler tables after.
------------------------------
Mr Coco
Original Message:
Sent: Tue October 27, 2020 12:13 PM
From: John Quirke
Subject: Help with Scheduler Function
Have you your sql persistant database configured and referenced correctly in your app.config ...
[fn_scheduler]
timezone = utc
thread_max = 20
datastore_dir=<sql db>
Are there any messages in the logs you can share that may indicate an issue ?
------------------------------
John Quirke
Original Message:
Sent: Tue October 27, 2020 10:06 AM
From: Mr Coco
Subject: Help with Scheduler Function
I thought I would start by giving my use case and see if anyone might be able to help with some struggles I am seeing with the Scheduler function.
I am using it on an App Host and I need to:
Run 1 specific artifact rule on all incidents that are active and contain a unique artifact type to my environment every 5 minutes using a Call REST API workflow (from fn_utilities) I've built.
I am trying to just test this on an artifact inside an incident using the default rule "Schedule a Rule to Run - Artifact" to see how it'll work and it enters the workflow status but never ends up doing anything and never populates in the Scheduler data table. With that said, I would like to automate this so all my incidents automatically re-run this workflow every 5 minutes until they are closed.
Does anyone have an idea how to accomplish this or is this a problem with the function hanging? Thanks!
------------------------------
Mr Coco
------------------------------