LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > Litespeed: Issue with cPanel Awstats

Reply
 
Thread Tools Display Modes
  #1  
Old 05-22-2012, 10:38 PM
jackwilliams jackwilliams is offline
New Member
 
Join Date: May 2012
Posts: 9
Cool Litespeed: Issue with cPanel Awstats

Hello,

I am running a shared server with litespeed. It was working fine till this march. However, now the AWSTATS are not updated properly. It is not updated properly also when i try to update manually it is giving huge errors.

++++++++
# /scripts/runweblogs xxxxxxx
Log checker loaded ok..
==> cPanel Log Daemon version 25.0
==> Loaded RRDs: version 1.4004
Processing xxxxxxx...
Run Logs domain: xxxxxxx.com.sg BW Limit: 52428800000 Domains: [extranet.xxxxxxx.com mail.xxxxxxx.com mail1.xxxxxxx.com ssl.xxxxxxx.com ssl1.xxxxxxx.com ssl2.xxxxxxx.com vpn2463.xxxxxxx.com webmail.xxxxxxx.com.sg xxxxxxx.com wiselypc.com.sg promis.xxxxxxx.com mail2.xxxxxxx.com]
[2012-05-22 17:32:03 +0800] Process bandwidth for xxxxxxx
[2012-05-22 17:32:04 +0800] Processing exim stats for xxxxxxx....
[2012-05-22 17:32:04 +0800] ...Done
[2012-05-22 17:32:26 +0800] Disk Usage for xxxxxxx on /dev/mapper/VolGroup00-LogVol00 (502908/5120000)
[2012-05-22 17:32:26 +0800] WEBLANG english
[2012-05-22 17:32:26 +0800] Archive Status: 1
[2012-05-22 17:32:26 +0800] About to fork for xxxxxxx [ALL DOMAINS: extranet.xxxxxxx.com, mail.xxxxxxx.com, mail1.xxxxxxx.com, ssl.xxxxxxx.com, ssl1.xxxxxxx.com, ssl2.xxxxxxx.com, vpn2463.xxxxxxx.com, webmail.xxxxxxx.com.sg, xxxxxxx.com, wiselypc.com.sg, promis.xxxxxxx.com, mail2.xxxxxxx.com, xxxxxxx.com.sg]
[2012-05-22 17:32:26 +0800] Create/Update database for config "/home/xxxxxxx/tmp/awstats/awstats.xxxxxxx.com.sg.conf" by AWStats version 7.0 (build 1.971)
[2012-05-22 17:32:26 +0800] From data in log file "/usr/local/apache/domlogs/xxxxxxx.com.sg.bkup"...
[2012-05-22 17:32:26 +0800] Error: Couldn't open server log file "/usr/local/apache/domlogs/xxxxxxx.com.sg.bkup" : Permission denied
[2012-05-22 17:32:26 +0800] Setup ('/home/xxxxxxx/tmp/awstats/awstats.xxxxxxx.com.sg.conf' file, web server or permissions) may be wrong.
[2012-05-22 17:32:26 +0800] Check config file, permissions and AWStats documentation (in 'docs' directory).
Complete

++++++++.

I found the root cause of this issue. The apache domlogs are running with nobody:nobody permission. It should be "root:username".

++++++++
root@host [/usr/local/apache]# ll |grep domlogs/
drwx--x--x 404 root wheel 516096 May 23 11:40 domlogs/
root@host [/usr/local/apache]#

User account:
-rw-r----- 2 nobody nobody 4450 May 23 11:15 xxxxxxx.com
-rw-r--r-- 1 nobody nobody 229 May 23 11:15 xxxxxxx.com-bytes_log
-rw-r--r-- 1 root root 1 Feb 20 2010 xxxxxxx.com-bytes_log.offset
++++++++

Could you please let me know how to change this or fix this issue?
Reply With Quote
  #2  
Old 05-23-2012, 12:03 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
is PHP suEXEC (Admin CP -> Configuration -> Server -> General) enabled or not?
Reply With Quote
  #3  
Old 05-23-2012, 07:59 PM
jackwilliams jackwilliams is offline
New Member
 
Join Date: May 2012
Posts: 9
Hello,

Yes, the suEXE is enabled. Please refer the snapshot. Is there any other possible solutions for this issue?
Attached Images
File Type: png suexe.png (45.8 KB, 2 views)
Reply With Quote
  #4  
Old 05-24-2012, 03:58 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
can you switch back to Apache and see if the problem persists?
Reply With Quote
  #5  
Old 05-25-2012, 03:52 AM
jackwilliams jackwilliams is offline
New Member
 
Join Date: May 2012
Posts: 9
Hello,

I could see that if I switch to apache it is giving the following error.
++++++++++
LiteSpeed Web Server Control Operation ... Switch to Apache

LSWS Stopped.
Apache is not up within 30 secs, try again by force kill litespeed.
Apache is still not up.

Failed to switch to Apache! Please either start LiteSpeed or manually switch to Apache!

Apache is not started may be caused by configuration error. To manually check this problem, please ssh to your server and check:

Try stop LiteSpeed if lshttpd still running:
killall -9 lshttpd

remove the lsws wrapper if the original one is found:

restore Apache httpd if /usr/local/apache/bin/httpd_ls_bak exists.
mv -f /usr/local/apache/bin/httpd_ls_bak /usr/local/apache/bin/httpd

restore cPanel restart httpd script if /scripts/restartsrv_httpd_ls_bak exists.
mv -f /scripts/restartsrv_httpd_ls_bak /scripts/restartsrv_httpd

run the restart command manually: /scripts/restartsrv_httpd and check the error.
++++++++

I have tried to kill the process and tried to do the same thing. But still i get the above error when i switch to apache.

I have found one more possible cause that the PHP is working with lsphp
++++++++
# /usr/local/lsws/fcgi-bin/lsphp5 -i | grep Configuration
Configuration File (php.ini) Path => /usr/local/lsws/lsphp5/lib
Loaded Configuration File => /usr/local/lsws/lsphp5/lib/php.ini
Configuration
++++++++

Normally, the litespeed PHP with cPanel will point to the default location php.ini.
++++++++
# /usr/local/lsws/fcgi-bin/lsphp5 -i | grep Configuration
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
++++++++

What can I do now?
Reply With Quote
  #6  
Old 05-25-2012, 12:21 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
Quote:
Originally Posted by jackwilliams View Post
Hello,

I could see that if I switch to apache it is giving the following error.
++++++++++
LiteSpeed Web Server Control Operation ... Switch to Apache

LSWS Stopped.
Apache is not up within 30 secs, try again by force kill litespeed.
Apache is still not up.

Failed to switch to Apache! Please either start LiteSpeed or manually switch to Apache!

Apache is not started may be caused by configuration error. To manually check this problem, please ssh to your server and check:

Try stop LiteSpeed if lshttpd still running:
killall -9 lshttpd

remove the lsws wrapper if the original one is found:

restore Apache httpd if /usr/local/apache/bin/httpd_ls_bak exists.
mv -f /usr/local/apache/bin/httpd_ls_bak /usr/local/apache/bin/httpd

restore cPanel restart httpd script if /scripts/restartsrv_httpd_ls_bak exists.
mv -f /scripts/restartsrv_httpd_ls_bak /scripts/restartsrv_httpd

run the restart command manually: /scripts/restartsrv_httpd and check the error.
++++++++

I have tried to kill the process and tried to do the same thing. But still i get the above error when i switch to apache.
These are command to run from shell to get Apache to start and lsws to stop.
There is no need to switch to Apache in plugin.

Quote:
Originally Posted by jackwilliams View Post
I have found one more possible cause that the PHP is working with lsphp
++++++++
# /usr/local/lsws/fcgi-bin/lsphp5 -i | grep Configuration
Configuration File (php.ini) Path => /usr/local/lsws/lsphp5/lib
Loaded Configuration File => /usr/local/lsws/lsphp5/lib/php.ini
Configuration
++++++++

Normally, the litespeed PHP with cPanel will point to the default location php.ini.
++++++++
# /usr/local/lsws/fcgi-bin/lsphp5 -i | grep Configuration
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
++++++++

What can I do now?
maybe your cwd is in /usr/local/lsws/lsphp5/lib. the php.ini in current dir will take precedence. so it is not an issue.
Reply With Quote
  #7  
Old 05-26-2012, 10:06 PM
jackwilliams jackwilliams is offline
New Member
 
Join Date: May 2012
Posts: 9
Hello,

I did the the following to start apache.
++++++++
# ps -aux |grep litespeed
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root 118891 0.4 0.3 55992 27040 ? S< 11:53 0:00 litespeed (lshttpd)
nobody 118894 0.6 0.3 56860 28164 ? S< 11:53 0:00 litespeed (lshttpd)
root 119296 2.1 0.3 55996 27044 ? S< 11:54 0:00 litespeed (lshttpd)
nobody 119298 0.0 0.3 55928 26916 ? S< 11:54 0:00 litespeed (lshttpd)
nobody 119299 0.6 0.3 56356 27624 ? S< 11:54 0:00 litespeed (lshttpd)
root 119344 0.0 0.0 64356 876 pts/3 SN+ 11:54 0:00 grep litespeed

# kill -9 118894 119296 119298 119299 119389

# ps -aux |grep lshttpd
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root 119614 0.0 0.0 64352 868 pts/3 SN+ 11:54 0:00 grep lshttpd

Stopped litespeed
# /etc/init.d/lsws stop

Moved apache binary
# ll /usr/local/apache/bin/httpd_ls_bak
-rwxr-xr-x 1 root root 1446322 May 5 13:21 /usr/local/apache/bin/httpd_ls_bak*
# ll /scripts/restartsrv_httpd
-rwxr-xr-x 1 root root 4432 Apr 6 02:55 /scripts/restartsrv_httpd*


# /scripts/restartsrv_httpd
#

# netstat -plane |grep :80 |grep LISTEN
tcp 0 0 112.140.185.239:80 0.0.0.0:* LISTEN 0 383665297 141492/litespeed (l
tcp 0 0 112.140.185.238:80 0.0.0.0:* LISTEN 0 383665296 141492/litespeed (l
tcp 0 0 112.140.185.217:80 0.0.0.0:* LISTEN 0 383665295 141492/litespeed (l
tcp 0 0 112.140.185.216:80 0.0.0.0:* LISTEN 0 383665294 141492/litespeed (l
tcp 0 0 112.140.185.215:80 0.0.0.0:* LISTEN 0 383665293 141492/litespeed (l
tcp 0 0 112.140.185.221:80 0.0.0.0:* LISTEN 0 383665292 141492/litespeed (l
tcp 0 0 112.140.185.220:80 0.0.0.0:* LISTEN 0 383665291 141492/litespeed (l
tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 0 383665290 141492/litespeed (l
tcp 0 0 180.210.205.251:80 0.0.0.0:* LISTEN 0 383665289 141492/litespeed (l

Even tried this by killing all the lshttpd process. and starting the apache binary
# /usr/local/apache/bin/apachectl start
[OK] Send SIGUSR1 to 664016

Nothing helps
++++++++

What can I do now? server is not getting switched to apache and awstats is not getting fixed too. Litespeed version is 4.1.12.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:57 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.