Page not found – ShopingServer Wiki http://wiki.shopingserver.com Tutorials and Articles About Technology and Gadgets Fri, 17 Apr 2020 20:23:02 +0000 en-US hourly 1 https://wordpress.org/?v=5.5.14 http://wiki.shopingserver.com/wp-content/uploads/2018/07/cropped-favicon-150x150.png Page not found – ShopingServer Wiki http://wiki.shopingserver.com 32 32 Tips for fixing common problems….-The disk usage for a given User is higher than I think it should be. http://wiki.shopingserver.com/tips-for-fixing-common-problems-the-disk-usage-for-a-given-user-is-higher-than-i-think-it-should-be/ http://wiki.shopingserver.com/tips-for-fixing-common-problems-the-disk-usage-for-a-given-user-is-higher-than-i-think-it-should-be/#respond Fri, 17 Apr 2020 20:23:02 +0000 http://wiki.shopingserver.com/?p=27363 Tips for fixing common problems….-The disk usage for a given User is higher than I think it should be.

As of DirectAdmin 1.39.4, a new feature will allow for the viewing of the disk usage breakdown with DA, similar to the output from the guide below.


If the disk usage is higher than you think then it should be, or just you want to know how DA is coming to the disk usage value, you can type:

cd /usr/local/directadmin
echo “action=tally&value=username&type=user” >> data/task.queue
./dataskq d800

Where the username is the name of the user in question.
This will run the tally for that account and dump out all the bits that are adding together to come to the final value (system quota, email, database, etc.).

Parent directory does not allow write, or one of the directories didn’t allow search (execution) permission

If there you have vm-pop3d (mbox) and get the following error when creating a domain:

Parent directory will not allow write, or one of the directories did not allow search (execution) permission

Try typing:

chmod 1777 /var/spool/virtual

For version 1.32.4, the error message will be more clear, including the path name.

If there you ran into this error, then next time you try to create a domain, DA will say it already exists.  To solve that, go to:
Admin Level -> DNS Admin

and delete the domain in question, then you can try again.

How to restore an oversized backup

If there you have a backup file that is too large for the DirectAdmin restore process to handle, then the tar.gz can be adjust to remove some components so that the restore can be doing normally, and those removed components would be restore manually after.

The way we will do that is to remove the domains directory from the backup file (on the assumption that this directory is cause of the large usage).

cd /home/admin/admin_backups
mv user.admin.username.tar.gz user.admin.username.backup.tar.gz
mkdir temp
cd temp
tar xvzf ../user.admin.username.backup.tar.gz backup
tar cvzf ../user.admin.username.tar.gz backup
chown admin:admin ../user.admin.username.tar.gz

This will completely remove the domains directory from the backup.
If there you get an error during the extraction of “backup”, then either the file is corrupted or too large for the OS it’s on to handle.

Restore the file normally in DA.
Once you finished, the data from /home/username/domains will be missing, so now extract that manually:

cd /home/username
tar xvzf /home/admin/admin_backups/user.admin.username.backup.tar.gz domains
chown username:username domains

Double check that if everything is functioning correctly, and you should be done.

Your hostname, , and the servername you have set in DirectAdmin, server.host.com, do not match.

If there you get the error

Your host-name, , and the server-name you have set in DirectAdmin, server.host.com, do not match.

where the host-name is blank (note the “, ,”), a reported cause of this is an incorrectly setup /dev/null file.

First you make sure the host-name is not simply blank by checking:

/bin/hostname –fqdn

to ensure that you get something displayed.

If there you do see something, then the solution is to set it correctly:

rm /dev/null
mknod -m 0666 /dev/null c 1 3

Another confirmation solution for when you get the error message:

host-name: Name or service not known

is to edit your /etc/hosts file, and change:

1.2.3.4   your.hostname.com

to be:

1.2.3.4   your.hostname.com your

such that you have both the long and short forms of your host-name beside your server IP.


If there you do have a host-name in the output, eg:

Your host-name, bob.host.com, and the server-name you have set in DirectAdmin, server.host.com, do not match.

it means you just need to update the host-name:

Admin Level -> Admin Settings -> servername

set it, and save.

You may need to change it to something else, then back again to re-sync it.

Also ensure that you have a full zone for the host-name in your dns:

Admin Level -> DNS Admin -> server.host.com

so that it resolves and has MX records.

]]>
http://wiki.shopingserver.com/tips-for-fixing-common-problems-the-disk-usage-for-a-given-user-is-higher-than-i-think-it-should-be/feed/ 0
Tips for fixing common problems….-The ip of this machine () does not match the ip in the license file http://wiki.shopingserver.com/tips-for-fixing-common-problems-the-ip-of-this-machine-does-not-match-the-ip-in-the-license-file/ http://wiki.shopingserver.com/tips-for-fixing-common-problems-the-ip-of-this-machine-does-not-match-the-ip-in-the-license-file/#respond Fri, 17 Apr 2020 20:03:53 +0000 http://wiki.shopingserver.com/?p=27361 Tips for fixing common problems….-The ip of this machine () does not match the ip in the license file–If you get the message: The ip of this machine () does not match the ip in the license file

machine , when you trying to start DirectAdmin (or (1.2.3.4) instead of ()) then the ethernet_dev setting is in your directadmin.conf files isn’t setup correctly.

Type:

/sbin/ifconfig

if you want to see which device name your IP is on.  Common devices names/formats are: eth0, eth0:1, eth1, venet0:0, etc..

Please Note that you can specify the sub-device name to get different IPs.

Once you know the device name, edit /usr/local/directadmin/conf/directadmin.conf
Change (or add) the setting:

ethernet_dev=eth0

where you would replace eth0 with the name of the Ethernet device you should be using.

Starting sshd: /etc/ssh/sshd_config line 371: too many allow users

If there you get the following error when you are trying to start sshd:

Starting sshd: /etc/ssh/sshd_config line 371: too many allow users

that means that there are too many “AllowUsers” lines in the file.

What you can do then, is remove *all* AllowUsers lines from the /etc/ssh/sshd_config, edit /usr/local/directadmin/conf/directadmin.conf.
Change:
sshdconfig=/etc/ssh/sshd_config

to:
sshdconfig=/etc/ssh/sshd_config.plecibo

Save/exit, restart DirectAdmin.

Type:

touch /etc/ssh/sshd_config.plecibo

and then you can  just double check one more time that there are *no* AllowUsers lines in your /etc/ssh/sshd_conf file.

Try Restart sshd:

What this will do is have DA add/remove any users to a file that is a plecibo, which does not have any effect.
As long as there are no AllowUsers lines in the main /etc/ssh/sshd_config file, then all users are allowing to connect.

If there one or more AllowUsers lines are present in the main sshd_config file, then only those, hence the importance to not have any show up.

Make fully sure you have restarted DA before leaving the system alone, else you migh allow ssh to 1 user, thus blocking root or any other user ssh access.

Please Note that the /etc/ssh/sshd_config file that can be edited from within the Admin Level -> File Editor, so do not fret if you mess it up.  You can fix it through DA.

How to debug a segfault within DirectAdmin

If there you get a message “A segmentation fault has occurred”, this is a program error generally due to either incompatible binaries for your OS, or incorrect handling of data.

The first thing you should do is go to:
Admin Level -> Licenses/Updates
and check to ensure that the OS the binaries are compiling for match the OS you are using.

To debug it, the first thing you should do then  is to check your:
/var/log/directadmin/error.log
to see what the problem was.  There will be a segfault message with a program location.

To further debug the error, mainly for reporting to us, you would need to install “gdb” to debug the binary.
You will also need to be able to reliably dulicate the segfault.

1) Login to DA normally, and go to the page such that you are one click away from generating the segfault.

2) Login to ssh as root and type:

cd /usr/local/directadmin
killall -9 directadmin
gdb directadmin
run s

This will be loaded up a single process non-forked copy of DirectAdmin.  It only gets 1 call to it, then it will be quitting.

3) Go back to your “1 click away” browser, and submit the form to generate the segfault.  You will probably not get any output which is fine.

4) Back to ssh again, gdb should have been pointed out that the program sefaulted.  Type bt full

to dump the memory for the programs location.  Copy/paste that entire output and send it to us.

]]>
http://wiki.shopingserver.com/tips-for-fixing-common-problems-the-ip-of-this-machine-does-not-match-the-ip-in-the-license-file/feed/ 0
Tips for fixing common problems….-I can’t connect to DirectAdmin on port 2222 http://wiki.shopingserver.com/i-cant-connect-to-directadmin-on-port-2222/ http://wiki.shopingserver.com/i-cant-connect-to-directadmin-on-port-2222/#respond Fri, 17 Apr 2020 19:49:48 +0000 http://wiki.shopingserver.com/?p=27358 Tips for fixing common problems….-I can’t connect to DirectAdmin on port 2222 –If you are unable to access your server via http://1.2.3.4:2222, then 1 of 3 things is likely happening:

1. DirectAdmin may not be running or

2. You have a firewall blocking port 2222.

The Number 2 is easy to be check by simply running (only on redhat systems):

/sbin/service iptables stop
/sbin/chkconfig iptables off

Then try and test directadmin again.

If you did not fix it, then you must need to check your /var/log/directadmin/error.log to check for any errors as to why it is not starting:

tail /var/log/directadmin/error.log

Common problems are:
3. Incorrect ethernet_dev tune in the /usr/local/directadmin/conf/directadmin.conf file.

4. Invalid license, either due to wrong uid/lid, IP, or the date.  Try: Updating your DirectAdmin License manually

5. Your IP is blacklisted in /usr/local/directadmin/data/admin/ip_blacklist.  This is controlling by the “brute force login detection” in Admin Settings.  Use a setting no lower than 10, since even loading the login page counts as 1 failing attempt.

6. The Binaries are for a different operating system.

Now You can always try running DirectAdmin by handy (if it is not already running) to see what the problem is.

cd /usr/local/directadmin
./directadmin b200

to start it in the terminal with debug level 200.  Use Ctrl-C to stop.

7. If the DirectAdmin is running, is bound to port 2222, but does not respond on “127.0.0.1”, but does respond on “::1”, then it’s an IPv6 issue.


CentOS 7

CentOS 7 using a different method of firewall control.
To shut it off completely, type:

systemctl disable firewalld
systemctl stop firewalld

To just open port 2222, reported:

firewall-cmd –permanent –zone=public –add-port=2222/tcp

When compiling vm-pop3d: error: `UINT16_MAX’ undeclared (first use in this function)

To compile vm-pop3d:   (use –prefix=/usr on Linux)

wget http://files.directadmin.com/services/da_vm-pop3d-1.1.7f.tar.gz
tar xvzf da_vm-pop3d-1.1.7f.tar.gz
cd da_vm-pop3d-1.1.7f
./configure –prefix=/usr/local
make
make  install

If there you get it:

 

 

 

 

Then edit the config.h, and add:

#define UINT16_MAX 65535

and type make, make install again.

The task.queue is not being processed

1) check for /usr/local/directadmin/data/task.queue
It should be delete every minute.  If it is then exists, check it’s contents.  If there are more than just 1 or 2 lines, then the dataskq is not running.

2) check /var/log/cron (/var/log/syslog on Debian).  See if the dataskq is running every minute (logged every minute).  If even not, try running

chmod 644 /etc/cron.d/directadmin_cron
/sbin/service crond restart

3) make sure crond is running (“cron” on FreeBSD):

ps ax | grep cron

4) try restarting cron: /sbin/service crond restart.  Check /var/log/cron and /var/log/messages for possible problems with the /etc/cron.d/directadmin_cron file (/etc/crontab on FreeBSD).
If there you do not have crond (rpm based systems) then type:

yum -y install vixie-cron cronie
service crond start
chkconfig crond on

5) If there all of the above checkout but the task.queue is still not being processed, then try running it manually:

/usr/local/directadmin/dataskq d

]]>
http://wiki.shopingserver.com/i-cant-connect-to-directadmin-on-port-2222/feed/ 0
Tips for fixing common problems….-Webalizer produces: error while loading shared libraries: libgd.so.2 http://wiki.shopingserver.com/tips-for-fixing-common-problems-webalizer-produces-error-while-loading-shared-libraries-libgd-so-2/ http://wiki.shopingserver.com/tips-for-fixing-common-problems-webalizer-produces-error-while-loading-shared-libraries-libgd-so-2/#respond Fri, 17 Apr 2020 19:26:42 +0000 http://wiki.shopingserver.com/?p=27342 Tips for fixing common problems….-Webalizer produces: error while loading shared libraries: libgd.so.2

When you try run the following, you get:

[root@server]# webalizer
webalizer: error while loading some shared libraries: libgd.so.2: can not open the shared object file: No such file or directory

That means that the program is unable to find the gd library requiring to run it.  You should already have the library, so you just have to tell the binary linker where to find it.

Type the following command:

echo “/usr/local/lib” >> /etc/ld.so.conf
ldconfig

And then try running webalizer again.  The error should be gone.

If you *do not* have the gd library, install it:

yum install gd

Another solution, since custombuild will install it for you, just in a different location than webalizer is looking, is to link it, eg:

ln -s /usr/local/lib/libgd.so.2 /usr/lib/libgd.so.2

 

If there a webalizer is functioning correctly, you must see something similar to:

 

[root@server]# webalizer
Webalizer V2.01-10 (Linux 2.4.21-9.0.1.EL) English
Using logfile STDIN (clf)
Creating output in a current directory
Hostname for reports is ‘es.jbmc-software.com’
History file not found…

 

 

 

 

 

 

 

 

balizer binary

Select the relevant info below and then run the produced command to get a new webalizer binary

As root, run the Following code:

Once you have updated the binary, you can type:

echo “action=tally&value=all” >> /usr/local/directadmin/data/task.queue

Then try to wait a few minutes for the tally to update the stats.

Warning: Illegal offset type in /path/to/somefile.php after php upgrade

Eg:

Warning: Illegal offset type in /var/www/html/phpMyAdmin-2.6.2/libraries/grab_globals.lib.php on line 71

This because of a change in the php.ini.  To get an updated php.ini, run:

cp -f /usr/local/directadmin/customapache/php-4.3.11/php.ini-dist /usr/local/lib/php.ini

(assuming you have upgraded to php 4.3.11)Then restart apache.

]]>
http://wiki.shopingserver.com/tips-for-fixing-common-problems-webalizer-produces-error-while-loading-shared-libraries-libgd-so-2/feed/ 0
Tips for fixing common problems….-I’ve deleted /home, how do I recreate the directories? http://wiki.shopingserver.com/ive-deleted-home-how-do-i-recreate-the-directories/ http://wiki.shopingserver.com/ive-deleted-home-how-do-i-recreate-the-directories/#respond Fri, 17 Apr 2020 18:32:23 +0000 http://wiki.shopingserver.com/?p=27338 Tips for fixing common problems….-I’ve deleted /home, how do I recreate the directories?–Generally, this isn’t the best thing to have happen because all of the data is stored there.  

You will need to recreate all of the directory structures, as well as a few files requiring for DA to run:

1) Create the DA tmp directory so you can log into DA again:

mkdir -p /home/tmp
chmod 1777 /home/tmp

2) Create the /home/username directories and sub-directories:

cd /home
vi make_dirs.sh

press ‘i’ to go into “insert mode” then paste the following script (right click)

#!/bin/sh
for i in `ls /usr/local/directadmin/data/users`; do
{
for d in `cat /usr/local/directadmin/data/users/${i}/domains.list`; do
{

};
done;
mkdir -p /home/${i}/backups

chown -R $i:$i /home/${i}
chmod -R 755 /home/${i}
};
done;
exit 0;

Press “ctrl-c” to exit “insert mode”, then press “shift-Z” twice to save and exit.  Once the file is saved, type:

chmod 755 make_dirs.sh
./make_dirs.sh

Installing DBD::mysql from source

To install DBI  and DBD:mysql  from source, run the following:

wget http://www.cpan.org/modules/by-module/DBD/DBI-1.634.tar.gz
tar xvzf DBI-1.634.tar.gz
cd DBI-1.634
unset LANG;
perl Makefile.PL
make
make install

cd ..
wget http://www.cpan.org/modules/by-module/DBD/DBD-mysql-4.033.tar.gz
tar xvzf DBD-mysql-4.033.tar.gz
cd DBD-mysql-4.033
unset LANG;
perl Makefile.PL
make
make install

to install it from cpan, use this:

perl -MCPAN -e ‘install Bundle::DBD::mysql’

If there you get testing errors (root denied) with the cpan install, try:

cd /root/.cpan/build/DBD-mysql-4.033
perl Makefile.PL –testuser=da_admin –testpassword=`grep ^passwd= /usr/local/directadmin/conf/mysql.conf | cut -d= -f2`
make && make install

where you might need to adjust 4.033 to the version is being installed.

Frontpage on FreeBSD 5.x

FrontPage has discontinued. Do not use it.


From year 2006:

If there you get the following error when installing the Frontpage Extensions to a domain:

Error setting up your web: /usr/libexec/ld-elf.so.1: /usr/lib/libc_r.so.4: Undefined symbol “_flockfile”

or

Error setting up your web: /usr/libexec/ld-elf.so.1: Shared object
“libc.so.4” not found, requiring by “owsadm.exe”

then you will need to do the following:

pkg_add -r compat4x
cd /usr/lib
mv libc_r.so.4 libc_r.so.4.old
ln -s /usr/local/lib/compat/libc_r.so.4.compat4x libc_r.so.4

If pkg_add fails, try this:

cd /usr/ports/misc/compat4x

 

 

cd /usr/lib
mv libc_r.so.4 libc_r.so.4.old
ln -s /usr/local/lib/compat/libc_r.so.4.compat4x libc_r.so.4

For FreeBSD 6.0, try this code

cd /usr/lib
ln -s /usr/local/lib/compat/libcrypt.so.2
ln -s /usr/local/lib/compat/libm.so.2
mv libc.so.4 libc.so.4.old
ln -s /usr/local/lib/compat/libc.so.4

On one 6.1 system, after the compat libraries is setup, you  had to run

cd /lib
ln -s libcrypt.so.3 libcrypt.so.2

which did not actually use the compat libaries in the end.

]]>
http://wiki.shopingserver.com/ive-deleted-home-how-do-i-recreate-the-directories/feed/ 0
Tips for fixing common problems….-Server replied: 421 Unexpected failure, please try later http://wiki.shopingserver.com/server-replied-421-unexpected-failure-please-try-later/ http://wiki.shopingserver.com/server-replied-421-unexpected-failure-please-try-later/#respond Fri, 17 Apr 2020 18:20:03 +0000 http://wiki.shopingserver.com/?p=27336 Tips for fixing common problems….-Server replied: 421 Unexpected failure, please try later — If Imap returns this error, then there might be something wrong with the smtp server.  

server, Check all the /var/log/exim/mainlog (or /var/log/exim/exim_mainlog).

If Errors seen before:

failes to open /etc/virtual/pophosts for linear search: No such file or directory

server
Fix:

touch /etc/virtual/pophosts

server
That would also imply that da-popb4smtp is not running, so popb4smtp would not work.  To start it, run:

service da-popb4smtp start

or FreeBSD:

/usr/local/etc/rc.d/da-popb4smtp start

Disk Usage is showing 0.00 or is too low

*** Please Note: If there you are running a VPS with a “simfs” file system, quotas usually can not be enabling with normal means.

Contact your VPS provider to enable quotas for you.

First type:

df -h

to see your partitions.
If there you have a /home partition, then your quota_partition value will be /home.
If there you have no /home partition, then your quota partition will likely be /.

In some cases, you may have a sybolic link:  /home -> /usr/home, in which case your quota_partition will be /usr.
Set the partition value here, as needed: 

DirectAdmin relies on the system quotas to return a value for how much space is being used.  DirectAdmin will run

/usr/sbin/repquota /home

Where /home is the quota_partition value set in the /usr/local/directadmin/conf/directadmin.conf file (eg, /home, / or /usr).

The command should output a large list of numbers, eg

[root@server]# /usr/sbin/repquota /home
*** The Report for user quotas on device /dev/hda3
Block grace time: 7days; Inode grace time: 7days
Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
———————————————————————-
root      —  417796       0       0           7446     0     0
nobody    —       4       0       0              1     0     0
bin       —   56880       0       0            510     0     0
majordomo —       8       0       0              2     0     0
diradmin  —       8       0       0              2     0     0
admin     —     200       0       0             44     0     0
user123   —     100       0       0             22     0     0
user456   —     100       0       0             22     0     0

 

If the “used” column is not showing anything, or users are not in the list, then you will need to run the quota-check program:

Redhat:

/sbin/quotaoff -a; /sbin/quotacheck -avugm; /sbin/quotaon -a;

FreeBSD:

/usr/sbin/quotaoff -a; /sbin/quotacheck -avug; /usr/sbin/quotaon -a;

If there are getting errors and no output is displaying for the repquota command, you will need to check your /etc/fstab file to make sure that it contains the rw,userquota,groupquota line beside the partition that is using the quotas.

***Very Important***:  On Linux (Redhat/Debian), it’s usrquota,grpquota, and on FreeBSD it’s userquota,groupquota.

Sample /etc/fstab (do not make yours look identical if it’s different, this is one example from a specific OS):

# Device                Mountpoint      FStype  Options            Dump    Pass#
/dev/ad0s1a             /               ext3     rw,usrquota,grpquota 1       1
/dev/ad0s1e             /tmp            ext3     rw                 2       2
proc                    /proc           procfs   rw                 0       0

In this case, the quota_partition is /.  The quota partition should be the partition that holds your users.  Generally, this will be one of /home, / or /usr.

Or there you may consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.

In that case instead of “,usrquota,grpquota”, add “,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0” to your fstab file.

Once the repquota program is returning a normal value, then you can run the tally to get the correct usage to show up in DirectAdmin:

echo “action=tally&value=all” >> /usr/local/directadmin/data/task.queue

This task.queue command will get picked up by the dataskq binary.

It calls the repquota command and dumps it into /home/tmp/quota-dump.
Check /var/log/directadmin/errortaskq.log for any errors with this command.
Running the tally manually for a User can also help with debugging these issues.


Information for a Support Request

If you are completely confused and are going to be contacting some support department about the issue, run these commands and paste them the full output from them:

cat /etc/fstab
df -h
mount
/usr/local/directadmin/directadmin c | grep quota_partition
/usr/local/directadmin/directadmin c | grep use_xfs_quota
repquota `/usr/local/directadmin/directadmin c | grep quota_partition= | cut -d= -f2`
ls -lad /home/tmp
ls -la /home/tmp

]]>
http://wiki.shopingserver.com/server-replied-421-unexpected-failure-please-try-later/feed/ 0
Tips for fixing common problems….-New user using over 100 meg of space and nothing has been added yet http://wiki.shopingserver.com/100-meg-of-space-and-nothing-has-been-added-yet/ http://wiki.shopingserver.com/100-meg-of-space-and-nothing-has-been-added-yet/#respond Fri, 17 Apr 2020 18:02:28 +0000 http://wiki.shopingserver.com/?p=27334 Tips for fixing common problems….-New user using over 100 meg of space and nothing has been added yet

If you have a user, let’s call them

,
and you find that they are using more system quotas then than you think they should be, there could be other files on your system causing this error.

When a tar.gz file is extracting as root, the file ownership of it’s contents will then generally stay the same as they were on the system that compresses the tar.gz file.

This means that the user id number of the files will be extracting along with the files.  When you create your new user, his new user id may match the user id of the files that were extracting, so the system quotas will assume that the new user owns these other files thus adding large amounts of disk usage to the new user.

To resolve this problem, you will have to find these other files and chow them to another user (or root) after that the new user does not absorb the “cost” of their space.

So that, you can use the “find” program:

[root@server]# id username
uid=510(username) gid=510(username) groups=510(username)
[root@server]# find / -uid 510 | less

This code will tell you that userid of the new user, and then let you track down where the files are on the system.  (press space to scroll).

Replace the 510 sample with the actual UID number returns by the system.

Once you find the files that should not belong to the new user, then cd to that directory and “chown root *” these files (depending on which files they are) so that they no longer belong to the user.

You should be able to type

quota -v username

To see the current disk usage for that user.  If it is not correct with the new settings, you will need to update the system quotas:
RedHat

/sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a;

FreeBSD:

/usr/sbin/quotaoff -a; /sbin/quotacheck -aug; /usr/sbin/quotaon -a;

Once the quota system catches that, you can run the tally to update his stats.

echo “action=tally&value=all” >> /usr/local/directadmin/data/task.queue


Because the above find command may be slow, you can either do a quick comparison with the contents of the User’s home folder, eg:

cd /home
du username | sort -n
du -sh username

]]>
http://wiki.shopingserver.com/100-meg-of-space-and-nothing-has-been-added-yet/feed/ 0
Tips for fixing common problems….-Updating your DirectAdmin License manually http://wiki.shopingserver.com/updating-your-directadmin-license-manually-common/ http://wiki.shopingserver.com/updating-your-directadmin-license-manually-common/#respond Fri, 17 Apr 2020 17:45:47 +0000 http://wiki.shopingserver.com/?p=27332 Tips for fixing common problems….-Updating your DirectAdmin License manually — If you need to update your DirectAdmin license manually,

common problems….You can either do so by entering your information, then run the following commands:
Client ID (uid):  
License ID (lid): 
IP address:       

cd /usr/local/directadmin/scripts
./getLicense.sh 123 1234
service directadmin restart

Where 123 and 1234 are your Client ID and License ID, respectively.

If there are errors extracting the update.tar.gz file, then run:
head -n 1 /usr/local/directadmin/conf/license.key

To search for an error.

If there is an readable error inside the file, double check the IP you are using matches the IP in the license on our system.

Even though check that it is active in our clients section.

Failing that, you will need to contact sales@directadmin.com to get your license activated or updated.

If there you have multiple IPs on your device and wget is binding to the incorrect one, you can specify the IP to bind to by adding it as the last argument:

cd /usr/local/directadmin/scripts
./getLicense.sh 123 1234 1.2.3.4
service directadmin restart

If there you are not able to connect to port 443 on directadmin.com (https), or are not getting any results (no returned data), it may be a block somewhere on 443.

For that case, you can try using port 80 to get the license.

To do this, Now type:

echo 1 > /root/.insecure_download

and the scripts will automatically download over port 80, without any encryption.


If there you get errors during the restart, eg:

Stopping DirectAdmin: [ FAILED ]
Starting DirectAdmin: [ OK ]

your PID file may be out of sync. In this case, restart directadmin forcefully:

killall -9 directadmin
/etc/init.d/directadmin start

Retry the restart command, and ensure that both the “Stopping” and “Starting” sections are “[ OK ]”.

July 16, 2013: New license relay server

If there you can not connect to www.directadmin.com via any means, a new script has been added to let you get the license via a license relay server.

More information and fallback automation will come on time, but for now, manually running this from your server will work:

cd /usr/local/directadmin/conf
cp -f license.key license.key.old
wget -O license.key –no-check-certificate ‘https://license.directadmin.com/licenseupdate.php?uid=123&lid=1234
chown diradmin:diradmin license.key
chmod 600 license.key

You must then connect from your server using the correct IP address.

Use this –bind-address=1.2.3.4 option if needed, to force the correct IP.


Common related error messages:

*** An error has occurred while trying to update the license file ***

]]>
http://wiki.shopingserver.com/updating-your-directadmin-license-manually-common/feed/ 0
Tips for fixing common problems….-Domain Already Exists http://wiki.shopingserver.com/tips-for-fixing-common-problems-domain-already-exists/ http://wiki.shopingserver.com/tips-for-fixing-common-problems-domain-already-exists/#respond Fri, 17 Apr 2020 16:43:25 +0000 http://wiki.shopingserver.com/?p=27330 Tips for fixing common problems….-Domain Already Exists  — This message will appear if the domain is already on the system.  The way that DirectAdmin checks to see if the domain is already on the system is by looking in the named.conf file.

Domain (RedHat: /etc/named.conf, FreeBSD: /etc/namedb/named.conf)

If there you are positive that the domain has not been added to anywhere in DirectAdmin (use “Show All Accounts” in the Admin Panel), then it should be safer to remove the zone from the named.conf file either manually, or by removing the zone from Admin Panel -> DNS Admin.  Then if you should be able to add the domain.

Be sure to backup the zone if you do not wish to lose the all dns data.

With the addition of the Multi Server option, dns then can now be hosted on other DA servers.  Be Ensure that any Servers you have listed in your “Admin Level -> Multi Server Setup” page also do not have the domain in their named.conf files.

If there you disable the “check domain” option, then that server will not be queried.


You would also want to ensure the domain is not in:

  • Remote Multi-Server Setup IP, with “Domain Check” option
  • /etc/virtual/domains
  • /etc/virtual/domainowners
  • /etc/virtual/domain.com
  • any /var/named/*.nzf file if rndc is used for adding/removing zones

 

Updating DirectAdmin Manually

Enter your information here:
Client ID (uid):  
License ID (lid): 

If there you need to update your copy of DirectAdmin manually, you can then do so by running the following commands:

cd /usr/local/directadmin
wget –no-check-certificate -O update.tar.gz ‘https://www.directadmin.com/cgi-bin/daupdate?redirect=ok&uid=123&lid=1234
tar xvzf update.tar.gz
./directadmin p
cd scripts
./update.sh
service directadmin restart

Where 123 and 1234 are your Client ID and License ID, respectively.

Please Note that if you are running FreeBSD, you might need to add a \ before the ? character in the wget line, and use /usr/local/etc/rc.d/directadmin restart.

If there you faced errors extracting the update.tar.gz file, then run:

head -n 1 update.tar.gz

to search for an error.

If there is an readable error inside the file, then you will need to contact sales@directadmin.com to get your license activate or updated.

Using the above redirect=ok option in the download string will tell the daupdate that the downloader being used supports Location header redirects.

The daupdate script will offload downloads when possible to other servers.


If there you would like automated DA updates, there a few ways of going about it. (we do not trigger updates from our end to your server anymore)
– CustomBuild can be tune to crone auto update the services, and if you also use da_autoupdate=yes, CB will do it for you.

However, automating CB updates is not always recommending.
– A simple cronjob that runs this command is likely safer, if you only want DA to be auto-updated:

echo “action=update&value=program” >> /usr/local/directadmin/data/task.queue

Each night that the update is rejecting, you will get a note in your /var/log/directadmin/system.log.


Please Note:

Pre-release and regular updates to not issue full config rewrites.  If there you need a template change, you must issue a full rewrite to get it:

cd /usr/local/directadmin/custombuild
./build rewrite_confs

]]>
http://wiki.shopingserver.com/tips-for-fixing-common-problems-domain-already-exists/feed/ 0
Tips for fixing common problems….-Error connecting to : localhost. 115 : Operation now in progress http://wiki.shopingserver.com/error-connecting-to-imap-server-localhost-115/ http://wiki.shopingserver.com/error-connecting-to-imap-server-localhost-115/#respond Fri, 17 Apr 2020 15:45:21 +0000 http://wiki.shopingserver.com/?p=27327 Tips for fixing common problems….-Error connecting to IMAP server: localhost. 115 : Operation now in progress-This error seems to be caused by a bug in php:

[Wed May 12 15:48:08 2004] [error] PHP Warning:  fsockopen(): unable to connect to
localhost:143 in /var/www/html/squirrelmail-1.4.2/functions/imap_general.php on line 454

[Please Try recompiling everything from “clean”.

cd /usr/local/directadmin/customapache
rm -f configure.*
./build clean
./build update
./build all
/sbin/service httpd restart

(or “/usr/local/etc/rc.d/httpd restart” for FreeBSD)

 

/var is full

If there you have a /var partition, and if there that partition is too small it may fill up quickly.  If there you want to move the data which is stored in “/var” to another partition, run the following:

cd /var
du | sort -n

This will totally give you a full readout of all the directories that are using the most space.  The directory which is  using the most disk space will appear at the bottom of the list.

One of the common culprit is mysql (/var/lib/mysql on Redhat).  To move that path to another partition, run the following:

cd /home
mkdir mysql
chown mysql:mysql mysql
cd mysql

perl -pi -e ‘s/mysqld=ON/mysqld=OFF/’ /usr/local/directadmin/data/admin/services.status
/sbin/service mysqld stop

cp -Rp /var/lib/mysql/* .
cd /var/lib
mv mysql mysql_old
ln -s /home/mysql ./mysql

/sbin/service mysqld start
perl -pi -e ‘s/mysqld=OFF/mysqld=ON/’ /usr/local/directadmin/data/admin/services.status

#once you are satisfying that mysqld is running and functioning correctly, then remove the old data:

rm -rf mysql_old

After that You can also specify a new socket path in the file:

/usr/local/directadmin/conf/mysql.conf

if there you want, but  you should not be requiring if you have correctly created the symbolic link with the above “ln -s” command.

Please Note, if  there you run into the error

[Warning] Can not create test file /home/mysql/server.lower-test

after you have moved it to /home, check the given processes mariadb.service or mysqld.service file for:

ProtectHome=true

and change this to false.

Apache won’t start and there is nothing in the logs

Chances are, if Apache is not starting and is not logging anything, the error_log is full preventing Apache from starting.

To double check that, run:

cd /var/log/httpd
ls -lS | less

If there any file is around 2-3 gig (or more), then chances are, that is the problem.

The solution is to remove the logs, restart Apache, and then implement preventative measures.

1)

 

 

 

 

2) Get logrota to rotate daily

perl -pi -e ‘s/weekly/daily/’ /etc/logrotate.conf
perl -pi -e ‘s/rotate 4/rotate 2/’ /etc/logrotate.conf

If there Apache still does not start, check /var/log/messages and try recompiling Apache.

]]>
http://wiki.shopingserver.com/error-connecting-to-imap-server-localhost-115/feed/ 0