Tuesday Oct 25, 2011

Very basic ODSEE DPS config

How to create a minimalist dps conf : 

create DS instance

dsadm create -p 3389 -P 3636  /export/pat/dsee7.0.1/instances/ds1

dsadm start '/export/pat/dsee7.0.1/instances/ds1'

dsconf  create-suffix -p 3389 o=stress.com

dsconf  import -p 3389 1k.ldif o=stress.com

Create and configure DPS instance

dpadm create -p 4389 -P 4636 /export/pat/dsee7.0.1/instances/dp1

dpadm start /export/pat/dsee7.0.1/instances/dp1

dpconf create-ldap-data-source -p 4389  branstock_ds7_3389 branstock:3389

dpconf create-ldap-data-source-pool  -p 4389  mypool

dpconf attach-ldap-data-source  -p 4389  mypool  branstock_ds7_3389

dpconf set-attached-ldap-data-source-prop -p 4389  mypool branstock_ds7_3389 bind-weight:1 search-weight:1

dpconf create-ldap-data-view -p 4389 myview mypool o=stress.com

 restart dps :   dpadm restart /export/pat/dsee7.0.1/instances/dp1

Simple test 

ldapsearch -p 3389  -b "o=stress.com" "objectclass=*"  (directly search DS)

ldapsearch -p 4389 -b "o=stress.com" "uid=*"  (search trough DPS)



Wednesday Apr 29, 2009

How to debug dpconf with netbeans

If you need to launch dpconf under netbeans debugger you have to follow this procedure:

 1- Modify dpconf C command wrapper in order to enable JODA debugger

  • In a 6.x,7.x DSEE wks, edit the file <wks>/ldap/dps/dpcfg/starter/dpcfg_starter.c and add the following lines (in red) in the main function
... 
if (ldapUnsecuredOptSetProperty[0] != '\\0') {
    spawnArgs[i++] = ldapUnsecuredOptSetProperty;
    }
       
    spawnArgs[i++] = "-Xdebug";
    spawnArgs[i++] = "-Xnoagent";
    spawnArgs[i++]= "-Djava.compiler=none";

    spawnArgs[i++]= "-Xrunjdwp:transport=dt_socket,server=y,address=8010,suspend=y";
    spawnArgs[i++] = "-classpath";
    spawnArgs[i++] = classPath;
    spawnArgs[i++] = "com.sun.directory.proxy.dpcfg.cli.DpcfgMain";
    
    /\* Copy argv to spawnArgs
     \*
...
  • Then compile dsee and copy the built dpconf command under the DSEE install you have to debug

2- Launch dpconf command and attach netbeans to the process

You are now ready to attach the dpconf command you want to debug under a netbeans session. You first need to create a new java project with the corresponding source (use <wks>/ldap/dps/dpcfg/java as Package Folder for source). Put some breakpoints and then attach the debugger "Debug->Attach Debugger..." under netbeans (specify port 8010).


About

Patrice Duc-Jacquet

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today