 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
Anil
Joined: 24 Nov 2006 Posts: 14
|
|
Script conversion |
|
Hi, I need to schedule all workflows running on Unix server. These workflows are Informatica application workflows which will pull the data from datbase as per scheduled. These workflows runs within the Informatica server sitting on Sun Solaris 5.9 UNIX box. Right now I have scripts which was written to do these operations on following scenario - Everything running on one single Windows machine which was written using JAL. I need to modify it to work under my environment. I tried following option - 24x7 scheduler installed on Unix and imported the existing job database, since it is not supposed to work in UNIX, I couldn't even open the script on UNIX machine even though it was imported. I am planning to try this option - Install remote agent on UNIX machine and have 24x7 master scheduler on Windows and run the scripts from Windows. What changes I have to make for this solution to work? If any other alternative is there, please help me out. Thanks, Anil : Generally speaking the answer is "No." However the efficient : solution might depends on what you are doing. In some cases it is possible : to scripts on Windows but execute operations on a Unix host. Please : describe what you are doing so we can start helping you.
|
|
Mon Nov 27, 2006 2:23 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: Script conversion |
|
Don't do this!!!!! You should read the documentation first. Please please don't make any assumptions before you read the documentation. As for the help with the conversion, let us know whow you run Informatica, we need to have JAL script sample to advise the best way for automating yor UNIX stuff. : Hi, : I need to schedule all workflows running on Unix server. These workflows are : Informatica application workflows which will pull the data from datbase as : per scheduled. These workflows runs within the Informatica server sitting : on Sun Solaris 5.9 UNIX box. : Right now I have scripts which was written to do these operations on : following scenario - Everything running on one single Windows machine : which was written using JAL. : I need to modify it to work under my environment. : I tried following option - 24x7 scheduler installed on Unix and imported the : existing job database, since it is not supposed to work in UNIX, I : couldn't even open the script on UNIX machine even though it was imported. : I am planning to try this option - Install remote agent on UNIX machine and : have 24x7 master scheduler on Windows and run the scripts from Windows. : What changes I have to make for this solution to work? : If any other alternative is there, please help me out. : Thanks, : Anil
|
|
Mon Nov 27, 2006 2:56 pm |
|
 |
Anil
Joined: 24 Nov 2006 Posts: 14
|
|
Re: Script conversion |
|
Hi, Please find one of the scripts doing operation: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AutoConfig("runone") Dim( job_id, Number ) Dim( out_hdr, String ) Dim( out_msg, String ) Dim( log_file, String ) Dim( Error_chk, Boolean, false ) // pm_go routine needs to return something - so job_id - but we don't use it Dim( pm_folder, String, "XXX" ) Dim( pm_workflow, String, "XXX" ) // filled in below // these variables are the same for all executions of pm_go - they wouldn't have to be Dim( pm_log_file_dir, String, "E:\\apps\\Informatica Data\\SkdLogs\\" ) Dim( pm_bat_file_dir, String, "E:\\apps\\Informatica Data\\SrcFiles\\" ) Dim( pm_runwait_secs, Number, 30 ) Dim( pm_loopwait_secs, Number, 30 ) Dim( pm_mins_between_logmsgs, Number, 15 ) Dim( pm_max_mins_run_cyc, Number, 30 ) Dim( pm_max_mins_run_tot, Number, 60 ) // testing parms for 'quick loops' //Dim( pm_runwait_secs, Number, 2) //Dim( pm_loopwait_secs, Number, 3) //Dim( pm_mins_between_logmsgs, Number, 1) //Dim( pm_max_mins_run_cyc, Number, 1) //Dim( pm_max_mins_run_tot, Number, 2) //Set( pm_folder, "QATDW_PassPort" ) //Set( pm_workflow, "wf_test" ) //pm_go( pm_folder, pm_workflow, pm_log_file_dir, pm_bat_file_dir, pm_runwait_secs, pm_loopwait_secs, pm_max_mins_run_cyc, pm_max_mins_run_tot, pm_mins_between_logmsgs, job_id ) // pm_go is the library script which does all the work. we call it below for each workflow we want to run // pm_go also calls the library script pm_stats // DataWarehouse WORK FLOWS OnErrorResumeNext( ) Concat( global.rt_env, "DW_Passport3", pm_folder ) Set( pm_workflow, "wf_dw_load_bus_crit_ph1" ) pm_go( pm_folder, pm_workflow, pm_log_file_dir, pm_bat_file_dir, pm_runwait_secs, pm_loopwait_secs, pm_max_mins_run_cyc, pm_max_mins_run_tot, pm_mins_between_logmsgs, job_id ) IsGreater(job_id,1,Error_chk) If(Error_chk,FINISHED,ERROR) FINISHED: LogAddMessageEx( "INFO", "@V"job_id"", "@V"job_name"", "24x7 Job has Finished." ) ConcatEx( "INFO ", "@V"job_name"", " 24x7 Job has Finished.", out_hdr ) ConcatEx( "see 24x7 complete schedule log for details >>> ", global.skd_log, out_msg ) MailSend( global.info_sender, "", global.dw_info_group, out_hdr, out_msg ) ERROR: LogAddMessageEx( "ERRORS", "@V"job_id"", "@V"job_name"", "24x7 Job has Finished with Errors." ) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thanks, Anil : Don't do this!!!!! You should read the documentation first. Please please : don't make any assumptions before you read the documentation. : As for the help with the conversion, let us know whow you run Informatica, we : need to have JAL script sample to advise the best way for automating yor : UNIX stuff.
|
|
Mon Nov 27, 2006 3:05 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: Script conversion |
|
The answer lies in pm_go. What exactly does this user-defined statement do? : Hi, : Please find one of the scripts doing operation: : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ : AutoConfig("runone") : Dim( job_id, Number ) : Dim( out_hdr, String ) : Dim( out_msg, String ) : Dim( log_file, String ) : Dim( Error_chk, Boolean, false ) : // pm_go routine needs to return something - so job_id - but we don't use it : Dim( pm_folder, String, "XXX" ) : Dim( pm_workflow, String, "XXX" ) : // filled in below : // these variables are the same for all executions of pm_go - they wouldn't : have to be : Dim( pm_log_file_dir, String, "E:\\apps\\Informatica : Data\\SkdLogs\\" ) : Dim( pm_bat_file_dir, String, "E:\\apps\\Informatica : Data\\SrcFiles\\" ) : Dim( pm_runwait_secs, Number, 30 ) : Dim( pm_loopwait_secs, Number, 30 ) : Dim( pm_mins_between_logmsgs, Number, 15 ) : Dim( pm_max_mins_run_cyc, Number, 30 ) : Dim( pm_max_mins_run_tot, Number, 60 ) : // testing parms for 'quick loops' : //Dim( pm_runwait_secs, Number, 2) : //Dim( pm_loopwait_secs, Number, 3) : //Dim( pm_mins_between_logmsgs, Number, 1) : //Dim( pm_max_mins_run_cyc, Number, 1) : //Dim( pm_max_mins_run_tot, Number, 2) : //Set( pm_folder, "QATDW_PassPort" ) : //Set( pm_workflow, "wf_test" ) : //pm_go( pm_folder, pm_workflow, pm_log_file_dir, pm_bat_file_dir, : pm_runwait_secs, pm_loopwait_secs, pm_max_mins_run_cyc, : pm_max_mins_run_tot, pm_mins_between_logmsgs, job_id ) : // pm_go is the library script which does all the work. we call it below for : each workflow we want to run : // pm_go also calls the library script pm_stats : // DataWarehouse WORK FLOWS : OnErrorResumeNext( ) : Concat( global.rt_env, "DW_Passport3", pm_folder ) : Set( pm_workflow, "wf_dw_load_bus_crit_ph1" ) : pm_go( pm_folder, pm_workflow, pm_log_file_dir, pm_bat_file_dir, : pm_runwait_secs, pm_loopwait_secs, pm_max_mins_run_cyc, : pm_max_mins_run_tot, pm_mins_between_logmsgs, job_id ) : IsGreater(job_id,1,Error_chk) : If(Error_chk,FINISHED,ERROR) : FINISHED: LogAddMessageEx( "INFO", : "@V"job_id"", "@V"job_name"", : "24x7 Job has Finished." ) : ConcatEx( "INFO ", "@V"job_name"", " 24x7 : Job has Finished.", out_hdr ) : ConcatEx( "see 24x7 complete schedule log for details >>> : ", global.skd_log, out_msg ) : MailSend( global.info_sender, "", global.dw_info_group, out_hdr, : out_msg ) : ERROR: LogAddMessageEx( "ERRORS", "@V"job_id"", : "@V"job_name"", "24x7 Job has Finished with : Errors." ) : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ : Thanks, : Anil
|
|
Mon Nov 27, 2006 3:19 pm |
|
 |
Anil
Joined: 24 Nov 2006 Posts: 14
|
|
Re: Script conversion |
|
Even I wasn't able to find anything about its definition. I guess this is the call to routine. I couldn't find the definition of this routine anywhere in any of the scripts. I would like to provide you the .DAT file which contains all scripts in it. So please could you let me know where should I FTP this .DAT file? : The answer lies in pm_go. What exactly does this user-defined statement do?
|
|
Mon Nov 27, 2006 3:31 pm |
|
 |
Anil
Joined: 24 Nov 2006 Posts: 14
|
|
Re: Script conversion |
|
Hi Dmitriy, Based on your inputs, I did following changes and after making these changes, I tried to connect to the remote UNIX server on which RA Agent is running thru the script running on Windows Master Scheduler. 1. Installed 24x7 agent on UNIX - Running 2. updated pm_go and pm_stats script in 24x7 to use RAFILExxx commands instead of FILE commands as well as update RunAndWait with RARunAndWait. 3. Made changes to paths in the scripts to take it from UNIX box (For example, /data/informatica……..) 4. Added “RAConnect” in the IsAlive script to test connectivity & I get following error message: Remote access error:recv call failed. However I couldn’t find solution for this in the documentation. However the remote agent is running on the remote machine and I verified, so listener on UNIX is listening to the Windows machine. So please could you let me know, whether I am doing anything wrong here. Please guide me to move further. Thanks, Anil SysOp wrote: ------------- I think the easiest path is to get 24x7 RA agent installed on your Unix machine and update pm_go and pm_stats script in 24x7 to use RAFILExxx commands instead of FILE commands as well as update RunAndWait with RARunAndWait. This kind of change can be done fairly fast. However you still need to update your scripts to work with Unix files, I am sure your Unix files have different extensions, Unix file path names use / vs. Windows \ separators, monitored files likely have \n as the end of line separators vs. \r\n. Some other generic Windows-to-Unix portaibility things must be also taken #####e of in order to make it all work. All these suggested changes are based on the assumption that Informatica for Unix works just as its Windows version. Please let me know which type of Unix system you run and I will suggest which agent you need to grab for it. Regards,
|
|
Mon Dec 04, 2006 8:06 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: Script conversion |
|
"Remote access error:recv call failed" error indicates either that the scheduler couldn't find the agent or some incompatible versions of agent and RA_Client.dll are run on both ends. The most recent version of RA_Client.dll can be found here http://www.softtreetech.com/24x7/fixes/ra_client.dll Before you download it, read the following 1. To verify the RA agent is running on the agent computer execute netstat -a Look at the output and make sure the agent is listening on port 1096. 2. If yes, verify you can reach agent's computer from the scheduler computer using a temp job executing something like Dim status, boolean PingPort "agent computer IP address here", 1096, status MessageBox status 3. If 1 and 2 succeed then the problem is likely in RA_Client.dll 4. Also, look at the /var/log/ra_server.log log file on the agent computer and check it for error messages or user authorization errors : Hi Dmitriy, : Based on your inputs, I did following changes and after making these changes, : I tried to connect to the remote UNIX server on which RA Agent is running : thru the script running on Windows Master Scheduler. : 1. Installed 24x7 agent on UNIX - Running : 2. updated pm_go and pm_stats script in 24x7 to use RAFILExxx commands : instead of FILE commands as well as update RunAndWait with RARunAndWait. : 3. Made changes to paths in the scripts to take it from UNIX box (For : example, /data/informatica……..) : 4. Added “RAConnect” in the IsAlive script to test connectivity & I get : following error message: Remote access error:recv call failed. : However I couldn’t find solution for this in the documentation. : However the remote agent is running on the remote machine and I verified, so : listener on UNIX is listening to the Windows machine. : So please could you let me know, whether I am doing anything wrong here. : Please guide me to move further. : Thanks, : Anil : SysOp wrote: ------------- : I think the easiest path is to get 24x7 RA agent installed on your Unix : machine and update pm_go and pm_stats script in 24x7 to use RAFILExxx : commands instead of FILE commands as well as update RunAndWait with : RARunAndWait. This kind of change can be done fairly fast. However you : still need to update your scripts to work with Unix files, I am sure your : Unix files have different extensions, Unix file path names use / vs. : Windows \ separators, monitored files likely have \n as the end of line : separators vs. \r\n. Some other generic Windows-to-Unix portaibility : things must be also taken #####e of in order to make it all work. All : these suggested changes are based on the assumption that Informatica for : Unix works just as its Windows version. : Please let me know which type of Unix system you run and I will suggest which : agent you need to grab for it. : Regards,
|
|
Tue Dec 05, 2006 9:20 am |
|
 |
Anil
Joined: 24 Nov 2006 Posts: 14
|
|
Re: Script conversion |
|
Hi, Even after trying these things I am still having problem running script & I am getting "Remote access error:recv call failed" error message. 1. I verified that I can reach the agent from scheduler by running the temp job script mentioned by you and listening to port 1096. 2. Ra_client.dll version I have on the Windows machine is same as the one from the link provided which is 2.0.0.4. However I didn't find the the ra_client.dll on UNIX machine where agent is running. I could see only .jar files under the 24x7 installation directory since it is Multiplatform Java edition. 3. I couldn't locate ra_server.log file under /var/log directory, however I have a file called scheduler.log under 24x7 installation directory which provides information like remote agent starting with time it started. So please could you let me know what might be wrong here Thanks, Anil : "Remote access error:recv call failed" error indicates either that : the scheduler couldn't find the agent or some incompatible versions of : agent and RA_Client.dll are run on both ends. : The most recent version of RA_Client.dll can be found here : http://www.softtreetech.com/24x7/fixes/ra_client.dll : Before you download it, read the following : 1. To verify the RA agent is running on the agent computer execute : netstat -a : Look at the output and make sure the agent is listening on port 1096. : 2. If yes, verify you can reach agent's computer from the scheduler computer : using a temp job executing something like : Dim status, boolean : PingPort "agent computer IP address here", 1096, status : MessageBox status : 3. If 1 and 2 succeed then the problem is likely in RA_Client.dll : 4. Also, look at the /var/log/ra_server.log log file on the agent computer : and check it for error messages or user authorization errors
|
|
Tue Dec 05, 2006 12:08 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: Script conversion |
|
0. You said you are running 24x7 RA server on the Unix side not 24x7 Scheduler Mult-platform Edition. So which one are you really running? 2. ra_client.dll is only needed for the Windows side. 3. So you are not running 24x7 RA server there? are you? : Hi, : Even after trying these things I am still having problem running script & : I am getting "Remote access error:recv call failed" error : message. : 1. I verified that I can reach the agent from scheduler by running the temp : job script mentioned by you and listening to port 1096. : 2. Ra_client.dll version I have on the Windows machine is same as the one : from the link provided which is 2.0.0.4. : However I didn't find the the ra_client.dll on UNIX machine where agent is : running. I could see only .jar files under the 24x7 installation directory : since it is Multiplatform Java edition. : 3. I couldn't locate ra_server.log file under /var/log directory, however I : have a file called scheduler.log under 24x7 installation directory which : provides information like remote agent starting with time it started. : So please could you let me know what might be wrong here : Thanks, : Anil
|
|
Tue Dec 05, 2006 1:38 pm |
|
 |
Anil
Joined: 24 Nov 2006 Posts: 14
|
|
Re: Script conversion |
|
Hi, I have following setup: 1. I have 24x7 master scheduler running on Windows XP. Version of this 24x7 suite is 3.4.26 24x7 Scheduler. 2. I have 24x7 Agent running on Sparc Solaris 9. Version of this 24x7 suite is 24x7 Scheduler Multi-platform Java edition of version 4.0 build 215. 3. Trying to execute the script present on Windows machine thru Windows master scheduler. Thanks, Anil : 0. You said you are running 24x7 RA server on the Unix side not 24x7 : Scheduler Mult-platform Edition. So which one are you really running? : 2. ra_client.dll is only needed for the Windows side. : 3. So you are not running 24x7 RA server there? are you?
|
|
Tue Dec 05, 2006 1:48 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: Script conversion |
|
It seems to me that you are very confused regarding what you are doing. Please re-read this message thread from the beginning and also please take a look at "24x7 Linux & UNIX RA Server Reference" manual. The online version is here http://www.softtreetech.com/24x7/24x7Linux.pdf You also have a local copy installed with 24x7 on your Windows system. : Hi, : I have following setup: 1. I have 24x7 master scheduler running on Windows : XP. Version of this 24x7 suite is 3.4.26 24x7 Scheduler. : 2. I have 24x7 Agent running on Sparc Solaris 9. Version of this 24x7 suite : is 24x7 Scheduler Multi-platform Java edition of version 4.0 build 215. : 3. Trying to execute the script present on Windows machine thru Windows : master scheduler. : Thanks, : Anil
|
|
Tue Dec 05, 2006 1:56 pm |
|
 |
Anil
Joined: 24 Nov 2006 Posts: 14
|
|
Re: Script conversion |
|
Hi, Yes I am really confused. I assume that I need to have the following setup to make my scripts on Windows 24x7 scheduler to perform activities on UNIX machine: 1. Setup 24x7 Automation suite on the Windows machine from where I need to run scripts after adding the RAMethods to these scripts and also with other changes to paths referred in scripts to be compatible with UNIX. ( I have installed automation suite of Windows version and not Multi platform edition) 2. Setup the 24x7 RA Server installed on UNIX machine and remove the existing 24x7 scheduler of Multi platform edition. ( Should I install RA Server or RA client on UNIX machine ?) 3. Try to connect to it thru using port 1096, sample test script should be used to make sure it is listening on the agent computer (Unix machine where RA server is installed). 4. Then continue with testing the scripts thru RAConnect method. Please correct me if I am wrong. Thanks, Anil : It seems to me that you are very confused regarding what you are doing. : Please re-read this message thread from the beginning and also please take a : look at "24x7 Linux & UNIX RA Server Reference" manual. : The online version is here http://www.softtreetech.com/24x7/24x7Linux.pdf : You also have a local copy installed with 24x7 on your Windows system.
|
|
Tue Dec 05, 2006 2:28 pm |
|
 |
Anil
Joined: 24 Nov 2006 Posts: 14
|
|
Re: Script conversion |
|
Hi, I have the ra_server running on UNIX machine. I am running the ra_server using "screen" and sudo command as I don't know have access to kill this process since it is from root. These are the steps I am following to identify the port number it is using to use it in the sample script to check whether it is listening. 1) Ran /usr/local/bin/screen 2) sudo /usr/local/24x7/ra_server/ra_server 3) type ctrl-A D (that ctrl-A followed by D) to “detach” from screen 4) type screen –ls to list running screen sessions. 5) screen –D –RR PID# (the PID number will be the first part of the screen session from the output above) 6) Ctl C on same shell 7) ps –ef | grep infadmn, I could see the screen process with its PID & not showing the actual ra_server running So I don't know whether it is using the proper port 1096 since I am not able to get its port information. Please guide me if I am going in wrong direction. Thanks, Anil : Hi, : Yes I am really confused. I assume that I need to have the following setup to : make my scripts on Windows 24x7 scheduler to perform activities on UNIX : machine: 1. Setup 24x7 Automation suite on the Windows machine from where : I need to run scripts after adding the RAMethods to these scripts and also : with other changes to paths referred in scripts to be compatible with : UNIX. : ( I have installed automation suite of Windows version and not Multi platform : edition) : 2. Setup the 24x7 RA Server installed on UNIX machine and remove the existing : 24x7 scheduler of Multi platform edition. : ( Should I install RA Server or RA client on UNIX machine ?) : 3. Try to connect to it thru using port 1096, sample test script should be : used to make sure it is listening on the agent computer (Unix machine : where RA server is installed). : 4. Then continue with testing the scripts thru RAConnect method. : Please correct me if I am wrong. : Thanks, : Anil
|
|
Wed Dec 06, 2006 2:55 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: Script conversion |
|
ra_server processes should not appear in the process list when no connections are active. Try system ps -a command to print the process list. fyi: ra_server is a tcpd daemon process. System tcpd process is responsible for listening on post 1096. When you connect from the scheduler to ra_server, the tcpd process verifies your user credentials and if ok, starts ra_server process – a separate instance for each connection. If you want to know whether tcpd is listening on port 1096, run netstat -a and check the results. Hope this helps. : Hi, : I have the ra_server running on UNIX machine. : I am running the ra_server using "screen" and sudo command as I : don't know have access to kill this process since it is from root. : These are the steps I am following to identify the port number it is using to : use it in the sample script to check whether it is listening. : 1) Ran /usr/local/bin/screen : 2) sudo /usr/local/24x7/ra_server/ra_server : 3) type ctrl-A D (that ctrl-A followed by D) to “detach” from screen : 4) type screen –ls to list running screen sessions. : 5) screen –D –RR PID# (the PID number will be the first part of the screen : session from the output above) : 6) Ctl C on same shell : 7) ps –ef | grep infadmn, I could see the screen process with its PID & : not showing the actual ra_server running : So I don't know whether it is using the proper port 1096 since I am not able : to get its port information. : Please guide me if I am going in wrong direction. : Thanks, : Anil
|
|
Wed Dec 06, 2006 3:44 pm |
|
 |
Anil
Joined: 24 Nov 2006 Posts: 14
|
|
Re: Script conversion |
|
Hi, After running the ra_server, I tried to find the port "netstat -a". If do this, it doesbn't show up anything, just returns the blank line, however when I run ps -ef" . So I want to make sure whether I am running the proper software. We got it from the following link provided - http://www.24x7automation.com/download/ra_server_eval/ra_eval.htm I have following folder\files under its installation directory: 24x7\ra_Server\ra_server There are no other files under this ra_server directory apart from the above mentioned file. So please could you let us know whether we are running the proper software. Thanks, Anil : ra_server processes should not appear in the process list when no connections : are active. Try system ps -a command to print the process list. : fyi: ra_server is a tcpd daemon process. System tcpd process is responsible : for listening on post 1096. When you connect from the scheduler to : ra_server, the tcpd process verifies your user credentials and if ok, : starts ra_server process – a separate instance for each connection. : If you want to know whether tcpd is listening on port 1096, run netstat -a : and check the results. : Hope this helps.
|
|
Thu Dec 07, 2006 1:32 pm |
|
 |
|
|
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
|
|
|