Archive for the ‘Service’ Category

I was getting this error in my log files:

dovecot: IMAP(user): Time just moved backwards by 1 seconds. I'll sleep now until we're back in present.
http://wiki.dovecot.org/TimeMovedBackwards: 1 Time(s)

Looking at the website that was linked in the error message (very helpful), the solution was to edit /etc/ntp.conf and add the following:

# Added following to get rid of dovecot "Time moved backwards" error
tinker step 0

Restart ntpd and after two days the error stopped showing up in my logs. Yay!

After a drive failure on one of our servers, I had to remake the quota info. Here’s what I did:

[root@serv1 home]# touch /local/home/aquota.user
[root@serv1 home]# chmod 600 /local/home/aquota.user
[root@cppc home]# quotacheck -vgum /local/home
quotacheck: WARNING -  Quotafile /local/home/aquota.user was probably truncated. Can't save quota settings...
quotacheck: Scanning /dev/sda1 [/local/home] |

Now I could just reset all the user quotas for things to work.

[root@serv1 home]# setquota -u user1 1000000 1500000 200000 300000 -a

I had already mounted the disk with the correct options, but make sure /etc/fstab looks like:

/dev/sda1		/local/home		ext3	defaults,usrquota	1 2

I also then also restarted nfslock, which may or may not have needed to be done. This could have been a totally unrelated problem we were having at the same time.

I had a problem where I had taken a drive out of /etc/fstab, but it was still mounting on a reboot. I finally traced the problem to the haldaemon and fstab-sync. My understanding is haldaemon is the thing that watches for hardware changes and automounts flash drives and the like. It also can update /etc/fstab with these changes. This is something that I don’t want, so my first impulse was to turn haldaemon off. But then, if someone did plug in a flash drive, it would have to be mounted manually. After reading a bit on haldaemon, I found that I could disable the changing of the fstab file by changing a link. Specifically, I had to change the link /etc/hal/device.d/50-fstab-sync.hal from pointing to /usr/bin/fstab-sync to /bin/false.

Sendmail has a feature that puts in a delay after the initial client connect, before issuing the greeting. Some spammers don’t wait for the greeting, but just send their commands. Sendmail can then look for commands that come in before the greeting and know that these commands are bad. It works pretty well.

Edit /etc/mail/sendmail.mc

dnl # Pause to try to catch spammers.  Drops mail from spammers who don't
dnl # wait for the 5 second delay
FEATURE(`greet_pause',5000)

Edit /etc/mail/access to not use the delay for mail from the localhost

GreetPause:localhost	0

Then, put the changes into effect.

make -C /etc/mail
makemap hash /etc/mail/access.db < /etc/mail/access
/etc/rc.d/init.d/sendmail restart

Check what's being dropped with:

grep pre-greeting /var/log/maillog

After around 40 minutes, I had already dropped over 50 connections.

Must reload autofs for changes to auto.master to take effect.

/etc/rc.d/init.d/autofs reload

The command that brings up the window where one can change which startup items to run automatically is:

msconfig

Once you have a cern account, the node to use to login is lxplus.cern.ch.

Queue settings for the CP group pbs queue:

[root@cp_server bin]# ./qmgr
Max open servers: 4
Qmgr: p s
#
# Set server attributes.
#
set server acl_hosts = cps1
set server log_events = 511
set server mail_from = adm
set server scheduler_iteration = 600
set server node_check_rate = 150
set server tcp_timeout = 6
Qmgr: c q cp1
Qmgr: s q cp1 queue_type=Execution
Qmgr: s q cp1 from_route_only=True
Qmgr: s q cp1 resources_max.cput=240:00:00
Qmgr: s q cp1 resources_min.cput=00:00:01
Qmgr: s q cp1 enabled=True
Qmgr: s q cp1 started=True
Qmgr: c q cp
Qmgr: s q cp queue_type=Route
Qmgr: s q cp route_destinations=cp1
Qmgr: s q cp route_held_jobs=True
Qmgr: s q cp route_waiting_jobs=True
Qmgr: s q cp enabled=True
Qmgr: s q cp started=True

Qmgr: s s scheduling=True
Qmgr: s s acl_host_enable=True
Qmgr: s s acl_hosts=*.uchicago.edu
Qmgr: s s default_queue=cp
Qmgr: s s query_other_jobs=True
Qmgr: s s resources_default.nodect=1
Qmgr: s s resources_default.nodes=1
Qmgr: s s resources_max.walltime=96:00:00

Had some problems with people on cdf not having quotas. If I tried to reset the quota, I got errors like the following in the log file:

Feb  5 13:13:42 serv kernel: VFS: Inserting already present quota entry (block 14).
Feb  5 13:13:42 serv kernel: VFS: Error -5 occured while creating quota.

The solution was to run the following commands:

quotaoff -a
quotacheck -auvg
quotaon -a

Then reset the quotas of those users who don’t have them.

To check when CST or CDT is set to start:

 zdump -v /usr/share/zoneinfo/CST6CDT |grep 2007