Unable to check Null condition in a Shell Script

Hi,
When I am using to check the Null Condition To check for a Running Java Process its failing to check.
I am using variable in a shell script
DPID=$(ps -ef |grep - i java|grep -v grep)
if [ "$DPID"="" ' ];then
else
fi
If the DPID has Null value then its getting executed but if the DPID has value its not getting into the else part of the loop
Thanks and Regards

You could try -c to make grep return a count of matches, then check if this count is zero or not.
DPID=`ps -ef |grep - i java|grep -vc grep`
if [[ $DBID -ne 0 ]]; then
else
fi

Similar Messages

  • I am unable to set the classpath from unix shell script

    ) I am new to java, provide me the solution to my problem, as it is urgent
    I am unable to execute shell script on unix machine, the code is given below:
    Basically it is not setting the classpath
    dbUpload .java is astand alone java program to retrieve the report instance statistics from crystal server
    Created a jar file from dbUpload.java as
    Jar �cvf dbUpload.jar dbUpload.class
    Here is mycode(script.sh)
    CLASSPATH=/u01/CrystalList/cecore.jar:${CLASSPATH}:
    CLASSPATH=${CLASSPATH}:/u01/CrystalList/cereports.jar:
    CLASSPATH=${CLASSPATH}:/u01/CrystalList/dbUpload.jar:
    Export CLASSPATH
    Echo ${CLASSPATH}
    Java dbUpload

    venkat123,
    if the code you posted is the original code of your script - it has some misspellings. Please try this one - it works for me both on solaris and linux.
    #! /bin/bash
    CLASSPATH=/u01/CrystalList/cecore.jar:$CLASSPATH
    CLASSPATH=$CLASSPATH:/u01/CrystalList/cereports.jar
    CLASSPATH=$CLASSPATH:/u01/CrystalList/dbUpload.jar
    export CLASSPATH
    echo $CLASSPATH
    java dbUpload

  • Unable to see the sql serveroutput from shell script

    Hello experts,
    I have a shell script which I am using to call a pl/sql proc.
    This proc writes to dbms_output.
    I would like to capture the dbms_output to a file when calling sqlplus from my shell script.
    Here is the code:
    ===============================
    echo "
    sqlplus apps/$APPS_PWD << ENDOFSQL
    set serveroutput ON
    set feedback off
    set verify off
    set linesize 250
    set pagesize 250
    begin
    jdr_utils.listcustomizations('$i');
    end;
    exit
    ENDOFSQL
    " >> new.log
    ===============================
    What I get in the 'new.log' is given below:
    ===============================
    sqlplus apps/prj08app << ENDOFSQL
    set serveroutput ON
    set feedback off
    set verify off
    set linesize 250
    set pagesize 250
    begin
    jdr_utils.listcustomizations('/oracle/apps/irc/candidateSelfService/webui/VisVacDispPG');
    end;
    exit
    ===============================
    ENDOFSQL
    What I would like to get is the dbms_output given by the procedure.
    Please suggest.
    Thanks,
    Vinod

    Vinod wrote:
    Hello experts,
    I have a shell script which I am using to call a pl/sql proc.
    This proc writes to dbms_output.
    I would like to capture the dbms_output to a file when calling sqlplus from my shell script.
    Here is the code:
    ===============================
    echo "
    sqlplus apps/$APPS_PWD << ENDOFSQL
    set serveroutput ON
    set feedback off
    set verify off
    set linesize 250
    set pagesize 250
    begin
    jdr_utils.listcustomizations('$i');
    end;
    exit
    ENDOFSQL
    " >> new.log
    ===============================
    What I get in the 'new.log' is given below:
    ===============================
    sqlplus apps/prj08app << ENDOFSQL
    set serveroutput ON
    set feedback off
    set verify off
    set linesize 250
    set pagesize 250
    begin
    jdr_utils.listcustomizations('/oracle/apps/irc/candidateSelfService/webui/VisVacDispPG');
    end;
    exit
    ===============================
    ENDOFSQL
    What I would like to get is the dbms_output given by the procedure.
    Please suggest.
    Thanks,
    VinodYou need to realize & understand that EVERY command line command runs in its own separate OS process.
    So the results from DBMS_OUTPUT get sent to Standard Out for the sqlplus process; which is NOT attached to your terminal.
    The bottom line is you can't get there from here.

  • Passing Null Characters from Unix Shell Script to Java Program

    Hi Experts,
    Facing an issue with a shell script....
    The shell script has 10 input parameters....
    1st Parameter is a compiled Java program name(This can keep changing)
    Rest 9 are the parameters of the Java Program...
    The following piece of code is working when Test "a z" "b t" "" "" "" "" "" "" "" "" is hardcoded.
    lv_java_string=`java Test "a z" "b t" "" "" "" "" "" "" "" ""`
    The whole thing being dynamic.....
    But when I dynamically populate the same on to a parameter lv_java_param and then execute the same
    lv_java_string=`java $lv_java_param`
    if i echo $lv_java_param  its giving me Test "a z" "b t" "" "" "" "" "" "" "" ""  correctly
    Im facing some issue...... The issue is " is being treated as a parameter itself and the space between a and z is not taken into consideration and hence z is taken as the 2nd parameter
    Issue seems to be something like the precedence in which the above statement is executed, because of which "s are calculated/manipulated. Is it something like
    a) $lv_java_param is computed  first and then java $lv_java_param
    b) or java $lv_java_param is run on the fly......
    Any help is much appreciated.

    This forum is about Oracle *RDBMS*
    I don't see any question about Oracle RDBMS
    Please find a forum about Java.
    Sybrand Bakker
    Senior Oracle DBA

  • How to check null condition on a Object.......

    Hi I have created a JTable and Iam retrieving the data from the Jtable as an Object.
    Object s=table.getValueAt(i,j)
    if(s!=null)
            dosomething();
    }But the if loop is continuing even if there is a null value in the table.Where am I going wrong?

    But the if loop is continuing even if there is a null value in the table.Where am I going wrong?Are you sure the value is null ?
    This code seems to work fine for me :
    package objectorientation;
    public class Oo5 {
         public static void main(String[] args) {
              Oo5 objOo5=new Oo5();
              Object o=objOo5.returnValue();
              if(o!=null)
                   System.out.println("HI");
              else
                   System.out.println("BYE");
         public Oo5 returnValue()
              //Oo5 objOo5=new Oo5();
              //return objOo5;
              return null;
    O/P :
    BYECase 2 :
    package obectorientation;
    public class Oo5 {
         public static void main(String[] args) {
              Oo5 objOo5=new Oo5();
              Object o=objOo5.returnValue();
              if(o!=null)
                   System.out.println("HI");
              else
                   System.out.println("BYE");
         public Oo5 returnValue()
              Oo5 objOo5=new Oo5();
              return objOo5;
    O/P :
    HIExperts may comment on this.
    Thanks.

  • Applescript: display dialog while doing shell script

    Hello there,
    I'm making an applescript app for my company, and had  a question.
    The functionallity of the app is working great, but there is a certain step which can take up to several minutes.
    This can give the user the feeling that nothing is happening and things are stuck.
    Is there a possibility to display a dialog as long as the action (shell script) is running?
    Something along the lines of "Now performing action X. please wait...)
    Thanks for your thoughts!
    Grtz

    With regular AppleScript you can start the shell script in the background (see do shell script in AppleScript) and then put up a dialog, although you would have to periodically check to see if the shell script is finished.  In Lion, the AppleScript Editor has a Cocoa-AppleScript template that you can use (kind of a wrapper application that lets you use various Cocoa methods without having to use Xcode), in which case you could put up an indeterminite progress indicator and then do the shell script.
    AppleScript Studio is deprecated as of Snow Leopard, but there are some AppleScriptObjC in Xcode tutorials at MacScripter.  An additional source of information and templates is macosxautomation, but they seem to be having some server problems at this time.  I also have a Progress Window template application example, it can be downloaded here.

  • Feild name : null. unknown error / Unable to check..... Store is temp...

    Ok I bought a movie a few days ago and couldn't download it, System told me to try later. Ok no biggy. I log on the next morning and try again to get the message Unable to check purchases Itunes store is temporarily unavailable. Its been almost a week same message but the store works fine I have bought 2 albums and they downloaded fine. I get the bill for the movie today try to use the "report problem" link and im told Feild name: null. unknown error. Same thing when i try to log into view my account.
    I call apple support to be told that all support for the store is online only. Here is where i get a bit mad. If your online support wont let you login how can you get support?
    I have restarted, turned off and back one, deleted itunes and reinstalled. I've deleted the keychain and had it rebuilt. For a product thats advertised to "just work" it isn't working as intended.
    < Edited by Host for language >

    Hey, I feel your pain...I've been going through this all evening long...I keep resetting my password and then 2 minutes later it doesn't recognize my password and I get the same weird message that you get....Ive sent a message to their "support" lets see how quick they get back to me.....
    If anyone has gotten a reply from Apple letting us know the problem ,please let us know.

  • Unix Shell Script to check file Format

    Hello
    I am New to shell scripting.Please help me to write a script for the below condition.Any help is highly appreciated.
    I will get a text file every month like the one below
    Sample file
    Payslip.txt
    ========
    EMPID EMAIL PCTAG#
    4946:[email protected]:151207
    4978:[email protected]:154434
    5091:[email protected]:160784
    5208:[email protected]:153601
    5211:[email protected]:158963
    5218:[email protected]:156967
    5247:[email protected]:153760
    5250:[email protected]:160078
    5276:[email protected]:154693
    I should check for the below conditions in the above file
    Conditions:
    =======
    1.File should be seperated by colon(;)
    2.EMPID should not be null
    3.Email address and pc tag# should be null if it is missing
    4.No empty record should be there
    All the above four conditions should be checked
    If any one of four conditions are not met then the file is invalid and it should exit with status saying that file is invalid.
    If all the four conditions are met it should say that the file is valid
    Any help is highly appreciated.It is urgent.
    Thanks in advance
    Manoj

    Try this :
    error()
    {       echo -n "Line "$NR "  "$LINE "  "       >>$STATUS
            echo $1                                 >>$STATUS
    NR=0
    STATUS=/tmp/status.txt
    rm -f $STATUS
    cat Payslip.txt | while read LINE
    do
            NR=`expr $NR + 1`
            ### Check colons ###########
            if [ ! "`echo $LINE | grep :`" ]; then
                    error "No colon"
                    continue
            fi
            EMPID=`echo $LINE | awk -F: '{print $1}'`
            EMAIL=`echo $LINE | awk -F: '{print $2}'`
            PCTAG=`echo $LINE | awk -F: '{print $3}'`
            ### Check null line ###########
            if [ ! "$EMPID" -a ! "$EMAIL" -a ! "$PCTAG" ]; then
                    error "Null line"
                    continue
            fi
            ### Check null EMPID ###########
            if [ ! "$EMPID" ]; then
                    error "No Empid"
                    continue
            fi
    done
    echo
    if [ -f $STATUS ]; then
            cat $STATUS
            echo
            echo "File is Invalid"
    else
            echo "File is Valid"
    fi
    echo

  • Unable to pass parameter in oracle procedure through unix shell script

    Hi Experts,
    I have oracle procedure where in I have to pass the value of procedure parameter through unix script.
    Follwoing is the sample procedure which i tried to exceute from the unix.
    Procedure:
    create or replace procedure OWNER.PRC_TESTING_OWNER(OWNER IN VARCHAR2) AS
    sql_stmt varchar2(1000) := NULL;
    v_count number := 0;
    v_owner varchar2(100) := owner;
    begin
    sql_stmt:='select count(1) from '||v_owner||'.EMP@infodb where rownum<=10';
    execute immediate sql_stmt into v_count;
    DBMS_OUTPUT.PUT_LINE(sql_stmt);
    DBMS_OUTPUT.PUT_LINE(v_count);
    END;The script which I used is:
    Unix
    #!/bin/ksh
    parm=$1
    echo start
    sqlplus -s scott@DEV/tiger <<EOF >>result_1.txt
    set serveroutput on;
    select '$parm' from dual;
    exec owner.PRC_TESTING_OWNER('$parm');
    EOFThe script is working fine that is i am able to pass to parameter value through unix shell script. :)
    But if I want to pass the value of the owner in cursor , I am unable to pass this value through unix.
    Following the procedure which i am trying to implement.
    create or replace procedure OWNER.PRC_TESTING_OWNER(OWNER IN VARCHAR2) IS
    v_owner varchar2(100) := owner;
    CURSOR main_cur IS 
      select
      i.ROWID  rid ,
      emp_name,
      deptid
      from v_owner.employee;
    CURSOR subset_cur(c_deptid NUMBER ) IS
        SELECT *
          FROM v_owner.DEPT d
          where  d.dept_id=c_deptid;
    --##main loop     
    FOR i IN main_cur LOOP
          FOR j IN subset_cur(i.deptid) LOOP     
    BEGIN
    insert into v_owner.RESULT_TABLE
    END;
    END LOOP;
    END LOOP;How can i pass parameter value of the stored procedure through unix script(that is "owner" in this case), when these parameter value is
    used in cursor? :(
    Can anybody help me regarding the same?
    Thanks in Advance !! :D

    It's not the parameter in the cursor that is the problem, it's that you are trying to use static SQL for something that won't be known until run time (the owner of the table).
    You would need to use something like ...
    declare
       l_owner        varchar2(30) := 'SCOTT';
       l_ref_cursor   sys_refcursor;  
       type l_ename_tab is table of scott.emp.ename%type;
       l_ename_array  l_ename_tab;
    begin
       open l_ref_cursor for
          'select ename
          from ' || l_owner || '.emp';
       loop
          fetch l_ref_cursor bulk collect into l_ename_array limit 10;
          exit when l_ename_array.COUNT = 0;
          for x in 1 .. l_ename_array.count
          loop
             dbms_output.put_line(l_ename_array(x));
          end loop;
       end loop;
       close l_ref_cursor;
    end;
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.01

  • Error at install NSP - FSL-01001  Unable to check existence of account

    Hi all, 
    I need very urgent help. 
    I installed the NSP system one time and uninstalled it again.
    Now I tried to reinstall it again and allways get the error FSL-01001  Unable to check existence of account localhostSAP_LocalAdmin. Any hints or ideas.
    It is a local installation, all admin rights are available. Same environment like at the first installation, which was OK. Also the change of the system name did not help.
    Any hints? 
    Here ist the logfile:
    Handling account  
    TRACE      syxxsyshlp.cpp:75
               syslib::traceOSError(const iastring &, int, DWORD, const iastring &)  
    System call failed. Error 2453 (Domänencontroller für diese Domäne konnte nicht gefunden werden. 
    ) in execution of system call 'NetGetDCName' with parameter (NULL, localhost), line (1075) in file (synxcaccmg.cpp). 
    TRACE      synxcaccmg.cpp:766
               CSyADsPath::fromString(localhostSAP_LocalAdmin)
    Account localhost/SAP_LocalAdmin has ADS path 'WinNT://localhost/SAP_LocalAdmin' 
    INFO[E]    2005-11-19 14:07:50 synxcgroup.cpp:684
               CSyGroupImpl::isExistingOnOS()
    Unable to check existence of account localhostSAP_LocalAdmin. Verbindung wurde nicht hergestellt, weil ein identischer Name bereits im Netzwerk vorhanden ist. Wählen Sie "System" in der Systemsteuerung, um den Computernamen zu ändern, und versuchen Sie es erneut. 
    TRACE      iaxxejsexp.cpp:208
               EJS_Installer::writeTraceToLogBook()
    AccountMgt.createGroup(localhostSAP_LocalAdmin, ) 
    TRACE      syxxsyshlp.cpp:75
               syslib::traceOSError(const iastring &, int, DWORD, const iastring &)  
    System call failed. Error 2453 (Domänencontroller für diese Domäne konnte nicht gefunden werden. 
    ) in execution of system call 'NetGetDCName' with parameter (NULL, localhost), line (1075) in file (synxcaccmg.cpp). 
    TRACE      synxcaccmg.cpp:766
               CSyADsPath::fromString(localhostSAP_LocalAdmin)
    Account localhost/SAP_LocalAdmin has ADS path 'WinNT://localhost/SAP_LocalAdmin' 
    ERROR      2005-11-19 14:07:55 synxcgroup.cpp:684
               CSyGroupImpl::isExistingOnOS()
    FSL-01001  Unable to check existence of account localhostSAP_LocalAdmin. Verbindung wurde nicht hergestellt, weil ein identischer Name bereits im Netzwerk vorhanden ist. Wählen Sie "System" in der Systemsteuerung, um den Computernamen zu ändern, und versuchen Sie es erneut. 
    TRACE      iaxxejsbas.hpp:270
               EJS_Base::dispatchFunctionCall()
    JS Callback has thrown std::ESyException: ESAPinstException: error text undefined 
    TRACE      iaxxcwalker.cpp:301
               CDomWalker::processStep()  
    An error occurred while processing service SAP NetWeaver '04 Support Release 1> ABAP System> MaxDB> Non-Unicode> Central Instance Installation. You may now
    press the 'View Log' button to get more information about the error.
    stop the task and continue with it later.
    reset your input for the current task. In this case, SAPinst will permanently remove all installation files from the installation directory. This gives you the opportunity to restart from scratch.
    Log files are written to C:Programmesapinst_instdirNW04SR1WEBAS_ABAP_ADA_NUCCI.
    TRACE      iaxxgenimp.cpp:845
               showDialog()
    waiting for an answer from gui 
    TRACE      iaxxcnclhd.cpp:92
               doHandleDoc()
    ACTION_STOP requested 
    WARNING    2005-11-19 14:07:57 sapinst.cpp:1302
               CSapInst::cancel()
    Installation canceled by user request.

    Hi,
    I got same problem. I tried all above replies, still I got same error.
    Error
    FSL-01001   unable to check existence of account saptranshost\SAP_localAdmin. Access is denied
    ERROR 2020-04-28 09:08:56
    MOS-01131  Unable to create account ACCOUNTNAME=saptranshost\SAP_LocalAdmin ACCOUNTTYPE=GROUP DESCRIPTION=SAP Local Administration Group MEMBERSHIPSEPARATOR=, OPMODE=CREATE . SOLUTION: Check whether you have permissions to create accounts.
    I logged in as local Administrator with Administration permissions. This user created by OS while installation.
    Urgent. Thanks in advance.
    Regards,
    Krishna

  • Unable to check hostname

    I am running an JAVA Applet which uses JDBC to connect to Oracle. When I open the page which has the applet I get the following JAVA error "com.ms.security.SecurityExceptionEx[oracle/net/nt/TcpNTAdapter.connect]: Unable to check hostname "server_bob.domain_d4". I'm not sure what is going on but I just changed to a new domain server. This was working fine prior to the conversion. I set my new server up just like the old one. Any ideas?

    Did you set the security settings in you applet?
    As a test try this:
    try
    if(Class.forName("com.ms.security.PolicyEngine") != null)
    PolicyEngine.assertPermission(PermissionID.SYSTEM);
    catch(Throwable t)
    // do something
    This should give your app fully access to everything (which is NOT a good idea for anything running in the real world) but it should at least allow you to see if you can connect. If you do then you'll need to hone down the PermissionID to the proper setting for your applet. (Of course this implies you have the MS classes in the classpath).
    You should also check the security.policy for you java installation to see if it is even allowed.
    null

  • Failed to create Subordinate CA because of unable to check revocation

    Hi all,
    I am building a subordinate CA on my domain controller with Windows Server 2012 R2 installed.
    I submitted the CSR to my root CA (running EJBCA), then I accept the CA request and generated a certificate file. I already configured my root CA to append OCSP and CRL in this generated certification.
    However, I keep receiving "revocation server was offline" error, although I passed the OCSP check with OpenSSL.
    Here's the detailed error from certutil.exe
    Any help?
    PS C:\Users\Administrator> certutil -urlfetch -verify -seconds \\tsclient\Downloads\winPDCCA.cer
    Issuer:
    C=CA
    O=ROOT
    CN=ROOT Server CA
    Name Hash(sha1): xxx
    Name Hash(md5): xxx
    Subject:
    CN=win-PDC-CA
    Name Hash(sha1): xxx
    Name Hash(md5): xxx
    Cert Serial Number: 58b8a199528589b8
    dwFlags = CA_VERIFY_FLAGS_CONSOLE_TRACE (0x20000000)
    dwFlags = CA_VERIFY_FLAGS_DUMP_CHAIN (0x40000000)
    ChainFlags = CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT (0x40000000)
    HCCE_LOCAL_MACHINE
    CERT_CHAIN_POLICY_BASE
    -------- CERT_CHAIN_CONTEXT --------
    ChainContext.dwInfoStatus = CERT_TRUST_HAS_PREFERRED_ISSUER (0x100)
    ChainContext.dwErrorStatus = CERT_TRUST_REVOCATION_STATUS_UNKNOWN (0x40)
    ChainContext.dwErrorStatus = CERT_TRUST_IS_OFFLINE_REVOCATION (0x1000000)
    SimpleChain.dwInfoStatus = CERT_TRUST_HAS_PREFERRED_ISSUER (0x100)
    SimpleChain.dwErrorStatus = CERT_TRUST_REVOCATION_STATUS_UNKNOWN (0x40)
    SimpleChain.dwErrorStatus = CERT_TRUST_IS_OFFLINE_REVOCATION (0x1000000)
    CertContext[0][0]: dwInfoStatus=102 dwErrorStatus=0
    Issuer: C=CA, O=ROOT, CN=ROOT Server CA
    NotBefore: 3/5/2015 3:20 AM
    NotAfter: 3/4/2040 8:18 AM
    Subject: CN=win-PDC-CA
    Serial: 58b8a199528589b8
    Template: DomainController
    12b9512bc6cc456929f73ea1ab0b597812164e46
    Element.dwInfoStatus = CERT_TRUST_HAS_KEY_MATCH_ISSUER (0x2)
    Element.dwInfoStatus = CERT_TRUST_HAS_PREFERRED_ISSUER (0x100)
    ---------------- Certificate AIA ----------------
    No URLs "None" Time: 0
    ---------------- Certificate CDP ----------------
    Verified "Base CRL (17)" Time: 0
    [0.0] http://ca.xxxxxxxxxx.com:8080/ejbca/publicweb/webdist/certdist?cmd=crl&issuer=CN=ROOT%20Server%
    20CA,O=ROOT,C=CA
    Verified "Delta CRL (17)" Time: 0
    [0.0.0] http://ca.xxxxxxxxxx.com:8080/ejbca/publicweb/webdist/certdist?cmd=deltacrl&issuer=CN=ROOT%20
    Server%20CA,O=ROOT,C=CA
    ---------------- Base CRL CDP ----------------
    No URLs "None" Time: 0
    ---------------- Certificate OCSP ----------------
    Expired "OCSP" Time: 0
    [0.0] http://ca.xxxxxxxxxx.com:8080/ejbca/publicweb/status/ocsp
    CRL (null):
    Issuer: C=CA, O=ROOT, CN=ROOT Server CA
    ThisUpdate: 3/5/2015 3:30 AM
    NextUpdate: 3/5/2015 3:30 PM
    xxxx
    CertContext[0][1]: dwInfoStatus=102 dwErrorStatus=1000040
    Issuer: C=CA, O=ROOT, CN=ROOT CA
    NotBefore: 3/4/2015 8:18 AM
    NotAfter: 3/4/2040 8:18 AM
    Subject: C=CA, O=ROOT, CN=ROOT Server CA
    Serial: 198c1ca481078881
    xxxx
    Element.dwInfoStatus = CERT_TRUST_HAS_KEY_MATCH_ISSUER (0x2)
    Element.dwInfoStatus = CERT_TRUST_HAS_PREFERRED_ISSUER (0x100)
    Element.dwErrorStatus = CERT_TRUST_REVOCATION_STATUS_UNKNOWN (0x40)
    Element.dwErrorStatus = CERT_TRUST_IS_OFFLINE_REVOCATION (0x1000000)
    ---------------- Certificate AIA ----------------
    No URLs "None" Time: 0
    ---------------- Certificate CDP ----------------
    Verified "Base CRL (13)" Time: 0
    [0.0] http://ca.xxxxxxxxxx.com:8080/ejbca/publicweb/webdist/certdist?cmd=crl&issuer=CN=ROOT%20CA,O=ROOT,C=CA
    Verified "Delta CRL (13)" Time: 0
    [0.0.0] http://ca.xxxxxxxxxx.com:8080/ejbca/publicweb/webdist/certdist?cmd=deltacrl&issuer=CN=ROOT%20
    CA,O=ROOT,C=CA
    ---------------- Certificate OCSP ----------------
    Expired "OCSP" Time: 0
    [0.0] http://ca.xxxxxxxxxx.com:8080/ejbca/publicweb/status/ocsp
    CertContext[0][2]: dwInfoStatus=10a dwErrorStatus=0
    Issuer: C=CA, O=ROOT, CN=ROOT CA
    NotBefore: 3/4/2015 8:18 AM
    NotAfter: 3/4/2040 8:18 AM
    Subject: C=CA, O=ROOT, CN=ROOT CA
    Serial: 1def9f3b25d8ec1e
    7487db4f9ea8055ca3d095b994fafdd7bbfd0283
    Element.dwInfoStatus = CERT_TRUST_HAS_KEY_MATCH_ISSUER (0x2)
    Element.dwInfoStatus = CERT_TRUST_IS_SELF_SIGNED (0x8)
    Element.dwInfoStatus = CERT_TRUST_HAS_PREFERRED_ISSUER (0x100)
    ---------------- Certificate AIA ----------------
    No URLs "None" Time: 0
    ---------------- Certificate CDP ----------------
    No URLs "None" Time: 0
    ---------------- Certificate OCSP ----------------
    No URLs "None" Time: 0
    Exclude leaf cert:
    xxxx
    Full chain:
    xxxx
    Issuer: C=CA, O=ROOT, CN=ROOT Server CA
    NotBefore: 3/5/2015 3:20 AM
    NotAfter: 3/4/2040 8:18 AM
    Subject: CN=win-PDC-CA
    Serial: 58b8a199528589b8
    Template: DomainController
    xxxx
    The revocation function was unable to check revocation because the revocation server was offline. 0x80092013 (-214688561
    3 CRYPT_E_REVOCATION_OFFLINE)
    Revocation check skipped -- server offline
    Cert is a CA certificate
    Leaf certificate revocation check passed
    CertUtil: -verify command completed successfully.
    PS C:\Users\Administrator>

    The OCSP server is providing expired responses, there is something definitely wrong with the OCSP configuration. Because you are using the EJBCA OCSP server by PrimeKey, you are going to have to contact them regarding the issues with your
    configuration.
    Brian
    Hi Brian,
    I am very confused about the "expired" response... Did it means the certificate is expired or the OCSP response is expired, or something else?
    Anyway, I sniff the traffic between this Windows subordinate CA and the OCSP server when I run "certutil -url -v winPDCCA.cer" and choose it to verify OCSP.
    tshark: -R without -2 is deprecated. For single-pass filtering use -Y.
    Capturing on 'Ethernet 1'
    -- omitted --
    Online Certificate Status Protocol
    responseStatus: successful (0)
    responseBytes
    ResponseType Id: 1.3.6.1.5.5.7.48.1.1 (id-pkix-ocsp-basic)
    BasicOCSPResponse
    tbsResponseData
    responderID: byKey (2)
    byKey: xx
    producedAt: 2015-03-06 03:14:21 (UTC)
    responses: 1 item
    SingleResponse
    certID
    hashAlgorithm (SHA-1)
    Algorithm Id: 1.3.14.3.2.26 (SHA-1)
    issuerNameHash: xx
    issuerKeyHash: xx
    serialNumber: 1384483256
    certStatus: good (0)
    good
    thisUpdate: 2015-03-06 03:14:21 (UTC)
    signatureAlgorithm (shaWithRSAEncryption)
    Algorithm Id: 1.2.840.113549.1.1.5 (shaWithRSAEncryption)
    Padding: 0
    signature: xx...
    certs: 1 item
    Certificate (id-at-countryName=CA,id-at-organizationName=ROOT,id-at-commonName=ROOT Server CA)
    signedCertificate
    version: v3 (2)
    serialNumber: -2130212735
    signature (shaWithRSAEncryption)
    Algorithm Id: 1.2.840.113549.1.1.5 (shaWithRSAEncryption)
    issuer: rdnSequence (0)
    rdnSequence: 3 items (id-at-countryName=CA,id-at-organizationName=ROOT,id-at-commonName=ROOT CA)
    RDNSequence item: 1 item (id-at-commonName=ROOT CA)
    RelativeDistinguishedName item (id-at-commonName=ROOT CA)
    Id: 2.5.4.3 (id-at-commonName)
    DirectoryString: printableString (1)
    printableString: ROOT CA
    RDNSequence item: 1 item (id-at-organizationName=ROOT)
    RelativeDistinguishedName item (id-at-organizationName=ROOT)
    Id: 2.5.4.10 (id-at-organizationName)
    DirectoryString: printableString (1)
    printableString: ROOT
    RDNSequence item: 1 item (id-at-countryName=CA)
    RelativeDistinguishedName item (id-at-countryName=CA)
    Id: 2.5.4.6 (id-at-countryName)
    CountryName: CA
    validity
    notBefore: utcTime (0)
    utcTime: 15-03-04 11:48:18 (UTC)
    notAfter: utcTime (0)
    utcTime: 40-03-04 11:48:10 (UTC)
    subject: rdnSequence (0)
    rdnSequence: 3 items (id-at-countryName=CA,id-at-organizationName=ROOT,id-at-commonName=ROOT Server CA)
    RDNSequence item: 1 item (id-at-commonName=ROOT Server CA)
    RelativeDistinguishedName item (id-at-commonName=ROOT Server CA)
    Id: 2.5.4.3 (id-at-commonName)
    DirectoryString: printableString (1)
    printableString: ROOT Server CA
    RDNSequence item: 1 item (id-at-organizationName=ROOT)
    RelativeDistinguishedName item (id-at-organizationName=ROOT)
    Id: 2.5.4.10 (id-at-organizationName)
    DirectoryString: printableString (1)
    printableString: ROOT
    RDNSequence item: 1 item (id-at-countryName=CA)
    RelativeDistinguishedName item (id-at-countryName=CA)
    Id: 2.5.4.6 (id-at-countryName)
    CountryName: CA
    subjectPublicKeyInfo
    algorithm (rsaEncryption)
    Algorithm Id: 1.2.840.113549.1.1.1 (rsaEncryption)
    Padding: 0
    subjectPublicKey: xx...
    extensions: 7 items
    Extension (id-pe-authorityInfoAccessSyntax)
    Extension Id: 1.3.6.1.5.5.7.1.1 (id-pe-authorityInfoAccessSyntax)
    AuthorityInfoAccessSyntax: 1 item
    AccessDescription
    accessMethod: 1.3.6.1.5.5.7.48.1 (id-pkix.48.1)
    accessLocation: 6
    uniformResourceIdentifier: http://ca.xx.com:8080/ejbca/publicweb/status/ocsp
    Extension (id-ce-subjectKeyIdentifier)
    Extension Id: 2.5.29.14 (id-ce-subjectKeyIdentifier)
    SubjectKeyIdentifier: xx
    Extension (id-ce-basicConstraints)
    Extension Id: 2.5.29.19 (id-ce-basicConstraints)
    critical: True
    BasicConstraintsSyntax
    cA: True
    Extension (id-ce-authorityKeyIdentifier)
    Extension Id: 2.5.29.35 (id-ce-authorityKeyIdentifier)
    AuthorityKeyIdentifier
    keyIdentifier: xx
    Extension (id-ce-freshestCRL)
    Extension Id: 2.5.29.46 (id-ce-freshestCRL)
    CRLDistPointsSyntax: 1 item
    DistributionPoint
    distributionPoint: fullName (0)
    fullName: 1 item
    GeneralName: uniformResourceIdentifier (6)
    uniformResourceIdentifier: http://ca.xx.com:8080/ejbca/publicweb/webdist/certdist?cmd=deltacrl&issuer=CN=ROOT%20CA,O=ROOT,C=CA
    Extension (id-ce-cRLDistributionPoints)
    Extension Id: 2.5.29.31 (id-ce-cRLDistributionPoints)
    CRLDistPointsSyntax: 1 item
    DistributionPoint
    distributionPoint: fullName (0)
    fullName: 1 item
    GeneralName: uniformResourceIdentifier (6)
    uniformResourceIdentifier: http://ca.xx.com:8080/ejbca/publicweb/webdist/certdist?cmd=crl&issuer=CN=Whitebear%20Home%20CA,O=Whitebear%20Home,C=CA
    cRLIssuer: 1 item
    GeneralName: directoryName (4)
    directoryName: rdnSequence (0)
    rdnSequence: 3 items (id-at-countryName=CA,id-at-organizationName=ROOT,id-at-commonName=ROOT CA)
    RDNSequence item: 1 item (id-at-commonName=ROOT CA)
    RelativeDistinguishedName item (id-at-commonName=ROOT CA)
    Id: 2.5.4.3 (id-at-commonName)
    DirectoryString: uTF8String (4)
    uTF8String: ROOT CA
    RDNSequence item: 1 item (id-at-organizationName=ROOT)
    RelativeDistinguishedName item (id-at-organizationName=ROOT)
    Id: 2.5.4.10 (id-at-organizationName)
    DirectoryString: uTF8String (4)
    uTF8String: ROOT
    RDNSequence item: 1 item (id-at-countryName=CA)
    RelativeDistinguishedName item (id-at-countryName=CA)
    Id: 2.5.4.6 (id-at-countryName)
    CountryName: CA
    Extension (id-ce-keyUsage)
    Extension Id: 2.5.29.15 (id-ce-keyUsage)
    critical: True
    Padding: 1
    KeyUsage: 86 (digitalSignature, keyCertSign, cRLSign)
    1... .... = digitalSignature: True
    .0.. .... = contentCommitment: False
    ..0. .... = keyEncipherment: False
    ...0 .... = dataEncipherment: False
    .... 0... = keyAgreement: False
    .... .1.. = keyCertSign: True
    .... ..1. = cRLSign: True
    .... ...0 = encipherOnly: False
    0... .... = decipherOnly: False
    algorithmIdentifier (shaWithRSAEncryption)
    Algorithm Id: 1.2.840.113549.1.1.5 (shaWithRSAEncryption)
    Padding: 0
    encrypted: 3f209f1ce8bfc017b1b4c889370b0a49e284dd9895672f4b...
    1 ^C
    Based on the response, it seems that the OCSP server did return "good", "successful" in response. This is also verified with OpenSSL ocsp verification command:
    openssl ocsp -url http://ca.xxx.com:8080/ejbca/publicweb/status/ocsp -issuer ROOTServerCA.pem -cert winPDCCA.cer -CAfile ROOTCA.pem
    Response verify OK
    winPDCCA.cer: good
    This Update: Mar 6 03:21:44 2015 GMTopenssl ocsp -url http://ca.xxx.com:8080/ejbca/publicweb/status/ocsp -issuer ROOTCA.pem  -cert ROOTServerCA.pem -CAfile ROOTCA.pem
    Response verify OK
    ROOTServerCA.pem: good
        This Update: Mar  6 03:23:29 2015 GMT

  • Shell Scripting Resources && Conditional

    Hiya folks.
    I'm looking for a great shell scripting site. Or a book. The Apple Mac Dev Centre is ... well she ain't workin for me.
    For instance, I'm looking for some leadership on a conditional, which those docs won't show me:
    troubleshooting=false
    *if [$troubleshooting==1]; then*
    * echo $troubleshooting*
    * echo $nameStart*
    * echo $myDate*
    * echo $newFName*
    * echo $mSource*
    * echo $mTarget*
    fi
    How do I trip this conditional?
    Cheers

    How do you set a boolean?
    Everything in a shell variable is a string. Some of those strings may look like numbers, but as far as the variable is concerned they are strings. There are no boolean variables. It is all in how you interpret the strings in your variable.
    I'll have to check up on the syntax for bash.
    You could read, reread, read and read "man bash". But I know it is not easy to actually figure out how to use the stuff the man page tells you, or even what they really mean when they use various terms. A book with examples helps, but there is magic hidden in the man page that sometimes takes ages and heavy use of shell scripting to figure out, and I've found that no one book will clearly explain every trick that can be done with shell scripts.
    I prefer to have spaces in there, but not around parens of any kind. I wish languages would be the same that way. Heh.
    And I like to have spaces around equal signs in assignments, but Bourne based shell scripts have their own rules. That is just the way it is.
    The syntax for the 'if' command is
    if list; then list; [ elif list; then list; ] ... [ else list; ] fi
    where "A list is a sequence of one or more pipelines separated by one of the operators ...". "A pipeline is a sequence of one or more commands separated by the character |".
    In the original Bourne shell (which ran in 64kilobytes of memory for code, data, and stack space) all expressions were handed by an external program 'test'. So your 'if' statement would have originally been
    if test $troubleshooting = 1; then
    fi
    Someone figured out that Unix filenames do not care what characters make up their name, so a hardlink was created between /bin/test and /bin/[
    ls -li /bin/test /bin/[
    57880389 -r-xr-xr-x 2 root wheel 46720 Jun 17 2009 /bin/[
    57880389 -r-xr-xr-x 2 root wheel 46720 Jun 17 2009 /bin/test
    You will notice that 57880389 (the file's inode) is identical for both 'test' and '['.
    So when you wrote
    if [$troubleshooting==1]; then
    the shell first processed the line and performed variable substitution, so the 'if' line converts to
    if [false==1]; then
    now the shell processes the 'list' of pipelines/commands following the 'if' statement. So a command is the first white space separate token, which is "[false==1]", so the shell looked in all the PATH directories looking for a file with the name "[false==1]" and did not find anything.
    However, if you white space separate the command in the 'list' from its arguments, then the shell can figure out what the first command is, invoke that command, and pass its arguments to the command.
    Now shells have more than 64kilobytes of memory to work with, and so the [[ ... ]] syntax was invented as a way to indicate that the expression was to use the shell built-in evaluation code. And I think bash eventually decided that it would do the /bin/[ program code evaluation as a built-in as well.
    But since you can also say
    if myprogram --opt --opt arg arg arg; then
    fi
    the shell must still be able to tell the difference between [ or [[ as expression evaluation operators, and a legal file with the name /home/me/bin/[myprogram, or $HOME/bin/[[myprogram, so it cannot assume that [ or [[ always start an expression evaluation.

  • Unable to Check in Business Services in JDE DEMO.

    Hi,
    We have ERP 8.97 JDE tool set installed on our local m/c. We are unable to check in the Business Services (BSSV) object (JP55HOL) in JDE DEMO. We also tried checking in the vanilla BSSV (J0000030) after we had chekced it out, but this also did not work out. We are getting the error: General Error in Method, Check-in. However we had no issues in checking in the regular JDE objects.
    Please help!!!
    -Shahid

    Demo E900 is a big mess, perhaps "Oracle Lab" packaged it this way.
    Do this:
    1- Create a project "Temp"
    2- Check out F986020 & F986030 (only specs available, no table exists in the data source) - if you try to see by UTB or databrowser
    3- Generate table & index in design (take every thing as default)
    4- Now try check-in your BSSVs.
    5 Goodluck

  • Unable to Check for Update on OS 5.1

    My iPad 2 will not update its software over the air and comes up with the message Unable to Check for Update.  I have tried updating via iTunes 10.6 and it just sits there trying to contact the update server.  I have also reset the iPad and restored from backup.  Exactly the same problem!
    Its nothing to do with the network as i get exactly the same problem at work as i do at home.  My iPhone 4S updated to 5.1 without any problem.  However my iPad just does not want to know.
    Please help!

    Correction. I started the update on my iPhone and my wife's iPad. However, they never finished. Each one returned an error message stating that the "Software Update Failed. An error occurred downloading iOS 5.1." I can't even get my ipad2 to get that far. It returns an error when trying to contact the server.

Maybe you are looking for

  • Text doesn't display in flash

    my flash movies work fine on every computer i have tested (about 10 both macs and pc's) but i have found one where the flash movies play (images and animation appear fine) but the text (static text) doesn't display at all! there is also no streaming

  • Do I need Open Directory for multiple email addresses for Calendar users?

    Hey all, I have a single mac mini which I use simply as a calendar server for +/- 20 users. One day I might use Profile Manager to manage their iOS devices too. On the initial installation, we enabled Open Directory, although I'm not sure that it's r

  • Illustrator won't start after updating to the latest version

    After updating to the latest version of Illustrator CC (2014), I've been unabled to start the app. Kept crashing. Basically can't even open the file!

  • VSAN Segmentation When Switch is Removed

    I have a 9513 and a 9509 ISL'd in a single fabric. The Eports are in VSAN 2, and all the zones are in VSAN 1. ( I know this is not best practice, and is going to be fixed)  Anyway, after making the 9513 the principle switch, and shutting down all bla

  • TO for HU(Indound Delivery)

    Hello, I am looking for possibility to create the Transfer order against HU attached to Inbound delivery. In my senario, we have multiple HU in an Inbound delivery, when I try to create the TO against the I/delivery, it creates against whole inbound