The Foreground Process (DNS Connection) working Fine But the Background Process is not working.


cache version : Cache for Windows (*86-64) 2015.1 (Build 429).

Windows Server 2008 R2 Standard.

oracle in OraClient12Home1 (64-bit).

We Configured cache and odbc in above environment. And we checked ODBC connection, it also working fine.
And then we tried to connect the ODBC through the background but it's ending with gateway failed error.
And again we tried the same process in foreground, it's working fine and also we got the data from the database.
we checked the license key and cache privileges,all are good.
But we will not sure why it's not connecting in background.

we got the information from the database by using this foreground command(d ^rvExt2012).

And we got the gateway failed error while we using J ^rvExt2012 background command.

  • 0
  • 0
  • 61
  • 1
  • 1


If your routine works in a terminal session (by issuing a DO ^Routinname command) but does not work, when the same routine is started via the Job commannd (JOB ^Routinname) then you lack something in background, what you have in the foreground.

Put an errortrap in your routine and simple report a possible error (and if you wich, additionally the execution progress of your routine).


rvExt2012 ; Test
    set $zt="bgErr"
    // ...
    // ...
    do signal("checkpoint 1") // this is optional
    // ...
    // ...    do signal("checkpoint 2") // this is optional
    // ...
    // ...
    do signal("Done")

bgErr do signal("Error: "_$ze)

signal(msg) do $system.Event.Signal($zp, $username_", "_$roles_", "_msg)


Now, in the terminal session enter following  line


job ^rvExt2012 do { set $lb(s,m)=$system.Event.WaitMsg("",1) write m,! } while s



Thanks Julius, we already put the errortrap in our routine below details we gathered from the trap:
msg                   :    "0 "_$lb($lb(6022,"DSN/User Connect",,,,,,,,))/* ERROR #6022: Gateway failed: DSN/User Connect. */
$username    :    "_system"
$roles               :    %All

we need the solution for above Error message.