Error: Couldn't open config file "awstats.example.com.conf" nor "awstats.conf"

hm2k

Well-Known Member
Jul 19, 2005
93
0
156
One of my users is getting the following error:

Error: Couldn't open config file "awstats.example.com.conf" nor "awstats.conf" after searching in path "/usr/local/cpanel/base,/home/user/tmp/awstats/,/etc/opt/awstats,/etc/awstats,/etc,/usr/local/etc/awstats": No such file or directory
URL: http://server.example.net:2082/awstats.pl?config=example.com&lang=en

I have tried using "/scripts/runweblogs" for this user, yet it seems there is no mention of awstats, and the problem remains.

Any ideas how to resolve this issue?

Thanks.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
13
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
One of my users is getting the following error:
URL: http://server.example.net:2082/awstats.pl?config=example.com&lang=en

I have tried using "/scripts/runweblogs" for this user, yet it seems there is no mention of awstats, and the problem remains.

Any ideas how to resolve this issue?
So that we can better diagnose the issue, please provide the following additional details (numbered for readability):

1.) Is the user seeing the message at the provided example URL (viewing AWstats in cPanel)? If not, where exactly is the user seeing the specified message?

2.) If different than only accessing the AWstats page in cPanel, what activity or action is occurring or being performed when the message is displayed or triggered?

3.) What is the full cPanel version number of the system?
Code:
# cat /usr/local/cpanel/version && echo
4.) What are the permissions of the following paths?
/home/username
/home/username/tmp
/home/username/tmp/awstats
Code:
# stat /home/username
# stat /home/username/tmp
# stat /home/username/tmp/awstats
5.) What are the permissions of the files inside the above "awstats" directory?
Code:
# ls -ahl /home/username/tmp/awstats
 
Last edited:

hm2k

Well-Known Member
Jul 19, 2005
93
0
156
Hi,

Thanks for your reply.

1, I already provided the URL. Which shows the URL of a user viewing awstats via cPanel (note the port): http://server.example.net:2082/awstats.pl?config=example.com&lang=en

2, No difference.

3, 11.25.0-CURRENT_40255

4, (Note: The username was replaced with 'username')
[[email protected] /]# stat /home/username
File: `/home/username'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 10h/16d Inode: 8214089 Links: 12
Access: (0711/drwx--x--x) Uid: (32036/ username) Gid: (32038/ username)
Access: 2009-11-05 04:17:48.000000000 +0000
Modify: 2009-11-04 15:22:18.000000000 +0000
Change: 2009-11-04 15:22:18.000000000 +0000
[[email protected] /]# stat /home/username/tmp
File: `/home/username/tmp'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 10h/16d Inode: 8214629 Links: 7
Access: (0755/drwxr-xr-x) Uid: (32036/ username) Gid: (32038/ username)
Access: 2009-11-05 04:17:48.000000000 +0000
Modify: 2009-11-04 15:01:08.000000000 +0000
Change: 2009-11-04 15:01:08.000000000 +0000
[[email protected] /]# stat /home/username/tmp/awstats
File: `/home/username/tmp/awstats'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 10h/16d Inode: 8214643 Links: 2
Access: (0755/drwxr-xr-x) Uid: (32036/ username) Gid: (32038/ username)
Access: 2009-11-05 04:17:48.000000000 +0000
Modify: 2008-06-02 23:00:52.000000000 +0000
Change: 2008-06-02 23:00:52.000000000 +0000

5, (Note: The username was replaced with 'username')
[[email protected] /]# ls -ahl /home/username/tmp/awstats
total 8.0K
drwxr-xr-x 2 username username 4.0K Jun 2 2008 .
drwxr-xr-x 7 username username 4.0K Nov 4 15:01 ..

--

I see that you seem to think it's a permissions issue...

I think it's more likely to be related to missing awstats.conf files...

[[email protected] /]# find / | grep awstat*.conf
[[email protected] /]#

As you can see, there were no awstats conf files found on the system...

Any ideas a) why these files have gone missing and b) how to regenerate these files.

Thanks.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
13
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
I think it's more likely to be related to missing awstats.conf files...

Any ideas a) why these files have gone missing and b) how to regenerate these files.
It may be caused by AWStats being disabled (skipped) for server-wide statistics generation.

What output is displayed from the following commands (where "username" should be replaced by the cPanel account username):
Code:
# stat /usr/local/cpanel/etc/awstats.conf
# stat /usr/local/cpanel/3rdparty/bin/awstats.pl
# grep -hin "^stat\|awstats" /var/cpanel/cpanel.config
# cat /etc/stats.conf
# cat /home/username/tmp/stats.conf
# cat /var/cpanel/users/username
The two user-specific files may be munged (for username, IP, and domain names) if needed to keep the output anonymous.

WHM may be used to change statistics configuration to ensure AWstats is enabled; here is the applicable menu path for stats-related options:
WHM: Main >> Server Configuration >> Statistics Software Configuration
WHM: Main >> Server Configuration >> Tweak Settings

The following is our documentation for both of the above sections:
Statistics Software Configuration
Tweak Settings

For end-users, if allowed via WHM, users may enable or disable which statistics programs run for their domains via cPanel; here is our documentation for this as well:
ChooseLogPrograms < AllDocumentation/CpanelDocs < TWiki
 

hm2k

Well-Known Member
Jul 19, 2005
93
0
156
[[email protected] /]# stat /usr/local/cpanel/etc/awstats.conf
File: `/usr/local/cpanel/etc/awstats.conf'
Size: 23759 Blocks: 48 IO Block: 4096 regular file
Device: 10h/16d Inode: 8573726 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2008-03-02 14:18:56.000000000 +0000
Modify: 2006-03-22 23:18:56.000000000 +0000
Change: 2008-03-02 14:18:03.000000000 +0000
[[email protected] /]# stat /usr/local/cpanel/3rdparty/bin/awstats.pl
File: `/usr/local/cpanel/3rdparty/bin/awstats.pl'
Size: 626169 Blocks: 1232 IO Block: 4096 regular file
Device: 10h/16d Inode: 8705050 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2009-11-04 15:15:03.000000000 +0000
Modify: 2009-10-29 04:31:09.000000000 +0000
Change: 2009-10-29 14:05:52.000000000 +0000
[roo[email protected] /]# grep -hin "^stat\|awstats" /var/cpanel/cpanel.config
24:awstatsbrowserupdate=0
25:awstatsreversedns=0
153:skipawstats=0
173:stats_log=/usr/local/cpanel/logs/stats_log
174:statsloglevel=1
175:statthreshhold=256
[[email protected] /]# cat /etc/stats.conf
BLACKHOURS=7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22
DEFAULTGENS=WEBALIZER
VALIDUSERS=trovster
allow_awstats_include=0
[[email protected] /]# cat /home/username/tmp/stats.conf
cat: /home/username/tmp/stats.conf: No such file or directory
[[email protected] /]# cat /var/cpanel/users/username
#cPanel -- If you edit this file directly you must run /scripts/updateuserdomain s after to rebuild the cache
BWLIMIT=10485760000
CONTACTEMAIL=
CONTACTEMAIL2=
DEMO=0
DNS=usernamecentre.com
DNS1=usernamecentre.co.uk
DNS2=usernamecentre2.usernamecentre.com
FEATURELIST=default
HASCGI=0
IP=87.117.209.249
LANG=english
MAXADDON=2
MAXFTP=50
MAXLST=500
MAXPARK=1
MAXPOP=100
MAXSQL=4
MAXSUB=50
OWNER=root
PLAN=Personal Hosting
RS=x
STARTDATE=1212447550
USER=username
XDNS1=usernamecentre.usernamecentre.com
[[email protected] /]#


---


I checked the settings in WHM for Awstats, they appear to be ticked.

Is there any way to enable/disable or check from CLI?

Thanks.
 

hm2k

Well-Known Member
Jul 19, 2005
93
0
156
I made a mistake with my find/grep earlier, for some reason I used wildcards which have no place here, so here's what I meant...

[[email protected] /]# find / | grep awstat | grep conf
/usr/local/cpanel/src/3rdparty/gpl/awstats-6.7/docs/awstats_config.html
/usr/local/cpanel/src/3rdparty/gpl/awstats-6.7/wwwroot/cgi-bin/awstats.model.conf
/usr/local/cpanel/src/3rdparty/gpl/awstats-6.7/tools/httpd_conf
/usr/local/cpanel/src/3rdparty/gpl/awstats-6.7/tools/awstats_configure.pl
/usr/local/cpanel/etc/awstats.conf


---

I have since realised that on the following page:

http://server:2086/cgi/statmanager.cgi

Under "Generators Configuration", there's an option that says "Active by Default", this is currently unticked for Awstats.

I will guide my user to the following URL to see if that helps:

ChooseLogPrograms < AllDocumentation/CpanelDocs < TWiki

Thanks for your assistance.