LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Trouble on setup-ds.pl setup script: Could not import LDIF file (http://www.linuxquestions.org/questions/linux-server-73/trouble-on-setup-ds-pl-setup-script-could-not-import-ldif-file-891221/)

neocontrol 07-12-2011 01:37 AM

Trouble on setup-ds.pl setup script: Could not import LDIF file
 
Hi All,

I'm working on installing the 389 directory server on FC15. I was following along on this doc -> http://directory.fedoraproject.org/wiki/Install_Guide.

First some OS info:

Code:

$cat /etc/redhat-release
Fedora release 15 (Lovelock)

Code:

$uname -a
Linux ldap01.domain.com 2.6.38.8-32.fc15.i686.PAE #1 SMP Mon Jun 13 19:55:27 UTC 2011 i686 i686 i386 GNU/Linux

Code:

$rpm -qa |grep 389
389-ds-base-1.2.8.3-1.fc15.i686
389-ds-base-devel-1.2.8.3-1.fc15.i686
389-ds-console-doc-1.2.5-1.fc15.noarch
389-adminutil-devel-1.1.13-2.fc15.i686
389-ds-console-1.2.5-1.fc15.noarch
389-dsgw-1.1.6-2.fc15.i686
389-adminutil-1.1.13-2.fc15.i686
389-ds-base-libs-1.2.8.3-1.fc15.i686
389-admin-console-1.1.7-2.fc15.noarch
389-ds-1.2.1-2.fc15.noarch
389-console-1.1.4-2.fc15.noarch
389-admin-console-doc-1.1.7-2.fc15.noarch
389-admin-1.1.16-1.fc15.i686

No other ldap services are running as I can tell.

Code:

[root@ldap01 tmp]# ps aux |grep http
root      1782  0.0  0.0  4432  760 pts/0    S+  22:26  0:00 grep --color=auto http
[root@ldap01 tmp]# ps aux |grep ldap
root      1784  0.0  0.0  4432  756 pts/0    S+  22:26  0:00 grep --color=auto ldap
[root@ldap01 tmp]# ps aux |grep slap
root      1786  0.0  0.0  4432  756 pts/0    S+  22:26  0:00 grep --color=auto slap

So I went about trying to setup the initial server. I ran 'setup-ds.pl'. (Note: I also tried setup-admin-ds.pl with the same results) Here is the log file from the initial setup.

Code:

$cat setupT_vzTe.log
[11/07/11:22:17:02] - [Setup] Info This program will set up the 389 Directory Server.

It is recommended that you have "root" privilege to set up the software.
Tips for using this  program:
  - Press "Enter" to choose the default and go to the next screen
  - Type "Control-B" or the word "back" then "Enter" to go back to the previous screen
  - Type "Control-C" to cancel the setup program

[11/07/11:22:17:02] - [Setup] Info Would you like to continue with set up?
[11/07/11:22:17:04] - [Setup] Info yes
[11/07/11:22:17:04] - [Setup] Info BY SETTING UP AND USING THIS SOFTWARE YOU ARE CONSENTING TO BE BOUND BY
AND ARE BECOMING A PARTY TO THE AGREEMENT FOUND IN THE
LICENSE.TXT FILE. IF YOU DO NOT AGREE TO ALL OF THE TERMS
OF THIS AGREEMENT, PLEASE DO NOT SET UP OR USE THIS SOFTWARE.

[11/07/11:22:17:04] - [Setup] Info Do you agree to the license terms?
[11/07/11:22:17:04] - [Setup] Info yes
[11/07/11:22:17:04] - [Setup] Info Your system has been scanned for potential problems, missing patches,
etc.  The following output is a report of the items found that need to
be addressed before running this software in a production
environment.

389 Directory Server system tuning analysis version 10-AUGUST-2007.

NOTICE : System is i686-unknown-linux2.6.38.8-32.fc15.i686.PAE (4 processors).

[11/07/11:22:17:04] - [Setup] Info Would you like to continue?
[11/07/11:22:17:05] - [Setup] Info yes
[11/07/11:22:17:05] - [Setup] Info Choose a setup type:

  1. Express
      Allows you to quickly set up the servers using the most
      common options and pre-defined defaults. Useful for quick
      evaluation of the products.

  2. Typical
      Allows you to specify common defaults and options.

  3. Custom
      Allows you to specify more advanced options. This is
      recommended for experienced server administrators only.

To accept the default shown in brackets, press the Enter key.

[11/07/11:22:17:05] - [Setup] Info Choose a setup type
[11/07/11:22:17:05] - [Setup] Info 2
[11/07/11:22:17:05] - [Setup] Info Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
<hostname>.<domainname>
Example: eros.example.com.

To accept the default shown in brackets, press the Enter key.

Warning: This step may take a few minutes if your DNS servers
can not be reached or if DNS is not configured correctly.  If
you would rather not wait, hit Ctrl-C and run this program again
with the following command line option to specify the hostname:

    General.FullMachineName=your.hostname.domain.name

[11/07/11:22:17:05] - [Setup] Info Computer name
[11/07/11:22:17:06] - [Setup] Info ldap01.domain.com
[11/07/11:22:17:06] - [Setup] Info The server must run as a specific user in a specific group.
It is strongly recommended that this user should have no privileges
on the computer (i.e. a non-root user).  The setup procedure
will give this user/group some permissions in specific paths/files
to perform server-specific operations.

If you have not yet created a user and group for the server,
create this user and group using your native operating
system utilities.

[11/07/11:22:17:06] - [Setup] Info System User
[11/07/11:22:17:07] - [Setup] Info nobody
[11/07/11:22:17:07] - [Setup] Info System Group
[11/07/11:22:17:07] - [Setup] Info nobody
[11/07/11:22:17:07] - [Setup] Info The standard directory server network port number is 389.  However, if
you are not logged as the superuser, or port 389 is in use, the
default value will be a random unused port number greater than 1024.
If you want to use port 389, make sure that you are logged in as the
superuser, that port 389 is not in use.

[11/07/11:22:17:07] - [Setup] Info Directory server network port
[11/07/11:22:17:08] - [Setup] Info 389
[11/07/11:22:17:08] - [Setup] Info Each instance of a directory server requires a unique identifier.
This identifier is used to name the various
instance specific files and directories in the file system,
as well as for other uses as a server instance identifier.

[11/07/11:22:17:08] - [Setup] Info Directory server identifier
[11/07/11:22:17:09] - [Setup] Info ldap01
[11/07/11:22:17:09] - [Setup] Info The suffix is the root of your directory tree.  The suffix must be a valid DN.
It is recommended that you use the dc=domaincomponent suffix convention.
For example, if your domain is example.com,
you should use dc=example,dc=com for your suffix.
Setup will create this initial suffix for you,
but you may have more than one suffix.
Use the directory server utilities to create additional suffixes.

[11/07/11:22:17:09] - [Setup] Info Suffix
[11/07/11:22:17:11] - [Setup] Info dc=domain, dc=com
[11/07/11:22:17:11] - [Setup] Info Certain directory server operations require an administrative user.
This user is referred to as the Directory Manager and typically has a
bind Distinguished Name (DN) of cn=Directory Manager.
You will also be prompted for the password for this user.  The password must
be at least 8 characters long, and contain no spaces.
Press Control-B or type the word "back", then Enter to back up and start over.

[11/07/11:22:17:11] - [Setup] Info Directory Manager DN
[11/07/11:22:17:13] - [Setup] Info cn=Directory Manager
[11/07/11:22:17:13] - [Setup] Info Password
[11/07/11:22:17:15] - [Setup] Info Password (confirm)
[11/07/11:22:17:18] - [Setup] Warning The passwords do not match.  Please try again.

[11/07/11:22:17:18] - [Setup] Info Password (confirm)
[11/07/11:22:17:21] - [Setup] Info Could not import LDIF file '/tmp/ldifZ6JxFq.ldif'.  Error: 256.  Output: importing data ...
Error - Problem accessing the lockfile /var/lock/dirsrv/slapd-ldap01/lock
[11/Jul/2011:22:17:21 -0700] - Shutting down due to possible conflicts with other slapd processes

[11/07/11:22:17:21] - [Setup] Fatal Error: Could not create directory server instance 'ldap01'.
[11/07/11:22:17:21] - [Setup] Fatal Exiting . . .
Log file is '/tmp/setupT_vzTe.log'

So as you see I get to what I believe is the end, and it looks like it's bombing out because the /tmp/ldifZ6JxFq.ldif file is non existent.

From my google-fu, I find lots of info about the script bombing out due to permissions and unable-ness to read the ldif file, but I haven't found anything about it not being there, which makes me think I'm missing something to this process.

From my understanding, this script creates this file no? Or is this something I need to create on my own first some how? All I'm after is a directory server that I centrally auth servers / users for SSH.

Any help & supplemental reading is appreciated!

bathory 07-12-2011 08:56 AM

Quote:

Error - Problem accessing the lockfile /var/lock/dirsrv/slapd-ldap01/lock
Looks like a permissions problem. Does the directory /var/lock/dirsrv/slapd-ldap01 exists and owned by nobody:nobody?

neocontrol 07-12-2011 09:13 AM

Thank you for the reply.

The directory does exist and is owned and writable by nobody:nobody.

Code:

root@ldap01 dirsrv]# pwd
/var/lock/dirsrv

[root@ldap01 dirsrv]# ll
total 0
drwxrwx--- 2 dirsrv dirsrv 40 Jul 11 21:33 slapd-DOMAIN-COM
drwxrwx--- 2 nobody nobody 40 Jul 11 21:39 slapd-ldap01
drwxrwx--- 2 pkisrv dirsrv 40 Jul 11 21:33 slapd-PKI-IPA

And the directory is empty as well, as I suspect it should be since it wasn't able to access the lock file.

bathory 07-12-2011 10:11 AM

Quote:

And the directory is empty as well, as I suspect it should be since it wasn't able to access the lock file.
I guess the lock file is created when you run the setup-ds.pl script, to avoid running slapd while you're still configuring it. You said you've tried with setup-ds-admin.pl with the same results, but I suggest you to use the latter, as you need to create also the administration server for your slapd instance.
Anyway it could be a SELinux permissions problem, so try to disable it and see if it works. Also take a look at this howto and consider creating a new user:group (like fds:fds in the example), to run the directory server

Regards

neocontrol 07-12-2011 10:16 AM

Quote:

Anyway it could be a SELinux permissions problem, so try to disable it and see if it works.
Already had this disabled.

Quote:

Also take a look at this howto and consider creating a new user:group (like fds:fds in the example), to run the directory server
I'll give this a try and see how it works out.

Thanks!


All times are GMT -5. The time now is 08:54 PM.