Just setup a dedicated VM running Windows Server 2...
# cfml-beginners
s
Just setup a dedicated VM running Windows Server 2012 with CF11 (up-to-date with hf19) to run a few legacy scripts that are not able to be refactored due to a need for a 32-bit ODBC connection. All of the scripts pull the data from a local ODBC and then push the data to our production server via
cfhttp
over an https protocol. What I can't seem to wrap my head around is that when I run these scripts in the browser using the resolved URL (not
localhost
, but that also works fine), all is right in the world. But when the scheduler runs them:
Copy code
"Error","DefaultQuartzScheduler_Worker-1","03/07/23","13:55:27",,"Connection Failure: Status code unavailable "
coldfusion.tagext.net.HttpTag$HttpConnectionFailureException: Connection Failure: Status code unavailable
	at coldfusion.tagext.net.HttpTag.connHelper(HttpTag.java:1311)
	at coldfusion.tagext.net.HttpTag.runCall(HttpTag.java:1413)
	at coldfusion.scheduling.CronTask.execute(CronTask.java:121)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
I already imported the production server's cert into the
castore
. Also the Root CA has been added to the
castore
b
@Sean Callahan Often times that error is related to a low-level SSL error which Adobe does a terrible job at reporting.
The
Status code unavailable
error is just a secondary error which typically masks the "real" error.
Are you running a
cfhttp
call yourself, or is this an HTTP request being made directly by the scheduled task?
The error may also just be a malformed URL.
re-reading your message, are you saying that you can put the URL into a CFHTTP call and it works, but the exact same URL put into a scheduled task fails?
s
The file running on this VM is something along the lines of this:
Copy code
<!--- file contents of getTaxCodes.cfm --->
<cfquery name="getTaxCodes" datasource="#request.dsn#">
	SELECT taxCode,
		   taxRate
	  FROM taxTable
	 WHERE taxClass = 'TX'
</cfquery>
<cfset taxCodeData = "">
<cfoutput query="getTaxCodes">
	<cfset taxCodeData &= trim(getTaxCodes.taxCode)>
	<cfset taxCodeData = ListAppend(taxCodeData, val(getTaxCodes.taxRate))>
	<cfset taxCodeData &= "|">
</cfoutput>
<cfhttp method="post" url="<https://www.productionServer.com/processTaxCodes.cfm>" timeout="6000">
	<cfhttpparam type="formfield" name="taxCodeData" value="#taxCodeData#">
</cfhttp>
This code was working just fine on our development server, but I'm porting all of these older scripts to this new VM so that I can update the development environment and production environment since the only thing that was holding them back was the need for this 32-bit connection. Basically when I run the URL of
<https://cf11Server.com/getTaxCodes.cfm>
in a browser, all works just fine. But when the CRON tries to run the scheduled job of that same URL, that's when I receive the error.
b
To be clear, is the CFHTTP call INSIDE of
getTaxCodes.cfm
what is failing, or is the initial CRON connection to
getTaxCodes.cfm
what fails?
Also, when we say "CRON", do you mean actual real literal Linux
cron
or just the ColdFusion task scheduler?
s
The ColdFusion task scheduler. The error in the original post is from the
exceptions.log
file.
From what I can see, it's the
cfttp
that is failing within the scheduled task, but only when it's being run as a scheduled task.
b
Can you comment the CFHTTP out that's inside the scheduled task for testing and see if everything else runs?
s
I'm going to make a dummy file really quick that doesn't even do anything, pop it into the scheduler, and make sure it fires without error.
👍 1
b
Because this stack trace
Copy code
"Error","DefaultQuartzScheduler_Worker-1","03/07/23","13:55:27",,"Connection Failure: Status code unavailable "
coldfusion.tagext.net.HttpTag$HttpConnectionFailureException: Connection Failure: Status code unavailable
	at coldfusion.tagext.net.HttpTag.connHelper(HttpTag.java:1311)
	at coldfusion.tagext.net.HttpTag.runCall(HttpTag.java:1413)
	at coldfusion.scheduling.CronTask.execute(CronTask.java:121)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
makes me think you're never even calling the original URL
That appears to be the scheduled task unable to connect to the original scheduled task URL, not the scheduled task running a cfm which raised another exception.
You'd presumably have a status code in that case, just a 500 one
s
Yeah, I was just looking at that too, which makes me wonder if the scheduler itself has an issue.
Yup, scheduler is failing all together. You mind if we take this to a DM so I can give you more info?