14 Replies Latest reply: Jan 27, 2011 5:36 AM by 822661 RSS

    autoconfig error : afcpctx.sh INSTE8_PRF 1

    Nayas
      Hi Hussein,

      I have a question. On a 11.5.9 instance, when I run autoconfig on application tier, I get the error
      afcpctx.sh INSTE8_PRF 1

      As documented, when I look at the log file, I can see that the error is PL/SQL buffer being too small.
      I appplied patch 3377508 - AFCPCTX.SH FAILS WITH ORA-6502 WHEN FNDCPUCF IS EXECUTED, ran autoconfig and same error.
      I applied patch 3810902 - AUTOCONFIG EXITING WITH ERRORS, ran autoconfig and still finished with error.

      This time, I am getting the following:

      " Parsing Context File...
      Serial number in context file contains lower value than that of database copy.

      Cause: Context file editing through Oracle Applications Manager did not complete file system syncronization. Please correct the errors that caused during editing and then run this program again. (FILE$APPL_TOP/admin/<CONTEXT_FILE>.xml)
      Serial number in context file contains lower value than that of database copy.

      Cause: Context file editing through Oracle Applications Manager did not complete file system syncronization. Please correct the errors that caused during editin"


      As a background, last night when I tried to shutdown the application, I received an error which was mostly saying that there is a corruption with my contextfile. I rebuild it earlier before running autoconfig.


      Any idea?

      Thank you,

      Felix
        • 1. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
          Hussein Sawwan-Oracle
          Hi Felix,

          The cause of the error and the fix are outlined in the following document.

          Note: 316475.1 - Autoconfig Shows Error With afcpctx.sh Script
          https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=316475.1

          Regards,
          Hussein
          • 2. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
            Nayas
            Hi Hussein,

            Thank you very much for the fast and correct Metalink DocID.

            Would you mind to validate these steps:

            My XML version # is 115.421.
            In my CONTEXT_FILE, as stated, my s_contextserial is set to 0

            When I do the SQL select, for my CONTEXT_NAME and version, the value is 74.

            So I was going to do the following:

            create table fnd_oam_context_files_bkp
            as select * from fnd_oam_context_files;

            update fnd_oam_context_files to set the serial_number to 0

            and then run autoconfig?


            Thank you very much,
            Felix
            • 3. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
              Hussein Sawwan-Oracle
              Hi Felix,

              Your steps are OK, so please proceed with it and run AutoConfig.

              Regards,
              Hussein
              • 4. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
                Nayas
                Hi Hussein,

                Thank you very much for your help, the issue if fixed.
                Really appreciated it.

                Have a nice day,

                Felix
                • 5. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
                  Nayas
                  Hi Hussein,

                  I have another question regarding this.
                  As I said on my inital post, I had a corruption on my XML file. I rebuild it.

                  After running AutoConfig, I had some port problem issues (mainly oprocmgr port was wrong). I could fix this without any problem.

                  When you rebuild the context file, is it using some default values? Or is it using the values present in various configuration files?
                  I am asking this, because after seeing there was a problem with the port, I also got a problem with the web server. The httpd.conf got erased when running AutoConfig. I ran AutoConfig this morning and fixed this.
                  Now when I try to log in the application, I am getting an Internal Server errror. I enabled all the trace on Apache/Jserv/Forms and reviewing the logs at the moment.
                  I am just wondering if there might be other configuration that we could have lost?

                  Thank you,
                  Felix
                  • 6. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
                    Hussein Sawwan-Oracle
                    Felix,
                    When you rebuild the context file, is it using some default values? Or is it using the values present in various configuration files?
                    How do you rebuild the context file? AutoConfig reads from the context file to generate the environment and configuration files.
                    I am asking this, because after seeing there was a problem with the port, I also got a problem with the web server. The httpd.conf got erased when running AutoConfig. I ran AutoConfig this morning and fixed this.
                    How the value of the web server port got changed? Did you check the file timestamp before editing it?
                    Now when I try to log in the application, I am getting an Internal Server errror. I enabled all the trace on Apache/Jserv/Forms and reviewing the logs at the moment.
                    I am just wondering if there might be other configuration that we could have lost?
                    You can use the ("Check Config Utility" - adchkcfg.sh script) to generate a Text/HTML report which would provide information about all file changes, profile option changes and other important database updates that will be done during the next normal execution of AutoConfig.

                    Note: 165195.1 - Using AutoConfig to Manage System Configurations with Oracle Applications 11i
                    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=165195.1

                    Regards,
                    Hussein
                    • 7. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
                      Nayas
                      Hi Hussein,

                      When you have your CONTEXT_FILE and run autocofig, it will read CONTEXT_FILE and spread the config to the configuration files.
                      In a case you lose your CONTEXT_FILE or get it currupt, you can rebuild the xml file from:
                      cd <AD_TOP>/bin
                      perl adbldxml.pl tier=apps appsuser=<APPSuser>

                      This is what I did.

                      I have no idea how the value was changed. On this server, we have 3 instances. For some reason, it used the port number from another instance instead of the current one.

                      Anyway, this is weird. We might just fall back on a backup. Now we are getting more and more errors.
                      I will try adchkcfg.sh and validate the configuration from there.

                      Thank you,
                      Felix
                      • 8. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
                        Nayas
                        Hi Hussein,

                        I have a question, about this issue.
                        In our dry run for the upgrade (11.5.9 - 11.5.10.2 with new db, techstack, java, jre), I am testing the procedure we made in the migration instance in a test instance that we refresh yesterday.

                        We know that our CONTEXT_FILE is corrupt/not valid anymore on production and it was probably last used 2 years ago and parameters were probably changed manually directly in files. Knowing we will have to rebuild the CONTEXT_FILE before we do anything, as we are upgrading AD and we will have to run autoconfig, we want to make sure we have the parameters currently set in configuration files.

                        The first step of the procedure is to rebuild the CONTEXT_FILE. I recreated it this way:
                        cd $AD_TOP/bin
                        perl adbldxml.pl tier=apps appsuser=apps appspasswd=<apps_pwd>

                        According to Metalink DocID: 165195.1, Section 9: Migrating to AutoConfig on the Application Tier:
                        "Attention: adbldxml uses your current environment settings to generate the context file. Therefore ensure that your environment is correctly sourced."

                        Am I assuming correctly that, adbldxml will do the following:
                        - get the template from AD, FND, etc
                        - populate the template with the CURRENT values in the various configuration files on disk

                        Or is it doing something else?

                        If you remember, I did this in our migration instance couple weeks ago and it corrupted the whole instance. The XML file wasn't populated correclty at all.
                        I just did the adbldxml.pl and once again, the generated XML file wasn't populated correctly and corrupted the instance (good thing we have a backup). I know the XML file from this test instance is 100% valid and not corrupt. When I do a diff between this valid XML and the newly created XML file from adbldxml, it is 2 differents worlds.

                        Are we issuing the correct command to rebuild our context_file? If not, which command do we have to use?

                        Another question. When we do a pre-clone, the CONTEXT_FILE in $COMMON_TOP/clone/bin, is it a simple copy from $APPL_TOP/admin/<CONTEXT_FILE>.xml or is it actually, reverse engineering, going into each configuration files and populating the templates from the configuration contained in those files?

                        Thank you,

                        Felix

                        Edited by: user8247865 on 17-Jun-2009 12:29 PM
                        • 9. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
                          548518
                          had you applied "Apply TXK AutoConfig and Templates patch" per section 5 of 165195.1?
                          • 10. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
                            Hussein Sawwan-Oracle
                            Hi Felix,
                            Am I assuming correctly that, adbldxml will do the following:
                            - get the template from AD, FND, etc
                            - populate the template with the CURRENT values in the various configuration files on disk

                            Or is it doing something else?
                            This is correct, and I believe it reads from the env files (you should source env files before running this script).
                            If you remember, I did this in our migration instance couple weeks ago and it corrupted the whole instance. The XML file wasn't populated correclty at all.
                            I just did the adbldxml.pl and once again, the generated XML file wasn't populated correctly and corrupted the instance (good thing we have a backup). I know the XML file from this test instance is 100% valid and not corrupt. When I do a diff between this valid XML and the newly created XML file from adbldxml, it is 2 differents worlds.
                            Can you mention some of the differences between the two files? Is it about the path, hostname, domain name, SID, ..etc?
                            Are we issuing the correct command to rebuild our context_file? If not, which command do we have to use?
                            You are issuing the correct command, and nothing is wrong with it.
                            Another question. When we do a pre-clone, the CONTEXT_FILE in $COMMON_TOP/clone/bin, is it a simple copy from $APPL_TOP/admin/<CONTEXT_FILE>.xml or is it actually, reverse engineering, going into each configuration files and populating the templates from the configuration contained in those files?
                            It will replicate all env files (including the source context file) and convert it into a template (see Note: 364565.1 for details).

                            Regards,
                            Hussein
                            • 11. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
                              Nayas
                              Good Morning Hussein,
                              Another question. When we do a pre-clone, the CONTEXT_FILE in $COMMON_TOP/clone/bin, is it a simple copy from $APPL_TOP/admin/<CONTEXT_FILE>.xml or is it actually, reverse engineering, going into each configuration files and populating the templates from the configuration contained in those files?
                              
                              It will replicate all env files (including the source context file) and convert it into a template (see Note: 364565.1 for details).
                              I am not sure I understand this.
                              First, I realised that I made a little mistake. It is not $COMMON_TOP/clone/bin but $COMMON_TOP/clone/context/apps. There are 2 files:
                              - CONTEXT_FILE.xml (which has the same name from the one in $APPL_TOP/admin)
                              - CTXORIG.xml (which is identical to the other CONTEXT_FILE in this folder when issuing diff).

                              What I dont understand, is if it based on env file, the values for various port, httpd.conf/jerv etc files informations are not contained in those env files, no?

                              This is why I am wondering if the CONTEXT_FILE in $COMMON_TOP/clone/context/apps is just a copy of $APPL_TOP/admin. I realised the data in $APPL_TOP/admin/CONTEXT_FILE.xml is not containing the values we have in the configuration files. The $COMMON_TOP/clone/context/apps/CONTEXT_FILE.xml is identical to the one in $APPL_TOP/admin and we know this file is not sync.

                              Thank you,
                              Felix
                              • 12. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
                                Hussein Sawwan-Oracle
                                Hi Felix,

                                Replication of the files includes all files with system specific information (AFAIK, the list of files is not documented).

                                Are you able to reproduce the issue? What AutoConfig patchset you are on?

                                Regards,
                                Hussein
                                • 13. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
                                  548518
                                  Sean.Atl wrote:
                                  had you applied "Apply TXK AutoConfig and Templates patch" per section 5 of 165195.1?
                                  what you had done should be after the completion of the section 5, which should put the instance in right shape for the convertion.
                                  • 14. Re: autoconfig error : afcpctx.sh INSTE8_PRF 1
                                    822661
                                    Hi Hussien,

                                    I am facing the same issue when i run autoconfig on appsTier,
                                    Applicaton Release is : 12
                                    db: 11gR2.
                                    Error when running autoconfig on appstier:

                                    afcpctx.sh INSTE8_PRF 1

                                    As per the metalink doc or steps provided in thread.
                                    I found that in xml file hearder serial no is 3.
                                    but wen i run sql command fnd_oam_context_files

                                    i am geting SID_hostname and serail number of other instances as this is clone instance.

                                    my current sid is ABC_ERPXYZ

                                    but this is not present in fnd_oam_context_files.



                                    I solved this issue:

                                    u need to add tem tablespaces

                                    check your control file trace.
                                    open it at last u will get
                                    alter tablespaces commands run those commands ..

                                    Note : check at o/s level whether those temp datafiles are there


                                    thanks and regards,
                                    Waseem

                                    Edited by: 819658 on Jan 27, 2011 3:34 AM