RE: current trunk version daemon not working properly - joximu - 01-16-2010 06:31 PM
all records in the database ispcp where the field "status" is not "ok"
RE: current trunk version daemon not working properly - MasterTH - 01-16-2010 11:51 PM
ok, found a new bug...
statistics doesn't count properly
Problems with ticketsystem are solved, great thanks for this...
after moving the old binarys for counting the traffic into the right folder everything works fine....
Theres a bug in the counting system since the laste trunk...
RE: current trunk version daemon not working properly - kilburn - 01-17-2010 12:40 AM
Quote:after moving the old binarys for counting the traffic into the right folder everything works fine....
Theres a bug in the counting system since the laste trunk...
Any hints, error messages or something?
RE: current trunk version daemon not working properly - MasterTH - 01-17-2010 12:42 AM
hmm... nope nothing. the log-file whichs called be cron is empty....
RE: current trunk version daemon not working properly - marchaos - 01-17-2010 03:23 AM
(01-16-2010 11:51 PM)MasterTH Wrote: ok, found a new bug...
statistics doesn't count properly
Theres a bug in the counting system since the laste trunk...
I have the same after update via nightly update script. I saw this bugs. Can't add domain because "addition in progress" don't finish this process. Can't remove domain in this state. IspCP Debugger show "No errors" and "3 Execute requests". When I press "3 Execute requests" nothing changed - there was "3 Execute requests". But when I rebooted the server and use "3 Execute requests" all was ok, domain added and I can remove them after.
Now I have troubles with traffic counting - statistics show zero values.
I create ticket http://www.isp-control.net/ispcp/ticket/2167
I'm not sure may be something wrong with http://www.isp-control.net/ispcp/ticket/2096 , http://www.isp-control.net/ispcp/changeset/2502 ?
Does ispCP daemon need to be only killed? Does "/etc/init.d/ispcp_daemon restart" work correct?
Can somebody rewrite Nightly Update Script for current trunk because "cp ${INST_PREF}${CONF_DIR}/apache/working/ispcp.conf ${CONF_DIR}/apache/working/ispcp.conf"
don't work now? http://www.isp-control.net/documentation/doku.php?id=start:scripts:updatenightly
May be somebody can integrate this script in ispCP and rewrite this everytime when this changes needed? May be not in GUI but in ispCP package? I create ticket http://www.isp-control.net/ispcp/ticket/2171 Not really needed but nice to have it inside because wrong update script can be danger if ispCP distribution will have big changes in future.
And thanks for your work guys, after some bugs was removed GUI looks really better.
RE: current trunk version daemon not working properly - Nuxwin - 01-17-2010 06:40 AM
What nightly script you use exactly ?
RE: current trunk version daemon not working properly - MasterTH - 01-17-2010 06:55 AM
Code:
#!/bin/bash
#
# ispcp-nightly-update
# Version: 0.0.7 - 07.09.2009
# License: GPL
# Author : ispcomm
# Credits: ispcp development team
#
# Variables
BACKUPDIR="/var/www/backup"
TRUNK_DIR="/usr/src/ispcp"
REBUILD_SITES="yes"
SAVE_DEFAULT_BACKUP="yes"
DISTRO_UPD="yes"
echo "#### Starting Update ispCP to latest Trunk ####"
function msg_exit(){
echo $1;exit;
}
function Extract_vars(){
eval `cat ${TRUNK_DIR}/${MAKEFILE} | grep -E "(INST_PREF|SYSTEM_CONF)="| sed -e 's/$(INST_PREF)//g'`
for a in `cat ${SYSTEM_CONF}/ispcp.conf | grep -E "(CONF_DIR|GUI_ROOT_DIR|ROOT_DIR|BACKUP_FILE_DIR|CMD_HTTPD|CMD_NAMED|CMD_MTA|CMD_FTPD|CMD_ISPCPD|CMD_PFLOGSUM)"| sed -e 's/ //g'`
do
export $a
done
WWWDIR=`echo ${ROOT_DIR} | awk -F "/ispcp" '{print $1}'`
}
#download/update trunk no longer remove old trunk (thanks kilburn)
echo "#### DOWNLOAD TRUNK ####"
mkdir -p ${TRUNK_DIR}
svn checkout http://www.isp-control.net/ispcp_svn/trunk/ ${TRUNK_DIR}
cd ${TRUNK_DIR}
echo "#### SO determining ####"
if [ `lsb_release -i -s | tr -d "\n"` == "Ubuntu" ]; then
RELEASE=`lsb_release -c -s | tr -d "\n"`
case ${RELEASE} in
"jaunty") ;;
"intrepid") ;;
"hardy") ;;
"gutsy") ;;
"feisty") ;;
"edgy") ;;
* ) msg_exit "${RELEASE} is not suported";;
esac
MAKEFILE="Makefile.ubuntu"
Extract_vars
if [ $DISTRO_UPD == "yes" ] ; then
if [ -e ./docs/Ubuntu/ubuntu-packages-${RELEASE} ]; then
echo "#### SO UPDATE ####"
apt-get update;
apt-get -y dist-upgrade;
apt-get -y install `cat ./docs/Ubuntu/ubuntu-packages-${RELEASE}`;
fi
fi;
elif [ -e /etc/debian_version ]; then
RELEASE=`lsb_release -c -s | tr -d "\n"`
case ${RELEASE} in
"sarge") ;;
"etch") ;;
"lenny") ;;
"squeeze") ;;
* ) msg_exit "${RELEASE} is not suported";;
esac
MAKEFILE="Makefile"
Extract_vars
if [ $DISTRO_UPD == "yes" ] ; then
if [ -e ./docs/Debian/debian-packages-${RELEASE} ]; then
echo "#### SO UPDATE ####"
apt-get update;
apt-get -y dist-upgrade;
apt-get -y install `cat ./docs/Debian/debian-packages-${RELEASE}`;
fi
fi;
elif [ -e /etc/fedora-release ]; then
MAKEFILE="Makefile.fedora"
Extract_vars
if [ $DISTRO_UPD == "yes" ] ; then
msg_exit "Fedora is not suported yet"
yum -y install `cat ./docs/Fedora/fedora-packages`
cpan2rpm -i http://search.cpan.org/CPAN/authors/id/P/PH/PHOENIX/Term-ReadPassword-0.07.tar.gz
wget -P /tmp/core http://hany.sk/mirror/fedora/releases/7/Everything/i386/os/Fedora/perl-Net-LibIDN-0.09-3.fc7.i386.rpm
rpm -i /tmp/core/perl-Net-LibIDN-0.09-3.fc7.i386.rpm
rm -f /tmp/core/perl-Net-LibIDN-0.09-3.fc7.i386.rpm
fi;
elif [ -e /etc/SuSE-release ]; then
MAKEFILE="Makefile.opensuse"
Extract_vars
if [ $DISTRO_UPD == "yes" ] ; then
yast -i `cat ./docs/OpenSuse/opensuse103-packages`
fi;
elif [ -e /etc/gentoo-release ]; then
MAKEFILE="Makefile.gentoo"
Extract_vars
if [ $DISTRO_UPD == "yes" ] ; then
emerge -uq `cat ./docs/Gentoo/gentoo-packages`
fi;
elif [ -e /etc/redhat-release ]; then
msg_exit "RedHat is not suported yet"
elif [ -e /etc/slackware-version ]; then
msg_exit "Slackware is not suported yet"
else
msg_exit "Unknown Linux ditribution: not suported"
fi
echo "#### BACKUP OLD FILES ####"
mkdir -p $BACKUPDIR
pushd $BACKUPDIR
if [ $SAVE_DEFAULT_BACKUP == "yes" ] ; then
mv -f $BACKUP_FILE_DIR .
fi
tar czpf "ispcp_backup-`date +'%Y-%m-%d %H-%M-%S'`.tar.gz" ${WWWDIR}/ispcp/
tar czpf "ispcp_backup-etc-`date +'%Y-%m-%d %H-%M-%S'`.tar.gz" ${SYSTEM_CONF}
echo "#### SAVING SETTINGS ####"
cp -v ${WWWDIR}/ispcp/engine/ispcp-db-keys.pl .
cp -v ${WWWDIR}/ispcp/gui/include/ispcp-db-keys.php .
cp -v ${WWWDIR}/ispcp/gui/tools/pma/config.inc.php .
popd
echo "#### BUILDING ISPCP ####"
make -f ${MAKEFILE} clean
make -f ${MAKEFILE} install
echo "#### STOPING ISPCP DAEMON ####"
$CMD_ISPCPD stop
echo "#### SAVEING CUSTOM STAFF ####"
cp -TvR ${GUI_ROOT_DIR}/domain_default_page ${INST_PREF}${GUI_ROOT_DIR}/domain_default_page
cp -v ${GUI_ROOT_DIR}/themes/user_logos/* ${INST_PREF}${GUI_ROOT_DIR}/themes/user_logos/
cp -TvR ${GUI_ROOT_DIR}/errordocs ${INST_PREF}${GUI_ROOT_DIR}/errordocs
echo "#### REMOVE OLD ISPCP ####"
rm -fR $ROOT_DIR
echo "#### REMOVE .svn DIRECTORIES ####"
rm -fR `find ${INST_PREF} -type d -name '.svn'`
echo "#### UPDATE CURENT INSTALLATION ####"
pushd ${INST_PREF}${WWWDIR}
rm -fR `find ispcp/ -type d -name '.svn'`
cp -R ispcp/ $WWWDIR
cp -v ${INST_PREF}${CMD_PFLOGSUM} ${CMD_PFLOGSUM}
popd
echo "#### RESTORE SETTINGS ####"
pushd $BACKUPDIR
cp -v ispcp-db-keys.pl ${WWWDIR}/ispcp/engine/
cp -v ispcp-db-keys.pl ${WWWDIR}/ispcp/engine/messenger/
cp -v ispcp-db-keys.php ${WWWDIR}/ispcp/gui/include/
cp -v config.inc.php ${WWWDIR}/ispcp/gui/tools/pma/
echo "#### RESTORE BACKUPS ####"
if [ $SAVE_DEFAULT_BACKUP == "yes" ] ; then
mv -f backups ${BACKUP_FILE_DIR}
fi
popd
echo "#### SETTING PERMISIONS ####"
pushd ${WWWDIR}/ispcp/engine/setup/
./set-engine-permissions.sh
./set-gui-permissions.sh
popd
echo "#### COPYING /parts DIRECTORIES ####"
bla=`find ${INST_PREF}/etc/ispcp -type d -name 'parts'`;
for x in $bla;
do
bla2=`echo ${x} | awk -F"${INST_PREF}|/parts" '{print $2}'`
cp -R $x $bla2
done
cp ${INST_PREF}${CONF_DIR}/apache/httpd.conf ${CONF_DIR}/apache/httpd.conf
cp ${INST_PREF}${CONF_DIR}/apache/working/ispcp.conf ${CONF_DIR}/apache/working/ispcp.conf
echo "#### REBUILDING SITES ####"
if [ $REBUILD_SITES == "yes" ] ; then
cat <<EOF | mysql -uroot -p'MasterTHisinthehouse' ispcp
UPDATE mail_users SET status='toadd' WHERE status='ok';
UPDATE domain SET domain_status = 'change' WHERE domain_status = 'ok';
UPDATE domain_aliasses SET alias_status = 'change' WHERE alias_status = 'ok';
UPDATE subdomain SET subdomain_status = 'change' WHERE subdomain_status = 'ok';
UPDATE subdomain_alias SET subdomain_alias_status = 'change' WHERE subdomain_alias_status = 'ok';
UPDATE htaccess SET status = 'change' WHERE status='ok';
UPDATE htaccess_groups SET status = 'change' WHERE status='ok';
UPDATE htaccess_users SET status = 'change' WHERE status='ok';
UPDATE server_ips SET ip_status = 'change' WHERE ip_status='ok';;
TRUNCATE TABLE login;
EOF
${ROOT_DIR}/engine/ispcp-rqst-mngr
fi
echo "#### Starting ispcp-daemon ####"
$CMD_ISPCPD start
echo "#### Deleting ispcp tmp Dir ####"
make clean
echo "#### Restarting Services ####"
$CMD_HTTPD restart
$CMD_NAMED restart
$CMD_MTA restart
$CMD_FTPD restart
i did the same. code above is the script
RE: current trunk version daemon not working properly - marchaos - 01-17-2010 07:39 AM
I use the same script on Debian 1.0.3. I updated before without any troubles. "cp ${INST_PREF}${CONF_DIR}/apache/working/ispcp.conf ${CONF_DIR}/apache/working/ispcp.conf" gives error. Is it important file for ispCP or not? I think file not exist now. I don't think troubles maded by nightly update script. May be some bugs in ispCP daemon. Can somebody answer me about restarting daemon by "/etc/init.d/ispcp_daemon restart" or start/stop, does it work correct because I don't have errors when i made this but ispCP debugger still don't execute requests? Errors goes away only after reboot server and "3 Execute requests" used. Nuxwin right, better not integrate nightly update script in ispCP, but small rewrite of this needed. Please find bugs in traffic counting, they are still inside.
RE: current trunk version daemon not working properly - marchaos - 01-17-2010 08:50 AM
Guys, I found bug. /var/log/ispcp/ispcp-srv-traff.log shows:
Code:
Argument "spt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 150.
Argument "spt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 150.
Argument "spt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 150.
..................................................................................................
Argument "dpt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 150.
Argument "dpt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 190.
Argument "dpt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 190.
..................................................................................................
Argument "spt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 190.
Look last changes there http://www.isp-control.net/ispcp/changeset/2502 and there http://www.isp-control.net/ispcp/ticket/2096. And I found topic about this http://www.isp-control.net/forum/thread-8721.html
Does next changes causes errors?
Code:
$port = $1 if ($line =~ /spt\:(\d+) *$/);
$port = $1 if ($line =~ /(spt|dpt)\:(\d+) *$/);
RE: current trunk version daemon not working properly - Nuxwin - 01-17-2010 02:08 PM
(01-15-2010 05:56 PM)MasterTH Wrote: Hi,
i just checked out the current trunk.
Added a new domain. The status doesn't change from toadd to ok. After running the rqst-mngr everything works fine.
Wheres the problem?
Sorry, I can't reproduce it with r2531. I've updated normally, add new domain and all work fine.
(01-16-2010 10:11 AM)MasterTH Wrote: ok, next time i'll try,
got another error message from debugger..
When reseller goes into the ticket-section, this messages is sent to me from ispcp:
Array
File: /var/www/ispcp/gui/reseller/ticket_system.php (Line: 220) Function: exec_query
Error Message in Browser: HY093 (whats wrong with my database?)
Sorry, I can't reproduce it with r2531
(01-17-2010 03:23 AM)marchaos Wrote: (01-16-2010 11:51 PM)MasterTH Wrote: ok, found a new bug...
statistics doesn't count properly
Theres a bug in the counting system since the laste trunk...
I have the same after update via nightly update script. I saw this bugs. Can't add domain because "addition in progress" don't finish this process. Can't remove domain in this state. IspCP Debugger show "No errors" and "3 Execute requests". When I press "3 Execute requests" nothing changed - there was "3 Execute requests". But when I rebooted the server and use "3 Execute requests" all was ok, domain added and I can remove them after.
Now I have troubles with traffic counting - statistics show zero values.
I create ticket http://www.isp-control.net/ispcp/ticket/2167
I'm not sure may be something wrong with http://www.isp-control.net/ispcp/ticket/2096 , http://www.isp-control.net/ispcp/changeset/2502 ?
Does ispCP daemon need to be only killed? Does "/etc/init.d/ispcp_daemon restart" work correct?
Can somebody rewrite Nightly Update Script for current trunk because "cp ${INST_PREF}${CONF_DIR}/apache/working/ispcp.conf ${CONF_DIR}/apache/working/ispcp.conf"
don't work now? http://www.isp-control.net/documentation/doku.php?id=start:scripts:updatenightly
May be somebody can integrate this script in ispCP and rewrite this everytime when this changes needed? May be not in GUI but in ispCP package? I create ticket http://www.isp-control.net/ispcp/ticket/2171 Not really needed but nice to have it inside because wrong update script can be danger if ispCP distribution will have big changes in future.
And thanks for your work guys, after some bugs was removed GUI looks really better.
Sorry, I can't reproduce it with r2531
(01-17-2010 03:23 AM)marchaos Wrote: ...
Now I have troubles with traffic counting - statistics show zero values.
I create ticket http://www.isp-control.net/ispcp/ticket/2167
I'm not sure may be something wrong with http://www.isp-control.net/ispcp/ticket/2096 , http://www.isp-control.net/ispcp/changeset/2502 ?
Does ispCP daemon need to be only killed? Does "/etc/init.d/ispcp_daemon restart" work correct?
Can somebody rewrite Nightly Update Script for current trunk because "cp ${INST_PREF}${CONF_DIR}/apache/working/ispcp.conf ${CONF_DIR}/apache/working/ispcp.conf"
don't work now? http://www.isp-control.net/documentation/doku.php?id=start:scripts:updatenightly
May be somebody can integrate this script in ispCP and rewrite this everytime when this changes needed? May be not in GUI but in ispCP package? I create ticket http://www.isp-control.net/ispcp/ticket/2171 Not really needed but nice to have it inside because wrong update script can be danger if ispCP distribution will have big changes in future.
And thanks for your work guys, after some bugs was removed GUI looks really better.
1. traffic count :
I'll inspect it.
2. Does ispCP daemon need to be only killed?
Normally, restart it's ok but in extreme mesure, you can kill the process manually and then, restart the daemon normally.
3. Nightly Update Script
First, read the NOTICE in the related documentation --> "This Script is for following the Development. It's dsigned for people, where know's what they do!!! We gave no Support for this script. Use it on your own risk!!!"
I've set your ticket as invalid because this script should be used only by experts, not by everyone. If you uses snapshoots of trunk, you accept that can be in broken state. The update script is no maintained officially.
(01-17-2010 07:39 AM)marchaos Wrote: I use the same script on Debian 1.0.3. I updated before without any troubles. "cp ${INST_PREF}${CONF_DIR}/apache/working/ispcp.conf ${CONF_DIR}/apache/working/ispcp.conf" gives error. Is it important file for ispCP or not? I think file not exist now. I don't think troubles maded by nightly update script. May be some bugs in ispCP daemon. Can somebody answer me about restarting daemon by "/etc/init.d/ispcp_daemon restart" or start/stop, does it work correct because I don't have errors when i made this but ispCP debugger still don't execute requests? Errors goes away only after reboot server and "3 Execute requests" used. Nuxwin right, better not integrate nightly update script in ispCP, but small rewrite of this needed. Please find bugs in traffic counting, they are still inside.
Sure, the file ispcp.conf is important. Now, sorry, with normal make process, I can reproduce this bug under Debian Lenny.
For the rest, see my comment above.
(01-17-2010 08:50 AM)marchaos Wrote: Guys, I found bug. /var/log/ispcp/ispcp-srv-traff.log shows:
Code:
Argument "spt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 150.
Argument "spt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 150.
Argument "spt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 150.
..................................................................................................
Argument "dpt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 150.
Argument "dpt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 190.
Argument "dpt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 190.
..................................................................................................
Argument "spt" isn't numeric in numeric gt (>) at /var/www/ispcp/engine/traffic/
ispcp-srv-traff line 190.
Look last changes there http://www.isp-control.net/ispcp/changeset/2502 and there http://www.isp-control.net/ispcp/ticket/2096. And I found topic about this http://www.isp-control.net/forum/thread-8721.html
Does next changes causes errors?
Code:
$port = $1 if ($line =~ /spt\:(\d+) *$/);
$port = $1 if ($line =~ /(spt|dpt)\:(\d+) *$/);
I'll inspect it.
Cheers ;
|