Opendj3.0 export to ldif gives connect error

This topic contains 7 replies, has 4 voices, and was last updated by  Bill Nelson 2 months ago.

  • Author
    Posts
  • #22288
     srinath.m 
    Participant

    Hi,

    I have tried exporting data to ldif file with below command and got the error.
    [idm@opendj.example.com bin]$./stop-ds
    [idm@opendj.example.com bin]$ ./export-ldif \
    > –includeBranch dc=example,dc=com \
    > –backendID userRoot \
    > –port 4444 \
    > –ldifFile /data/app/backup.ldif
    Password for user ‘cn=Directory Manager’:
    You have provided options for scheduling this operation as a task but options
    provided for connecting to the server’s tasks backend resulted in the
    following error: ‘Connect Error’

    I have followed this docs – https://backstage.forgerock.com/docs/opendj/3/admin-guide/#chap-import-export

    Any help on this would be appreciated.
    Thanks,
    Srinath

    #22289
     Mark Craig 
    Participant

    Hi Srinath,

    If you first stop the server first, then don’t provide the port number. You get a Connect Error when the tool tries to connect to the administrative port 4444 on the server, which is not running.

    Run the task offline instead as shown in step 1. of the procedure To Export LDIF Data. In your case:

    export-ldif \
     --includeBranch dc=example,dc=org \
     --backendID userRoot \
     --ldifFile /data/app/backup.ldif
    #22290
     srinath.m 
    Participant

    Hi Mark,
    Thanks for the quick reply. I have executed the command you have mentioned and resulted with different error.
    [13:55][idm@opendj.example.com bin]$ ./export-ldif \
    > –includeBranch dc=example,dc=com\
    > –backendID userRoot \
    > –ldifFile /data/app/backup.ldif
    Password for user ‘cn=Directory Manager’:
    The port argument does not have any value that may be retrieved as an integer

    See “export-ldif –help” to get more usage help

    Thanks,
    Srinath

    #22291
     Rob Matthews 
    Participant

    Hi Srinath,

    Are you using a double dash before the option? It looks like a single but the forum seems to edit a double in to a single.

    Thanks,
    Rob

    #22293
     srinath.m 
    Participant

    Thanks for the quick reply Rob. I am using the double dash before the option and below is the command executing.

    $ ./export-ldif \
     --includeBranch dc=example,dc=com \
     --backendID userRoot \
     --ldifFile /opt/app/opendj2.ldif

    thanks,
    srinath

    #22299
     Rob Matthews 
    Participant

    How strange, I’ve copied and pasted the command it worked ok for me. You could try an online export to see if this works –

    export-ldif \
    –port 4444 \
    –hostname opendj.example.com \
    –bindDN “cn=Directory Manager” \
    –bindPassword password \
    –includeBranch dc=example,dc=org \
    –backendID userRoot \
    –ldifFile /path/to/backup.ldif \
    –start 0 \
    –trustAll

    #22300
     srinath.m 
    Participant

    Thanks for the quick reply Rob. It worked for me with online export ldif.

    ./export-ldif \
     --includeBranch dc=example,dc=com \
     --port 4444 \
     --backendID userRoot \
     --ldifFile /opt/apps/opendj2.ldif

    Thanks,
    Srinath

    #22302
     Bill Nelson 
    Participant

    I’m not saying this is the case, but I have seen this behavior from time to time when I have the tools.properties file populated (and forget about it) or when someone has set this on the running instance (and I am not aware of it). I have gotten into the habit of specifying --noPropertiesFile in my commands unless I specifically want to use defaults. This, of course, forces me to specify all the properties in the command line, but at least I can see them (and possibly where the issue is).

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

©2018 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?