LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
LinkBack Search this Thread
Old 06-05-2006, 12:05 PM   #1
Hampster
Member
 
Registered: May 2003
Location: Washington (the State)
Distribution: Ubuntu 8
Posts: 50

Rep: Reputation: 15
Port closed down


I admin a single server, which runs custom php/mysql software, a shared location for files, and LDAP. Last week, the power was accidently cut to the server. It rebooted and 2 of the 3 above services are running just fine.

When I try to use LDAP, I get an "Cannot connect to port 389" error. I've checked the firewall setting, and 389/tcp and 389/udp are open. I cannot connect remotely, and the server cannot loopback to itself.

The services seem to be running just fine, but all directory lookups fail.

Any advice or information to getting LDAP working again would be appreciated.


--Dave
 
Old 06-05-2006, 12:10 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 58
Did you get any errors in your ldap error log file?

Can you post the output from:
netstat -nlp
iptables -nL
ps -efH
 
Old 06-05-2006, 12:51 PM   #3
Hampster
Member
 
Registered: May 2003
Location: Washington (the State)
Distribution: Ubuntu 8
Posts: 50

Original Poster
Rep: Reputation: 15
[dave@Patagonia ~]$ netstat -nlp
(No info could be read for "-p": geteuid()=500 but you should be root.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:1025 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:1026 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:1027 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:627 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:5335 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:920 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN -
tcp 0 0 :::6000 :::* LISTEN -
tcp 0 0 :::22 :::* LISTEN -
tcp 0 0 ::1:6010 :::* LISTEN -
udp 0 0 0.0.0.0:2049 0.0.0.0:* -
udp 0 0 0.0.0.0:1026 0.0.0.0:* -
udp 0 0 192.168.1.55:137 0.0.0.0:* -
udp 0 0 0.0.0.0:137 0.0.0.0:* -
udp 0 0 192.168.1.55:138 0.0.0.0:* -
udp 0 0 0.0.0.0:138 0.0.0.0:* -
udp 0 0 0.0.0.0:917 0.0.0.0:* -
udp 0 0 127.0.0.1:1056 0.0.0.0:* -
udp 0 0 127.0.0.1:1057 0.0.0.0:* -
udp 0 0 0.0.0.0:5353 0.0.0.0:* -
udp 0 0 0.0.0.0:621 0.0.0.0:* -
udp 0 0 0.0.0.0:111 0.0.0.0:* -
udp 0 0 0.0.0.0:624 0.0.0.0:* -
udp 0 0 0.0.0.0:631 0.0.0.0:* -
udp 0 0 192.168.1.55:123 0.0.0.0:* -
udp 0 0 127.0.0.1:123 0.0.0.0:* -
udp 0 0 0.0.0.0:123 0.0.0.0:* -
udp 0 0 :::123 :::* -
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 9138 - /var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 10369 - /var/run/dbus/system_dbus_socket
unix 2 [ ACC ] STREAM LISTENING 11323 - /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 6647 - /var/lib/mysql/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 10324 - /tmp/.font-unix/fs-1

-----------------------

[dave@Patagonia ~]$ iptables -nl
-bash: iptables: command not found

------------------------
[dave@Patagonia ~]$ ps -efH

{snip}
root 5829 1 0 Jun02 tty6 00:00:00 /sbin/mingetty tty6
ldap 6128 1 99 Jun02 ? 2-19:50:28 /usr/sbin/slapd -u ldap -g ldap -l LOCAL0 -s 0 -h ldap:/// ldaps:///
 
Old 06-05-2006, 12:53 PM   #4
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,538

Rep: Reputation: 58
i cant help, but run the iptables command suggested as root
 
Old 06-05-2006, 12:59 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 58
Sorry, can you run them all as root, I should have said that before.
 
Old 06-05-2006, 04:57 PM   #6
Hampster
Member
 
Registered: May 2003
Location: Washington (the State)
Distribution: Ubuntu 8
Posts: 50

Original Poster
Rep: Reputation: 15
[root@Patagonia dave]# netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:1025 0.0.0.0:* LISTEN 4203/hpiod
tcp 0 0 127.0.0.1:1026 0.0.0.0:* LISTEN 4215/python
tcp 0 0 0.0.0.0:1027 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 5574/smbd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2650/portmap
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 5745/httpd
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 5019/X
tcp 0 0 0.0.0.0:627 0.0.0.0:* LISTEN 4261/rpc.statd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 5523/proftpd: (acce
tcp 0 0 127.0.0.1:5335 0.0.0.0:* LISTEN 5102/mDNSResponder
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN 4316/cupsd
tcp 0 0 0.0.0.0:920 0.0.0.0:* LISTEN 5405/rpc.mountd
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 27641/0
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 5745/httpd
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 5574/smbd
tcp 0 0 :::6000 :::* LISTEN 5019/X
tcp 0 0 :::22 :::* LISTEN 5190/sshd
tcp 0 0 ::1:6010 :::* LISTEN 27641/0
udp 0 0 0.0.0.0:2049 0.0.0.0:* -
udp 0 0 0.0.0.0:1026 0.0.0.0:* -
udp 0 0 192.168.1.55:137 0.0.0.0:* 5585/nmbd
udp 0 0 0.0.0.0:137 0.0.0.0:* 5585/nmbd
udp 0 0 192.168.1.55:138 0.0.0.0:* 5585/nmbd
udp 0 0 0.0.0.0:138 0.0.0.0:* 5585/nmbd
udp 0 0 0.0.0.0:917 0.0.0.0:* 5405/rpc.mountd
udp 0 0 127.0.0.1:1056 0.0.0.0:* 27542/smbd
udp 0 0 127.0.0.1:1058 0.0.0.0:* 27803/smbd
udp 0 0 127.0.0.1:1059 0.0.0.0:* 27807/smbd
udp 0 0 0.0.0.0:5353 0.0.0.0:* 5102/mDNSResponder
udp 0 0 0.0.0.0:621 0.0.0.0:* 4261/rpc.statd
udp 0 0 0.0.0.0:111 0.0.0.0:* 2650/portmap
udp 0 0 0.0.0.0:624 0.0.0.0:* 4261/rpc.statd
udp 0 0 0.0.0.0:631 0.0.0.0:* 4316/cupsd
udp 0 0 192.168.1.55:123 0.0.0.0:* 5259/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 5259/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 5259/ntpd
udp 0 0 :::123 :::* 5259/ntpd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 9138 4179/acpid /var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 10369 4739/dbus-daemon-1 /var/run/dbus/system_dbus_socket
unix 2 [ ACC ] STREAM LISTENING 11323 5019/X /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 6647 2604/mysqld /var/lib/mysql/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 10324 4715/xfs /tmp/.font-unix/fs-1

-------------------
[root@Patagonia dave]# iptables -nL
Chain AllowICMPs (2 references)
target prot opt source destination
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 3 code 4
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 11

Chain Drop (1 references)
target prot opt source destination
RejectAuth all -- 0.0.0.0/0 0.0.0.0/0
dropBcast all -- 0.0.0.0/0 0.0.0.0/0
AllowICMPs icmp -- 0.0.0.0/0 0.0.0.0/0
dropInvalid all -- 0.0.0.0/0 0.0.0.0/0
DropSMB all -- 0.0.0.0/0 0.0.0.0/0
DropUPnP all -- 0.0.0.0/0 0.0.0.0/0
dropNotSyn tcp -- 0.0.0.0/0 0.0.0.0/0
DropDNSrep all -- 0.0.0.0/0 0.0.0.0/0

Chain DropDNSrep (2 references)
target prot opt source destination
DROP udp -- 0.0.0.0/0 0.0.0.0/0 udp spt:53

Chain DropSMB (1 references)
target prot opt source destination
DROP udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:135
DROP udp -- 0.0.0.0/0 0.0.0.0/0 udp dpts:137:139
DROP udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:445
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:135
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:139
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:445

Chain DropUPnP (2 references)
target prot opt source destination
DROP udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:1900

Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
Ifw all -- 0.0.0.0/0 0.0.0.0/0
eth0_in all -- 0.0.0.0/0 0.0.0.0/0
Reject all -- 0.0.0.0/0 0.0.0.0/0
LOG all -- 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 6 prefix `Shorewall:INPUT:REJECT:'
reject all -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy DROP)
target prot opt source destination
eth0_fwd all -- 0.0.0.0/0 0.0.0.0/0
Reject all -- 0.0.0.0/0 0.0.0.0/0
LOG all -- 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 6 prefix `Shorewall:FORWARD:REJECT:'
reject all -- 0.0.0.0/0 0.0.0.0/0

Chain Ifw (1 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0 set ifw_wl src
DROP all -- 0.0.0.0/0 0.0.0.0/0 set ifw_bl src
IFWLOG all -- 0.0.0.0/0 0.0.0.0/0 state INVALID,NEW psd weight-threshold: 10 delay-threshold: 10000 lo-ports-weight: 1 hi-ports-weight: 2 IFWLOG prefix 'SCAN'

Chain OUTPUT (policy DROP)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
fw2net all -- 0.0.0.0/0 0.0.0.0/0
Reject all -- 0.0.0.0/0 0.0.0.0/0
LOG all -- 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 6 prefix `Shorewall:OUTPUT:REJECT:'
reject all -- 0.0.0.0/0 0.0.0.0/0

Chain Reject (4 references)
target prot opt source destination
RejectAuth all -- 0.0.0.0/0 0.0.0.0/0
dropBcast all -- 0.0.0.0/0 0.0.0.0/0
AllowICMPs icmp -- 0.0.0.0/0 0.0.0.0/0
dropInvalid all -- 0.0.0.0/0 0.0.0.0/0
RejectSMB all -- 0.0.0.0/0 0.0.0.0/0
DropUPnP all -- 0.0.0.0/0 0.0.0.0/0
dropNotSyn tcp -- 0.0.0.0/0 0.0.0.0/0
DropDNSrep all -- 0.0.0.0/0 0.0.0.0/0

Chain RejectAuth (2 references)
target prot opt source destination
reject tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:113

Chain RejectSMB (1 references)
target prot opt source destination
reject udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:135
reject udp -- 0.0.0.0/0 0.0.0.0/0 udp dpts:137:139
reject udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:445
reject tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:135
reject tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:139
reject tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:445

Chain all2all (0 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
Reject all -- 0.0.0.0/0 0.0.0.0/0
LOG all -- 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 6 prefix `Shorewall:all2all:REJECT:'
reject all -- 0.0.0.0/0 0.0.0.0/0

Chain dropBcast (2 references)
target prot opt source destination
DROP all -- 0.0.0.0/0 0.0.0.0/0 PKTTYPE = broadcast
DROP all -- 0.0.0.0/0 0.0.0.0/0 PKTTYPE = multicast

Chain dropInvalid (2 references)
target prot opt source destination
DROP all -- 0.0.0.0/0 0.0.0.0/0 state INVALID

Chain dropNotSyn (2 references)
target prot opt source destination
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp flags:!0x17/0x02

Chain dynamic (2 references)
target prot opt source destination

Chain eth0_fwd (1 references)
target prot opt source destination
dynamic all -- 0.0.0.0/0 0.0.0.0/0 state INVALID,NEW

Chain eth0_in (1 references)
target prot opt source destination
dynamic all -- 0.0.0.0/0 0.0.0.0/0 state INVALID,NEW
net2fw all -- 0.0.0.0/0 0.0.0.0/0

Chain fw2net (1 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain net2all (1 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
Drop all -- 0.0.0.0/0 0.0.0.0/0
LOG all -- 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 6 prefix `Shorewall:net2allROP:'
DROP all -- 0.0.0.0/0 0.0.0.0/0

Chain net2fw (1 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 137,138,139,445,1024:1100,631,389
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443,22,20,21,137,138,139,445,1024:1100,631,389
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 8
net2all all -- 0.0.0.0/0 0.0.0.0/0

Chain reject (11 references)
target prot opt source destination
DROP all -- 0.0.0.0/0 0.0.0.0/0 PKTTYPE = broadcast
DROP all -- 0.0.0.0/0 0.0.0.0/0 PKTTYPE = multicast
DROP all -- 192.168.1.255 0.0.0.0/0
DROP all -- 255.255.255.255 0.0.0.0/0
DROP all -- 224.0.0.0/4 0.0.0.0/0
REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 reject-with tcp-reset
REJECT udp -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
REJECT icmp -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-unreachable
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain shorewall (0 references)
target prot opt source destination

Chain smurfs (0 references)
target prot opt source destination
LOG all -- 192.168.1.255 0.0.0.0/0 LOG flags 0 level 6 prefix `Shorewall:smurfsROP:'
DROP all -- 192.168.1.255 0.0.0.0/0
LOG all -- 255.255.255.255 0.0.0.0/0 LOG flags 0 level 6 prefix `Shorewall:smurfsROP:'
DROP all -- 255.255.255.255 0.0.0.0/0
LOG all -- 224.0.0.0/4 0.0.0.0/0 LOG flags 0 level 6 prefix `Shorewall:smurfsROP:'
DROP all -- 224.0.0.0/4 0.0.0.0/0

-------------------------
[root@Patagonia dave]# ps -elH
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
4 S 0 1 0 0 76 0 - 391 select ? 00:00:00 init
1 S 0 2 1 0 94 19 - 0 ksofti ? 00:00:00 ksoftirqd/0
5 S 0 3 1 0 70 -5 - 0 worker ? 00:00:00 events/0
1 S 0 4 1 0 75 -5 - 0 worker ? 00:00:00 khelper
1 S 0 5 1 0 70 -5 - 0 worker ? 00:00:00 kthread
1 S 0 7 5 0 80 -5 - 0 worker ? 00:00:00 kacpid
1 S 0 96 5 0 70 -5 - 0 worker ? 00:00:00 kblockd/0
1 S 0 128 5 0 75 0 - 0 pdflus ? 00:00:00 pdflush
1 S 0 129 5 0 75 0 - 0 pdflus ? 00:00:00 pdflush
1 S 0 131 5 0 77 -5 - 0 worker ? 00:00:00 aio/0
1 S 0 5396 5 0 71 -5 - 0 worker ? 00:00:00 rpciod/0
1 S 0 130 1 0 75 0 - 0 kswapd ? 00:00:00 kswapd0
1 S 0 720 1 0 75 0 - 0 serio_ ? 00:00:00 kseriod
1 S 0 817 1 0 75 0 - 0 md_thr ? 00:00:00 md1_raid1
1 S 0 819 1 0 75 0 - 0 kjourn ? 00:00:00 kjournald
5 S 0 961 1 0 77 -4 - 390 select ? 00:00:00 udevd
1 S 0 1172 1 0 75 0 - 0 hub_th ? 00:00:00 khubd
1 S 0 1518 1 0 75 0 - 0 md_thr ? 00:00:00 md0_raid1
1 S 0 1519 1 0 75 0 - 0 md_thr ? 00:00:00 md2_raid1
1 S 0 1535 1 0 75 0 - 0 kjourn ? 00:00:00 kjournald
1 S 0 1536 1 0 75 0 - 0 kjourn ? 00:00:00 kjournald
4 S 0 2571 1 0 78 0 - 555 wait ? 00:00:00 mysqld_safe
4 S 75 2604 2571 0 76 0 - 27225 select ? 00:00:01 mysqld
5 S 72 2650 1 0 76 0 - 422 poll ? 00:00:00 portmap
5 S 0 4117 1 0 76 0 - 402 select ? 00:00:00 syslogd
5 S 0 4129 1 0 76 0 - 585 syslog ? 00:00:00 klogd
1 S 0 4179 1 0 76 0 - 387 poll ? 00:00:00 acpid
1 S 0 4203 1 0 76 0 - 5226 wait_f ? 00:00:00 hpiod
1 S 0 4215 1 0 76 0 - 2231 select ? 00:00:00 python
5 S 0 4261 1 0 81 0 - 422 select ? 00:00:00 rpc.statd
5 S 0 4316 1 0 76 0 - 2332 select ? 00:00:07 cupsd
5 S 70 4715 1 0 76 0 - 1004 select ? 00:00:00 xfs
5 S 14 4739 1 0 75 0 - 556 poll ? 00:00:00 dbus-daemon-1
1 S 0 4763 1 0 76 0 - 1006 poll ? 00:00:03 hald
1 S 0 4846 1 0 76 0 - 457 select ? 00:00:00 mandi
5 S 0 4985 1 0 76 0 - 699 select ? 00:00:00 nifd
0 S 0 5010 1 0 75 0 - 856 rt_sig ? 00:00:00 xdm
4 S 0 5019 5010 0 75 0 - 2262 select tty7 00:00:00 X
1 S 0 5051 5010 0 76 0 - 903 select ? 00:00:00 xdm
1 S 65534 5102 1 0 76 0 - 2855 rt_sig ? 00:00:00 mDNSResponder
1 S 2 5165 1 0 76 0 - 420 nanosl ? 00:00:00 atd
5 S 0 5190 1 0 76 0 - 1069 select ? 00:00:00 sshd
4 S 0 27639 5190 0 75 0 - 1736 unix_s ? 00:00:00 sshd
5 S 500 27641 27639 0 75 0 - 1762 select ? 00:00:00 sshd
0 S 500 27642 27641 0 76 0 - 1032 read_c pts/0 00:00:00 bash
4 S 0 27732 5190 0 76 0 - 1735 unix_s ? 00:00:00 sshd
5 S 500 27734 27732 0 76 0 - 1755 select ? 00:00:00 sshd
0 S 500 27735 27734 0 75 0 - 1031 wait pts/1 00:00:00 bash
4 S 0 27918 27735 0 77 0 - 632 wait pts/1 00:00:00 su
4 S 0 27919 27918 0 76 0 - 907 wait pts/1 00:00:00 bash
0 R 0 27964 27919 0 77 0 - 631 - pts/1 00:00:00 ps
5 S 78 5259 1 0 76 0 - 1008 select ? 00:00:00 ntpd
1 S 0 5317 1 0 78 0 - 536 select ? 00:00:00 xinetd
5 S 0 5387 1 0 75 0 - 0 svc_re ? 00:00:00 nfsd
1 S 0 5388 1 0 75 0 - 0 svc_re ? 00:00:00 nfsd
1 S 0 5389 1 0 75 0 - 0 svc_re ? 00:00:00 nfsd
1 S 0 5390 1 0 75 0 - 0 svc_re ? 00:00:00 nfsd
1 S 0 5391 1 0 75 0 - 0 svc_re ? 00:00:00 nfsd
1 S 0 5392 1 0 75 0 - 0 svc_re ? 00:00:00 nfsd
1 S 0 5393 1 0 75 0 - 0 svc_re ? 00:00:00 nfsd
1 S 0 5394 1 0 75 0 - 0 svc_re ? 00:00:00 nfsd
1 S 0 5395 1 0 80 0 - 0 svc_re ? 00:00:00 lockd
1 S 0 5405 1 0 81 0 - 433 select ? 00:00:00 rpc.mountd
1 S 73 5499 1 0 75 0 - 1085 pause ? 00:00:00 freshclam
5 S 65534 5523 1 0 76 0 - 1394 select ? 00:00:00 proftpd
1 S 0 5547 1 0 76 0 - 400 nanosl ? 00:00:00 crond
5 S 0 5574 1 0 76 0 - 2194 select ? 00:00:00 smbd
1 S 0 5584 5574 0 78 0 - 2194 pause ? 00:00:00 smbd
5 S 0 27542 5574 0 76 0 - 2271 select ? 00:00:00 smbd
5 S 500 27803 5574 0 75 0 - 2272 select ? 00:00:00 smbd
5 S 500 27807 5574 0 75 0 - 2270 select ? 00:00:00 smbd
5 S 0 5585 1 0 76 0 - 1544 select ? 00:00:00 nmbd
1 S 0 5745 1 0 76 0 - 4387 select ? 00:00:00 httpd
0 S 0 5746 5745 0 79 0 - 28 pipe_w ? 00:00:00 advxsplitlogfil
5 S 71 5753 5745 0 76 0 - 4537 poll ? 00:00:00 httpd
5 S 71 5754 5745 0 76 0 - 4520 fcntl_ ? 00:00:00 httpd
5 S 71 5755 5745 0 76 0 - 4930 fcntl_ ? 00:00:00 httpd
5 S 71 5756 5745 0 76 0 - 4516 fcntl_ ? 00:00:00 httpd
5 S 71 5757 5745 0 76 0 - 4525 fcntl_ ? 00:00:00 httpd
5 S 71 5758 5745 0 76 0 - 4900 fcntl_ ? 00:00:00 httpd
5 S 71 5759 5745 0 76 0 - 4520 fcntl_ ? 00:00:00 httpd
5 S 71 5760 5745 0 76 0 - 4508 fcntl_ ? 00:00:00 httpd
4 S 0 5824 1 0 78 0 - 386 read_c tty1 00:00:00 mingetty
4 S 0 5825 1 0 78 0 - 387 read_c tty2 00:00:00 mingetty
4 S 0 5826 1 0 78 0 - 386 read_c tty3 00:00:00 mingetty
4 S 0 5827 1 0 78 0 - 387 read_c tty4 00:00:00 mingetty
4 S 0 5828 1 0 78 0 - 386 read_c tty5 00:00:00 mingetty
4 S 0 5829 1 0 78 0 - 387 read_c tty6 00:00:00 mingetty
1 R 79 6128 1 99 85 0 - 1777 - ? 2-23:59:18 slapd
 
Old 06-06-2006, 08:02 AM   #7
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 59
What do you mean by
Quote:
the server cannot loopback to itself
Do you mean that the "localhost" loopback is unavailable? If so, have you checked /etc/hosts?
 
Old 06-06-2006, 10:46 AM   #8
Hampster
Member
 
Registered: May 2003
Location: Washington (the State)
Distribution: Ubuntu 8
Posts: 50

Original Poster
Rep: Reputation: 15
When I run ldapsearch or use phpmysqladmin from the same machine running the directory server, it needs to connect to itself through port 389 to make a query. Since I get a "cannot connect to server" error, I think this is a networking/firewall problem, and not an ldap problem.

I could be wrong about this though.

--Dave
 
Old 06-06-2006, 01:29 PM   #9
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 58
Looking at the ps output you can see that the process is running but acording to netstat there is nothing listening on the port.

Did you check your splad log file to see what the startup messages were?

I would suggest stopping the process then running it from a terminal with and additional "-d 255" parameter to get more verbose output.
 
Old 06-06-2006, 03:16 PM   #10
Hampster
Member
 
Registered: May 2003
Location: Washington (the State)
Distribution: Ubuntu 8
Posts: 50

Original Poster
Rep: Reputation: 15
The log file is empty, evan after starting with the -d 255 option. However a WHOLE lotta schema configuration is output when launched from the command line, and ends with this......

slapd startup: initiated.
backend_startup_one: starting "cn=config"
backend_startup_one: starting "dc=CandRinc,dc=com"
bdb_db_open: dc=CandRinc,dc=com
bdb_db_open: unclean shutdown detected; attempting recovery.
bdb_db_open: dbenv_open(/var/lib/ldap)


It looks like the power going out did corrupt things, and it can't finish launching. Any more advice?

There were only about 200 names, phone #s and addressed in there:-(. I thought ext3 was supposed to help with this kind of thing.

--Dave
 
Old 06-07-2006, 01:00 PM   #11
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 58
I would try restoring the databases from a last good backup or recover to a time before the crash with db_recover.
 
Old 07-03-2006, 01:22 PM   #12
jmwhite5
LQ Newbie
 
Registered: Jul 2006
Location: San Jose, CA, USA
Distribution: Centos 4.8 & Fedora 11
Posts: 4

Rep: Reputation: 0
The same thing happened to me last week. The power went out, and the first thing I noticed when the power came back was that my LDAP server was no longer listening to 389 and 636. I noticed that slapd stopped at the same line you mentioned:

bdb_db_open: dbenv_open(/var/lib/ldap)

So I ran db_recover and it worked. Here are the steps I took: (I fist cded to /var/lib/ldap)


[root@jumpy ldap]# db_recover -v
db_recover: Finding last valid log LSN: file: 1 offset 7136117
db_recover: Recovery starting from [1][7110353]
db_recover: Recovery complete at Mon Jul 3 11:13:08 2006
db_recover: Maximum transaction ID 80000285 Recovery checkpoint [1][7136725]
[root@jumpy ldap]#
 
Old 07-03-2006, 01:29 PM   #13
Hampster
Member
 
Registered: May 2003
Location: Washington (the State)
Distribution: Ubuntu 8
Posts: 50

Original Poster
Rep: Reputation: 15
Unfortunately, db-recover didn't work, I couldn't start slapd from the command line either. I copied the /var/db directory (just in case), removed and re-installed slapd. When I started it from the command line, it complained, but started.

Lo and behold, all my data was still there!!!!!

It still complains about a line from the .conf file. When I try to use the Mandriva's "Services" control panel, slapd won't start, but it will work from the command line.

I haven't had a the spare time to devote to detective work, but I'm happy now.

--Dave
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Port Scan: Closed Port instead of Stealth unihiekka Linux - Security 9 12-26-2005 08:51 PM
Port to be closed. lancillotto4648 Debian 7 12-09-2004 06:21 AM
is the 25 port closed abd_bela Linux - Networking 5 08-18-2004 08:27 AM
port closed hotrodowner Linux - Networking 2 12-02-2002 05:06 AM
firewall.rc.config says :"open port 8080" but nmap says port is closed saavik Linux - Security 2 02-14-2002 12:16 PM


All times are GMT -5. The time now is 04:35 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration