can't create new users/domains

TheBear

Verified User
Joined
Apr 16, 2004
Messages
78
Hello,

As of a couple of days ago we can no longer create new hosting accounts on our DA server.

Trying to create a new user results in the system timing out, then if you try to create the user/account again, we get a message saying the username already exists - yet we can't see/find this username listed anyplace.

I went ahead and upgraded to the latest version (we had been on 1.25).

Any ideas on what is going on?

Thanks
 
Hello,

When DA hangs during user creation, it's usually when it's calling a system command that is not returning. Possible commands that are hanging:
  • The setquota command. This command is used for setting the users disk usage limits. You can run
    Code:
    ps -ax | grep quota
    to see if there are any instances of quota related commands running. If you see several, then you'd need to reboot and run the quotacheck command to fix your quotas.
    http://help.directadmin.com/item.php?id=42
  • Exim, while sending the welcome message. Try creating the user without the "send welcome message" checkbox to see if that changes anything. I've noticed a few servers were using custom sendmail scripts as a wrapper around exim to log spamming which did not 'return' as exim does, causing DA to hang waiting for it to quit.
  • multiserver dns clustering. If the connection is slow, or setup incorrectly, the connect command can hang while trying to get through. Always test your multiserver connections with the "test connections" button on the multi server page.
Those are the commands off the top of my head that I can recall causing user creation to hang.

John
 
Hello,

This is happening again.

DirectAdmin Support said:
Hello,

When DA hangs during user creation, it's usually when it's calling a system command that is not returning. Possible commands that are hanging:
  • The setquota command. This command is used for setting the users disk usage limits. You can run
    Code:
    ps -ax | grep quota
    to see if there are any instances of quota related commands running. If you see several, then you'd need to reboot and run the quotacheck command to fix your quotas.
    http://help.directadmin.com/item.php?id=42
  • Exim, while sending the welcome message. Try creating the user without the "send welcome message" checkbox to see if that changes anything. I've noticed a few servers were using custom sendmail scripts as a wrapper around exim to log spamming which did not 'return' as exim does, causing DA to hang waiting for it to quit.
  • multiserver dns clustering. If the connection is slow, or setup incorrectly, the connect command can hang while trying to get through. Always test your multiserver connections with the "test connections" button on the multi server page.
Those are the commands off the top of my head that I can recall causing user creation to hang.

John

There are quota processes running after/while this happens. Not sure which ones are appropriate and those that might not be.

I have tried the quota rebuild as mentioned on the link provided above. Not sure how long this should take, but it just sits there (going on 2 hours now) after initiating the command.

I have tried creating a user and not sending the welcome email, still no joy (this is after restarting the box). We do not use any custom anything on this box.

We are not using the multiserver setup.

The only thing I can think of is that when trying to create the user that failed I was using Safari 2.0.3 on Mac OSX 10.4.5

At this point we are unable to create any users. Really stuck here. I need to be able to create users and to get rid of the usernames that do not show up anyplace in the GUI but that DA insists now exist.
 
Last edited:
Hello,

If you are seeing many quota commands hanging around in the processes list, then that's the problem.

All of the setquota commands should return/exit almost instantly after they're called.
The quota system will only allow 1 thing to happen at a time, so if the first task regarding quotas decides to never quit, then all of the setquota commands called after that just sit and hang waiting for the first process to exit.

The trick is to find out what that first quota related command is.
It might be a quotacheck command, couldn't say for sure.

Once the system gets into this state, then usually the only solution is to:

1) reboot the machine
2) shut off the quotas:
Code:
quotaoff -a
3) delete the quota files, eg /aquota.user, /aquota.group for the / partition on linux, or /quota.user, /quota.group on freebsd)
4) re-create the quota files with the command that you get.. when you type the follow (it's different depending on OS)
Code:
grep quotacheck /usr/local/directadmin/scripts/fstab.sh
5) Once the quota files are re-created, then type:
Code:
quotaon -a
6) Then type:
Code:
echo "action=rewrite&value=quota" >> /usr/local/directadmin/data/task.queue
to get DA to reset the quota limits.

7) So.. assuming the quotas are all fixed up, you'll probably still have the user account left hanging around on your system, which prevents you from adding it in DA. To delete a non-existant DA user account (but existant system account), type:
Redhat:
Code:
userdel -r [b]username[/b]
FreeBSD:
Code:
pw userdel -n [b]username[/b]

John
 
Fellas,

Is there a bug fix for this?

The machine just keeps getting into this state.

We don't do anything custom on this machine, it's pretty much an out of the box Fedora/DA setup.

I am a different tech and will walk through the solutions provided but I don't understand why the machine keeps getting in this state.

Very low traffic machine and no custom anything.

So..

Any ideas if there will be a patch to keep this from happening in the future?

Are we the only one's experiencing this with DA?
 
If it helps, here is the output when I issued the grep command you mentioned.

Following the rest of the instructions now:

Warning: bad syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
5724 ? S 0:00 /bin/sh -c /sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a;
5735 ? D 0:00 /sbin/quotaon -a
22599 ? S 0:00 sh -c /usr/sbin/repquota / > /home/tmp/quota-dump
22600 ? D 0:00 /usr/sbin/repquota /
13288 ? S 0:00 sh -c /usr/sbin/repquota / > /home/tmp/quota-dump
13291 ? D 0:00 /usr/sbin/repquota /
29003 ? S 0:00 sh -c /usr/sbin/repquota / > /home/tmp/quota-dump
29004 ? D 0:00 /usr/sbin/repquota /
10543 ? S 0:00 sh -c /usr/sbin/repquota / > /home/tmp/quota-dump
10544 ? D 0:00 /usr/sbin/repquota /
6246 ? D 0:00 /usr/sbin/setquota yoispkb 102400 102400 0 0 /
9047 ? D 0:00 /usr/sbin/setquota kbyoisp 102400 102400 0 0 /
9819 ? D 0:00 /usr/sbin/setquota ispkb 102400 102400 0 0 /
16467 ? S 0:00 sh -c (/usr/sbin/repquota /) 2>&1
16468 ? D 0:00 /usr/sbin/repquota /
3478 ? D 0:00 /usr/sbin/repquota /
29579 ? S 0:00 sh -c /usr/sbin/repquota / > /home/tmp/quota-dump
29580 ? D 0:00 /usr/sbin/repquota /
11749 ? S 0:00 sh -c /usr/sbin/repquota / > /home/tmp/quota-dump
11750 ? D 0:00 /usr/sbin/repquota /
21705 ? S 0:00 sh -c /usr/sbin/repquota / > /home/tmp/quota-dump
21706 ? D 0:00 /usr/sbin/repquota /
14143 ? S 0:00 /bin/sh -c /sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a;
14148 ? D 0:00 /sbin/quotaoff -a
9564 ? S 0:00 sh -c /usr/sbin/repquota / > /home/tmp/quota-dump
9565 ? D 0:00 /usr/sbin/repquota /
17985 ? D 0:00 /usr/sbin/setquota gohouse 102400 102400 0 0 /
10969 ? D 0:00 /usr/sbin/setquota sellhouse 102400 102400 0 0 /
10603 pts/1 R 0:00 grep quota
 
By that output, it looks like:

/bin/sh -c /sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a;

has started the pileup..
CHeck your /etc/init.d/directadmin_cron for this command which is probably run every sunday. Remove it (comment it out) then restart crond.

If corrupted quota files are causing it, try:
1) reboot
2) quotaoff -a #hopefully this won't hang the box
3) delete /aquota.* /home/aquota.*
4) /sbin/quotacheck -cavugmf;
5) quotaon -a

Redoing the quota files is about the only suggestion I can offer, apart from disabling the running of the quotacheck command via a cron.

John
 
I will dig deeper into your solution as soon as I can reboot the box.

Seems that the machine refuses to reboot.

I have never seen this before, ever..

I am logged in via SSH and I have issued "reboot" and "/sbin/shutdown -r now" at least 10 times since last night.

I get the "System is going down for reboot now" message in my SSH console but it never reboots.

I tried killing some processes like Exim and httpd to see if these were preventing it from rebooting but.. No dice..

I will have to drive over to the NOC just to hit the power switch I guess..

Anyone ever seen this before?

Running vanilla install of DA and Fedora 2 or 3 can't remember which.

Never had this issue with this machine or any other for that matter, ever. I am puzzled..
 
If anyone is curious...

I had to drive into the NOC and actually shut off the machine in order to get it to reboot.

I tried reboot at the console and it did the same thing it did remotely, nothing..

Go over the suggested fixes now.
 
Back
Top