[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference tuxedo::dce-products

Title:DCE Product Information
Notice:Kit Info - See 2.*-4.*
Moderator:TUXEDO::MAZZAFERRO
Created:Fri Jun 26 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2269
Total number of notes:10003

2268.0. "sec_rgy_site_open_update got connection rejected" by HGOSPS::MICKWIDLAM () Fri May 30 1997 03:16

    Hi,
    
    I have a problem related to sec_rgy_site_open_update(). A customer
    found that calling this function will fail if the security server was
    once down. The event sequence is below:
    
    - program called sec_rgy_site_open_update and security server is up,
      action successful
    - program called sec_rgy_site_close and security server is up, action
      successful
    - security server was brought down
    - program called sec_rgy_site_open_update and security server is down,
      action failed with "connection rejected"
    - security server was brought up
    - program called sec_rgy_site_open_update and security server is UP,
      action failed with "connection rejected". And this is the problem.
    
    To resolve this, the application has to be restarted.
    
    This problem is reproducible at will and I have a short program can
    demonstrate this problem. This problem happened in V1.3B, V2.0A. The
    security server is in IBM's DCE (release 1.1). We tried this on the
    IBM's DCE and the symptom is the same, too.
    
    Is there anyone know if this is a problem in OSF/DCE release V1.1
    problem or restriction?
    
    Thanks,
    Mickwid.
    
    
    #include <string.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <dce/dce_error.h>
    #include <dce/binding.h>
    #include <iostream.h>
    
    void
    show_error( const char* dceCall, unsigned long dceStatus )
    {
        int           status;
        unsigned char error_text[dce_c_error_string_len];
    
        dce_error_inq_text(dceStatus, error_text, &status);
    
        cout << dceCall << ": " << (char*) error_text << endl;
    }
    
    
    void
    main( int argc, char* argv[] )
    {
        while (1)
        {
            sec_rgy_handle_t rgy_handle=0;
            char next;
            cout << "\nEnter 'o' to open security server update site...";
            cin >> next;
            error_status_t status;
    
            if( next == 'o' )
            {
                system( "date" );
                sec_rgy_site_open_update( NULL, &rgy_handle, &status );
    
                if( status == rpc_s_ok )
                    cout << "sec_rgy_site_open_update done" << endl;
                else
                {
                    show_error( "sec_rgy_site_open_update", status );
                    continue;
                }
                system( "date" );
            }
            else if( next == 'q' )
            {
                return;
            }
    
            cout << "Enter 'c' to close security server update site...";
            cin >> next;
    
            if( next == 'c' )
            {
                system( "date" );
                sec_rgy_site_close( rgy_handle, &status );
                if( status == rpc_s_ok )
                    cout << "sec_rgy_site_close done" << endl;
                else
                {
                    show_error( "sec_rgy_site_close", status );
                    continue;
                }
                system( "date" );
            }
        }
    }
    
    
    /* To compile
    
       cxx -D_REENTRANT -threads -g -call_shared testSec.C -o testSec \
       -ldce -lpthreads -lc_r -lmach
    */
    
T.RTitleUserPersonal
Name
DateLines