Problems with ACF21 and scheduled tasks. I and so...
# adobe
e
Problems with ACF21 and scheduled tasks. I and some colleagues are working on migrating an app to ACF21 but the scheduled tasks refuse to run. They are apparently created fine and we can see them in the administrator, but no matter what settings we use (scheduling, one time, etc) they never run. Even running them manually doesn't work. No logs are found anywhere of anything happening or attempting to run on the server. Even adding a file output location for when things fail doesn't write out anything. Trying a CFHTTP tag with the schedule tasks' URL works fine and content is returned. Tried removing and adding back the task, restarting the server; nothing. I am scouring the internet trying to find possible solutions, but would love any ideas of what to look for.
a
The database schema changed if you're running as a cluster
e
Thanks John. Not a cluster.
a
Hmm, OK. So not that then.
😱 1
Are you going from 18 to 21?
e
16 to 21
Using the Adobe installer and updates to set this up on a Windows server.
Not docker or commandbox unfortunately.
a
So not migrating any scheduled tasks - they are all new?
e
The scheduled tasks are set up in the code of this app, through
<cfschedule...
. We can see them set up in the admin, but they never run.
And like I said, even new ones we create manually to test with, they never run.
a
Assume the same when you hit "play" from the CFIDE?
e
correct, NOTHING happens. No logs, no errors, no output.
Even though the admin UI says that it run successfully.
a
And they are http calls?
So nothing in the http.log at all?
e
Not really. They are tasks, mostly db stuff optimisations or backlog processing. I mentioned http because we tried calling the same URLs through the CFHTTP tag to see if they work, and they do.
a
But the scheduled task calls a script which does whatever? So it should fire an http request (from the scheduled task)
e
Sure, but there is nothing in any log.
a
yeah - very strange nothing in the console or http.log
not sure what to suggest. Can you run ACF with a console?
just wondering if that might show something which isn't going in a log file.
Is CF running as it's own user (think you have to use the IIS user on Windows if I recall correctly)
e
good suggestion. Currently it's running as a Windows service. Is that easy to stream to the console?
a
Is there anything in the Windows Event log
Not sure on Windows services I'm afraid
e
We already checked there, but that's a good suggestion, I can double check all the windows logs.
a
Do you have any anti-virus type software on the server? If you do check the logs of that as well to see if it's blocking outgoing requests / processes etc.
e
aha, did not think of that. I can double check that as well.
a
just throwing mud in the hope something sticks!
e
It's very frustrating. Everything else seemed to be fairly easy to figure out for the update. This one has us stumped.
a
you;d think if the cfhttp worked then scheduled task would though (at an anti-virus level) so wondering if the cron process is being stopped somehow.
e
exactly, which is why we run them through the CFHTTP tag to verify any potential issues with certificates or firewalls.
✅ 1
but the tasks basically call the same server, it's not even reaching out.
and they worked fine in 2016
a
it can venture into the outside world unless you using locahost / 127.0.0.1
but I think that's a red-herring here
✅ 1
r
Have you checked the security log of your application? When I moved from 2016 to 2021 the scheduled task requests no longer came from 127.0.0.1, but the IP address of the machine so our security scripts were blocking access.
j
Do you have all the updates installed for CF20201, including the JRE? I experienced issues in the past with tasks set to run over https, but there was a security issue with my SSL’s. I do recall it being a bit of “everything looks great, but it’s just not working” scenario.
Or if you’re running any type of self-signed certificates on the web server, they would need imported into the java keystore.
e
It is a self signed certificate for this one but even an http call fails, so that’s probably not it. Also, this is running jdk11 with acf2021 with the latest updates.
đŸ‘đŸ» 1
Thanks to all who chimed in. The issue ended up being a third party JAR file we were using for connecting to AppDynamics. That was no longer compatible with JDK11 and needed an update. It was something we actually thought of before the migration and we imported the newer connector, however the windows machine still pointed to the old one by mistake. That caused the quartz engine to fail silently.
👍 1
đŸ‘đŸ» 1
a
Is that in your classpath then? or loaded via this.javasettings ?
e
It’s not part of the site’s code. It’s injected as a classpath by devops, so the only way to find it is to go around the actual settings of the generated server. Needless to say, locally this was never an issue because everything runs on commandbox and we injected the new appdynamics JAR in the server.json file.
d
I have an issue with cf2021 not working with clustered scheduled tasks as they updated quartz to 2.4.0 but not all the jars - I tried a hotfix they did for me but it didn’t work with the online bundle stuff so gave up until they actually supply an update for cf2021 (no idea if update 10 helps here) - went to cf2023 in the end where it seems to be fixed. Not sure if that helps much but looking at the quartz jar versions may also shed some light onto your issue
e
Thanks @dougcain. Like I mentioned above, the issue has been resolved. It was an outdated AppDynamics JAR connector that caused the issue.