Discussion:
[rancid] viewvc premature end of script problem rancid
Martin Kristensen
2010-08-05 10:58:06 UTC
Permalink
Hi
I used the RhysEvans guide to install rancid and everything seems to be
working except viewvc.
I used tortois to verify that the cvs is working, but I really want the
viewvc web interface to work too.

This is what I see in the apache error log:

[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] Traceback (most
recent call last):
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/var/www/cgi-bin/viewvc.cgi", line 60, in ?
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] cfg =
viewvc.load_config(CONF_
PATHNAME, server)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/usr/local/viewvc-1.0.12/lib/viewvc.py", line 3679, in load_config
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
cfg.load_config(pathname, server and server.getenv("HTTP_HOST"))
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/usr/local/viewvc-1.0.12/lib/config.py", line 57, in load_config
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
parser.read(pathname)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/usr/lib64/python2.4/ConfigParser.py", line 267, in read
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] self._read(fp,
filename)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/usr/lib64/python2.4/ConfigParser.py", line 462, in _read
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] raise
MissingSectionHeaderError(fpname, lineno, line)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
ConfigParser.MissingSectionHeaderError: File contains no section headers.
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] file:
/usr/local/viewvc-1.0.12/viewvc.conf, line: 15
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] '
\\t#cvs_roots = cvs: /usr/local/rancid/var/CVS\\n'
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] Premature end of
script headers: viewvc.cgi

I also get almost the same error message when I runcvsdbadmin rebuild
(point 29 in the guide) :

[***@rancid viewvc-1.1.6]# /usr/local/viewvc-1.1.6/bin/./cvsdbadmin rebuild
/usr/local/rancid/var/CVS/CVSROOT

Using repository root `/usr/local/rancid/var/CVS'
Traceback (most recent call last):
File "/usr/local/viewvc-1.1.6/bin/./cvsdbadmin", line 174, in ?
cfg = viewvc.load_config(CONF_PATHNAME)
File "/usr/local/viewvc-1.1.6/lib/viewvc.py", line 4277, in load_config
cfg.load_config(pathname, server and server.getenv("HTTP_HOST"))
File "/usr/local/viewvc-1.1.6/lib/config.py", line 148, in load_config
self.parser.read(self.conf_path or [])
File "/usr/lib64/python2.4/ConfigParser.py", line 267, in read
self._read(fp, filename)
File "/usr/lib64/python2.4/ConfigParser.py", line 462, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /usr/local/viewvc-1.1.6/viewvc.conf, line: 70
'cvs_roots = cvs:\n'

Can anyone tell me what I'm doing wrong ?

Thanks!

-Martin
john heasley
2010-08-05 18:20:06 UTC
Permalink
Post by Martin Kristensen
Hi
I used the RhysEvans guide to install rancid and everything seems to be
working except viewvc.
I used tortois to verify that the cvs is working, but I really want the
viewvc web interface to work too.
i dont use it. my guess is that you have a syntax error in that config
file. i suspect it is just perl syntax and perl -c configfilename might
be a good way to verify the syntax of the file.
Lance Vermilion
2010-08-05 19:03:20 UTC
Permalink
Martin,

Can you post your viewvc.conf? and the directory listing of where your
rancid CVS is? that should make it easy to fix this issue...hopefully.
Post by Martin Kristensen
Hi
I used the RhysEvans guide to install rancid and everything seems to be
working except viewvc.
I used tortois to verify that the cvs is working, but I really want the
viewvc web interface to work too.
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] Traceback (most
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]   File
"/var/www/cgi-bin/viewvc.cgi", line 60, in ?
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]     cfg =
viewvc.load_config(CONF_
PATHNAME, server)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]   File
"/usr/local/viewvc-1.0.12/lib/viewvc.py", line 3679, in load_config
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
cfg.load_config(pathname, server and server.getenv("HTTP_HOST"))
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]   File
"/usr/local/viewvc-1.0.12/lib/config.py", line 57, in load_config
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
parser.read(pathname)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]   File
"/usr/lib64/python2.4/ConfigParser.py", line 267, in read
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]     self._read(fp,
filename)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]   File
"/usr/lib64/python2.4/ConfigParser.py", line 462, in _read
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]     raise
MissingSectionHeaderError(fpname, lineno, line)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
ConfigParser.MissingSectionHeaderError: File contains no section headers.
/usr/local/viewvc-1.0.12/viewvc.conf, line: 15
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] '
\\t#cvs_roots = cvs: /usr/local/rancid/var/CVS\\n'
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] Premature end of
script headers: viewvc.cgi
I also get almost the same error message when I runcvsdbadmin rebuild
/usr/local/rancid/var/CVS/CVSROOT
Using repository root `/usr/local/rancid/var/CVS'
  File "/usr/local/viewvc-1.1.6/bin/./cvsdbadmin", line 174, in ?
    cfg = viewvc.load_config(CONF_PATHNAME)
  File "/usr/local/viewvc-1.1.6/lib/viewvc.py", line 4277, in load_config
    cfg.load_config(pathname, server and server.getenv("HTTP_HOST"))
  File "/usr/local/viewvc-1.1.6/lib/config.py", line 148, in load_config
    self.parser.read(self.conf_path or [])
  File "/usr/lib64/python2.4/ConfigParser.py", line 267, in read
    self._read(fp, filename)
  File "/usr/lib64/python2.4/ConfigParser.py", line 462, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /usr/local/viewvc-1.1.6/viewvc.conf, line: 70
'cvs_roots = cvs:\n'
Can anyone tell me what I'm doing wrong ?
Thanks!
-Martin
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Martin Kristensen
2010-08-06 06:30:08 UTC
Permalink
Thanks for your reply.
Here is what I've edited in viewvc.conf:

root_parents = /usr/local/rancid/var/CVS : cvs
rcs_path = /usr/local/bin/
address = <a href=mailto:***@domain.com>IT Support</a>
use_enscript = 1
enscript_path = /usr/bin/
use_highlight = 1
highlight_path = /usr/bin

[cvsdb]
enabled = 1
host = localhost
port = 3306
database_name = ViewVC
user = ***
passwd = ***
readonly_user = ***
readonly_passwd = ***
row_limit = 1000


-Martin
Post by Lance Vermilion
Martin,
Can you post your viewvc.conf? and the directory listing of where your
rancid CVS is? that should make it easy to fix this issue...hopefully.
Post by Martin Kristensen
Hi
I used the RhysEvans guide to install rancid and everything seems to be
working except viewvc.
I used tortois to verify that the cvs is working, but I really want the
viewvc web interface to work too.
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] Traceback (most
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/var/www/cgi-bin/viewvc.cgi", line 60, in ?
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] cfg =
viewvc.load_config(CONF_
PATHNAME, server)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/usr/local/viewvc-1.0.12/lib/viewvc.py", line 3679, in load_config
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
cfg.load_config(pathname, server and server.getenv("HTTP_HOST"))
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/usr/local/viewvc-1.0.12/lib/config.py", line 57, in load_config
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
parser.read(pathname)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/usr/lib64/python2.4/ConfigParser.py", line 267, in read
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
self._read(fp,
Post by Martin Kristensen
filename)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/usr/lib64/python2.4/ConfigParser.py", line 462, in _read
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] raise
MissingSectionHeaderError(fpname, lineno, line)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
ConfigParser.MissingSectionHeaderError: File contains no section headers.
/usr/local/viewvc-1.0.12/viewvc.conf, line: 15
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] '
\\t#cvs_roots = cvs: /usr/local/rancid/var/CVS\\n'
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] Premature end
of
Post by Martin Kristensen
script headers: viewvc.cgi
I also get almost the same error message when I runcvsdbadmin rebuild
rebuild
Post by Martin Kristensen
/usr/local/rancid/var/CVS/CVSROOT
Using repository root `/usr/local/rancid/var/CVS'
File "/usr/local/viewvc-1.1.6/bin/./cvsdbadmin", line 174, in ?
cfg = viewvc.load_config(CONF_PATHNAME)
File "/usr/local/viewvc-1.1.6/lib/viewvc.py", line 4277, in load_config
cfg.load_config(pathname, server and server.getenv("HTTP_HOST"))
File "/usr/local/viewvc-1.1.6/lib/config.py", line 148, in load_config
self.parser.read(self.conf_path or [])
File "/usr/lib64/python2.4/ConfigParser.py", line 267, in read
self._read(fp, filename)
File "/usr/lib64/python2.4/ConfigParser.py", line 462, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /usr/local/viewvc-1.1.6/viewvc.conf, line: 70
'cvs_roots = cvs:\n'
Can anyone tell me what I'm doing wrong ?
Thanks!
-Martin
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Martin Kristensen
2010-08-10 07:57:50 UTC
Permalink
Most of the config was already commented out, but I overlooked the *
[general]* section in the viewvc config and placed the *cvs_roots = Rancid:
/usr/local/rancid/var/CVS* in the top of the config instead of in the
assigned section.
The [cvsdb] section was already commented out so that didn't have an impact
when I added my cvsdb info.
So now it actually works :-)

-Martin
Take a look at my attached document. It is not complete but is
certainly a nice source of info. I know the document that you used to
build your setup and mine is very similar but built entirely from a
different set of info and I have expected output of directories/etc.
For me personally I would attempt without MySQL to start.
I don't use root_parents I use the following.
cvs_roots = Rancid: /usr/local/rancid/var/CVS
default_root = Rancid
Post by Martin Kristensen
Thanks for your reply.
root_parents = /usr/local/rancid/var/CVS : cvs
rcs_path = /usr/local/bin/
use_enscript = 1
enscript_path = /usr/bin/
use_highlight = 1
highlight_path = /usr/bin
[cvsdb]
enabled = 1
host = localhost
port = 3306
database_name = ViewVC
user = ***
passwd = ***
readonly_user = ***
readonly_passwd = ***
row_limit = 1000
-Martin
Post by Lance Vermilion
Martin,
Can you post your viewvc.conf? and the directory listing of where your
rancid CVS is? that should make it easy to fix this issue...hopefully.
Post by Martin Kristensen
Hi
I used the RhysEvans guide to install rancid and everything seems to
be
Post by Martin Kristensen
Post by Lance Vermilion
Post by Martin Kristensen
working except viewvc.
I used tortois to verify that the cvs is working, but I really want
the
Post by Martin Kristensen
Post by Lance Vermilion
Post by Martin Kristensen
viewvc web interface to work too.
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] Traceback (most
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/var/www/cgi-bin/viewvc.cgi", line 60, in ?
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] cfg =
viewvc.load_config(CONF_
PATHNAME, server)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/usr/local/viewvc-1.0.12/lib/viewvc.py", line 3679, in load_config
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
cfg.load_config(pathname, server and server.getenv("HTTP_HOST"))
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/usr/local/viewvc-1.0.12/lib/config.py", line 57, in load_config
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
parser.read(pathname)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/usr/lib64/python2.4/ConfigParser.py", line 267, in read
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
self._read(fp,
filename)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] File
"/usr/lib64/python2.4/ConfigParser.py", line 462, in _read
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] raise
MissingSectionHeaderError(fpname, lineno, line)
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3]
ConfigParser.MissingSectionHeaderError: File contains no section headers.
/usr/local/viewvc-1.0.12/viewvc.conf, line: 15
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] '
\\t#cvs_roots = cvs: /usr/local/rancid/var/CVS\\n'
[Wed Aug 04 13:30:56 2010] [error] [client 192.168.101.3] Premature
end
Post by Martin Kristensen
Post by Lance Vermilion
Post by Martin Kristensen
of
script headers: viewvc.cgi
I also get almost the same error message when I runcvsdbadmin rebuild
/usr/local/rancid/var/CVS/CVSROOT
Using repository root `/usr/local/rancid/var/CVS'
File "/usr/local/viewvc-1.1.6/bin/./cvsdbadmin", line 174, in ?
cfg = viewvc.load_config(CONF_PATHNAME)
File "/usr/local/viewvc-1.1.6/lib/viewvc.py", line 4277, in load_config
cfg.load_config(pathname, server and server.getenv("HTTP_HOST"))
File "/usr/local/viewvc-1.1.6/lib/config.py", line 148, in
load_config
Post by Martin Kristensen
Post by Lance Vermilion
Post by Martin Kristensen
self.parser.read(self.conf_path or [])
File "/usr/lib64/python2.4/ConfigParser.py", line 267, in read
self._read(fp, filename)
File "/usr/lib64/python2.4/ConfigParser.py", line 462, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /usr/local/viewvc-1.1.6/viewvc.conf, line: 70
'cvs_roots = cvs:\n'
Can anyone tell me what I'm doing wrong ?
Thanks!
-Martin
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Loading...