SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Remote agent, variables

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Remote agent, variables
Author Message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Remote agent, variables Reply with quote
Hi

I need to get program produced logging information back to the master scheduler from a remote agent, and I can't have a network share going from agent to scheduler machines.

Can something like getremotevariable in JAL help me? So if I have a job that runs on the remote server can I have a statement within it which sets a global variable (will it exist in the context of the remote agent or the scheduler?) and then harvest the value of that variable and use it to write the log in a subsequent job?

Also are master scheduler global variables mirrored to a standby scheduler on the fly?
Sun Oct 28, 2007 9:06 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7949

Post Reply with quote
Yes, you can Set global variable on the agent and then use GetRemoteVariable on the master to copy the information. Please note that in version 3.x memory variables are not replicated between master and standby. In version 4 global variables will be cashed in an ecrypted disk file and will be replicated to standby.

Another way to get remote logs or just transfer the data is to use FileTransfer, FileTransferEx and similar commands. For example, FileTransfer can be used to copy remote log file to the master computer. No network shares are involved and the file contents is transfered over the wire in compressed and encrypted format. The data is then extracted and decrypted on the master schedule computer.
Sun Oct 28, 2007 10:10 pm View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
So for the second idea involving filetransfer does the remote agent need to have a remote agent profile defined for the master scheduler?
Sun Oct 28, 2007 10:42 pm View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
I have job db security turned on for my master scheduler. When I turn my remote agent to master mode to put in the remote agent profile I can put in a valid username and password in the test connect details box and the connection is successful. However when I turn it back to remote agent mode and run a remote job from the master scheduler to use filetransfer it says connection failed, error code 50. Is that bad password? How can I specify the details if so?
Sun Oct 28, 2007 10:53 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7949

Post Reply with quote
Hmm... I think you are trying to push the log file from the agent. Why not simply grab it from the master? Just add FileTransfer to the notification action of the job to make it got to the agent and grab the log file. Same agent, same profile…


If you were to push the file from agent, you would need to define a profile for the master as you did. As far as I remember error 50 occurs when a connection cannot be established because the target server cannot be found or not responding.
Sun Oct 28, 2007 11:07 pm View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
Yep thats right, I'm trying to do it that way so I can do it in a single job rather than two.

I've just tried it without job sec turned on and it works, so it seems likely to be the issue.

Also filetransfer cannot transfer a zero byte file; not a biggie but slightly odd...
Sun Oct 28, 2007 11:11 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7949

Post Reply with quote
Yes, it cannot transfer zero length files. Internally it is considered to be a transmission error or file read error, 0 bytes transferred, which is odd, and well-known issue.

The solution is to always have something appended to the log file, for example, at the end of the run or as a separate command add cmd /C @echo END-OF-FILE >> myfile.log
Sun Oct 28, 2007 11:46 pm View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
How can I get around job sec blocking the filetransfer? I can't have job sec off in production.
Sun Oct 28, 2007 11:48 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7949

Post Reply with quote
Why you don't want the master to pull the remote log file as I described in the previous post?
Sun Oct 28, 2007 11:50 pm View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
The situation I want to do this stuff in is as part of a larger series of jobs; if I have to do it in two jobs that just makes it longer and more clunky.

How would you run a filetransfer operation between two master schedulers with job sec on? Surely it must be doable. I've tried synching the accounts in each scheduler.
Sun Oct 28, 2007 11:52 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7949

Post Reply with quote
There is no need for 2 jobs or a loop-back. Just check the job option to execute notification script on job finish event and in the notification script in the same job place FileTransfer command. Will that work for you?
Mon Oct 29, 2007 12:00 am View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
Clever. That will run in the master context if I'm not wrong.
Mon Oct 29, 2007 12:01 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7949

Post Reply with quote
By the way, the reason for 50 errors is you likely don't have your master scheduler setup to listen for network connections from other schedulers and agents. Do you have the "server" check box set in the Tools/Options menu, Network options tab?
Mon Oct 29, 2007 12:02 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.