1 2 Previous Next 18 Replies Latest reply on Jan 18, 2017 4:45 AM by 1567114

    Error running Host Program

    1567114

      Hello,

       

      I have created a Host Program in Linux and registered in EBS under Payables Responsibility

       

      When i am running the Program I am getting Error and the Log Output shows:

       

       

      I have created a xxtest.prog file under /usr/tst/tmp and created the  a Soft Link using:

       

      $ ln -s $FND_TOP/bin/fdcpesr  xxtest

       

      Please need assistance what could be the Error behind.

        • 1. Re: Error running Host Program
          mdtaylor

          You need to put the xxtest.prog and create the soft link in XX_TOP/bin, or the bin directory of whatever application you registered the concurrent program under. It cannot be /usr/tmp.

          • 2. Re: Error running Host Program
            1567114

            Thanks after making the changes when I run the Host program it did not transferred the file and also did not through any error.

             

            Below Host program code which been registered:

             

            #!/bin/bash

            SFTPLOG=/usr/tmp/sftp_test_chk_`date +%m%d%y%H%M%S`.log

            count=$( find /u01/tst/tmp -maxdepth 1 -mindepth 1 -type f -name 'TestCHK*.csv'  -print| wc -l )

            echo "Total of files to process: $count " >> $SFTPLOG;

            find /u01/tst/tmp -type f -name 'TestCHK*.csv' -print | while read FILENAME; do

            seqnmlog="/u01/tst/tmp/chk_sequence_num"

            next=$(cat "$seqnmlog")

            (( next++ ))

            echo "$next" > "$seqnmlog"

            echo "$next" >> $SFTPLOG

            cd /home/applprd

            targetfile="TEST.CHKPRINT."`date "+%m%d%y"`$next;

            echo "$targetfile" >> $SFTPLOG

            mv $FILENAME $targetfile

            echo 5%G@raXd |gpg --no-tty --armor --output $targetfile.gpg --recipient 'test@abc.com' --local-user A10NetworksInc --sign --encrypt --passphrase-fd 0 $targetfile

            cd /home/appltst

            /usr/bin/expect /u01/tst/tmp/xxtestput.exp $targetfile.gpg>> $SFTPLOG;

            done

            • 3. Re: Error running Host Program
              John_K

              What does "/usr/tmp/sftp_test_chk_`date +%m%d%y%H%M%S`.log" say?

              • 4. Re: Error running Host Program
                mdtaylor

                The host program has to work when executed directly on the host from the OS.  What happens then?

                • 5. Re: Error running Host Program
                  1567114

                  Hello,

                   

                  The Log file got generated and its says Count as 0 files.

                   

                  Created the directory under /u01/tst/tmp;

                   

                  The file got generated under the /u01/tst/tmp with the notation starting as TestCHK1111.csv.As the file got created in the db directory that's why the directory search is not working I assume as there is also APPL_TOP also in /u01/tst/tmp.

                   

                  Though the command :ind /u01/tst/tmp -maxdepth 1 -mindepth 1 -type f -name 'TestCHK*.csv'  -print| wc -l should 1 file its showing 0 files as its searching in the APPL directory and not the DB one.

                   

                  We have 2 servers pone is appl top and other is db one:

                   

                  xxapp11.test.com  (Application)

                   

                  xxapp01.test.com (Database)

                   

                  Please can you assist me if I missed anything.

                  • 6. Re: Error running Host Program
                    1567114

                    Hi,

                     

                    The Count one works when executed from db: /u01/tst/tmp -maxdepth 1 -mindepth 1 -type f -name 'TestCHK*.csv'  -print| wc -l 

                     

                    But its not working from Application server and the log file also generated as 0 files

                    • 7. Re: Error running Host Program
                      mdtaylor

                      If the csv file is being created by a database directory or utl_file operation, then you will want to have it execute on a NFS shared location that the DB can write to.

                      • 8. Re: Error running Host Program
                        1567114

                        Hello,

                         

                        Thanks for the point out.

                         

                        Can you assist me how to execute on a NFS shared location that the DB can write to.

                         

                        • 9. Re: Error running Host Program
                          mdtaylor

                          Usually the sysadmins do this.  When I last shared the /stage mountpoint to a db server, I did it as follows:

                           

                          http://www.tecmint.com/how-to-setup-nfs-server-in-linux/

                           

                          On appserver:

                           

                          Setup NFS share for /stage

                           

                          edit /etc/exports

                           

                          /stage  *(rw,sync)

                           

                          service rpcbind restart

                          service nfs start

                          chkconfig nfs on

                           

                          On DB server:

                           

                          cd /

                          mkdir stage

                          vi /etc/fstab

                          appserver:/stage          /stage                  nfs     defaults        0 0

                          service netfs stop

                          service netfs start

                           

                          Make sure the directory you are using is writable to the oracle user or owner of the database.  If you have the same groups like dba or oinstall on both servers, you have make the directory group writable.

                          • 10. Re: Error running Host Program
                            1567114

                            Hello,

                             

                            Thanks a ton for the post.

                             

                            The file generated via utl_file in the DB path has the write privileges.But when I am running the Concurrent Program the .prog is not working.

                             

                            For example:

                             

                            SFTPLOG=/usr/tmp/sftp_test_chk_`date +%m%d%y%H%M%S`.log

                            count=$( find /u01/tst/tmp -maxdepth 1 -mindepth 1 -type f -name 'TestCHK*.csv'  -print| wc -l )

                            echo "Total of files to process: $count " >> $SFTPLOG;

                             

                            count=$( find /u01/tst/tmp -maxdepth 1 -mindepth 1 -type f -name 'TestCHK*.csv'  -print| wc -l )  --Shows as 0 whereas it should be 1.

                             

                            When I am running from the xxapp11.test.com  (Application):

                             

                            $( find /u01/tst/tmp -maxdepth 1 -mindepth 1 -type f -name 'TestCHK*.csv'  -print| wc -l ) its showing as 0

                             

                            xxapp01.test.com (Database)

                             

                            $( find /u01/tst/tmp -maxdepth 1 -mindepth 1 -type f -name 'TestCHK*.csv'  -print| wc -l ) its showing as 1

                             

                            What could be the reason?Is there anything I need to write in the .prog for getting the file transferred from DB to APPL

                            • 11. Re: Error running Host Program
                              mdtaylor

                              I recommend making /u01/tst a NFS share from the DB tier to the app tier, then it will be visible to both servers.

                              • 12. Re: Error running Host Program
                                1567114

                                Hello,

                                 

                                How to make the /u01/tst NFS Share from DB tier pointing to app tier?

                                 

                                Is there any command to do so?

                                • 13. Re: Error running Host Program
                                  Narsi M-Oracle

                                  Hello,

                                   

                                  I would advise you to check with your Infra Admin.

                                  They should be able to mount it across all the nodes.

                                   

                                   

                                  Regards,

                                  Narsi

                                  • 14. Re: Error running Host Program
                                    1567114

                                    Hello,

                                     

                                    Is there any other method apart from NFS one?

                                    1 2 Previous Next