Running a job in batch using ssh

I have a suite created and I can run the job from a command line with success. If I write a script and ssh to the server running Eggplant and try and run the command line, I get error message:

RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
2008-12-10 14:20:46.765 Eggplant.bk[37742:10b] An uncaught exception was raised
2008-12-10 14:20:46.766 Eggplant.bk[37742:10b] Error (1002) creating CGSWindow
2008-12-10 14:20:46.774 Eggplant.bk[37742:10b] ReportException:Error (1002) creating CGSWindow
2008-12-10 14:20:46.774 Eggplant.bk[37742:10b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1002) creating CGSWindow'
2008-12-10 14:20:46.775 Eggplant.bk[37742:10b] Stack: (
2451259723,
2420019451,
2451259179,
2451259242,
2439588984,
2439583835,
2438648743,
2438645861,
2438644258,
2438632496,
2438631409,
2438629138,
2438589970,
2438588276,
2438587319,
2438587125,
731213,
2438759931,
2438631409,
2438629138,
2438589970,
2438588276,
2438587319,
2438587125,
2438586276,
12418,
12201
)
/Applications/Eggplant4.12.app/runscript: line 16: 37742 Trace/BPT trap $0/../Eggplant.bk

Granted I am a newbie so it is user error :D

Here is my script. Please advise
#!/bin/ksh
# Linux/UNIX box with ssh key based login enabled
SERVER="rita.unx.cet.com"

# SSH User name
USR="timmy"

ssh [email protected]  /Applications/Eggplant4.12.app/runscript  /net/ge.unx.cet.com/vol/vol2/u21/timmy/eggplant/Create_DataMart.suite /net/ge.unx.cet.com/vol
/vol2/u21/timmy/eggplant/Create_DataMart.suite/Scripts/Create_DataMart.script -host abmel.na.cet.com -port 5900 -password 11111 -CommandLineOutput YES



Note:
I have commented out the command line and just used the ssh portion of the code and successfully logged in

Comments

  • EggplantMattEggplantMatt ForumAdmin admin
    I believe that since you're running under a user account that is not logged in, you need to run the commands using sudo.
  • EggplantMatt,

    I am able to run this on the sever from a command line so sudo doesn't seem to be an issue. I don't need root access. ANy other suggestions?
  • SenseTalkDougSenseTalkDoug ForumAdmin admin
    Eggplant requires a connection to the WindowServer. When you ssh into an account that is not logged on in Mac OS X there is no WindowServer process available, so you get this error. To deal with this, I believe you can either leave a user logged in, and ssh to that account, or ssh to the root account which I think always has access to the WindowServer. Neither of these is ideal, but those are the restrictions put in place by the operating system (presumably for security reasons). I can't find the exact details right now, but I believe this information is correct, and hopefully will point you toward a solution.
  • Sensetalk,

    I am logged into the rita server at time of running this script with the same user id and password as I am using to ssh. If you can provide any more detailed information, It would be greatly appreciated
Sign In or Register to comment.