Re: XML Parsing Error: junk after document element

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 12, 2010, Siju George wrote:
> On Thu, Feb 11, 2010 at 4:31 PM, Jakub Narebski <jnareb@xxxxxxxxx> wrote:
> >
> > Which version of gitweb?[1]
> 
> gitweb-1.6.0.6  - all packages are from pkgsrc on DragonFly BSD
> v2.5.1.672.gf81ef-DEVELOPMENT #17: Tue Feb
> 
> > Which version of git?[2]
> 
> scmgit-1.6.6.1

I don't think that difference in version numbers would be the problem.

Is this a version of git that gitweb (or to be more accurate web server)
sees?  Take a look at HTML source of page returned by gitweb, and at
the top there would be 'git core binaries version' in comment, and
'git/<version>' in the meta generator tag (this can be seen also in
"View Page Info" view, not only in "View Page Source").
 
> > What web server?
>  
>  apache-2.2.14nb1
>
> > Which version of CGI.pm is used by web server?[3]
> >
> 
> $CGI::revision = '$Id: CGI.pm,v 1.263 2009/02/11 16:56:37 lstein Exp $';
> $CGI::VERSION='3.43';

This should not be a problem then.

> > Try to view source, or use different web browser that doesn't do
> > strict XML validation to find the source of this error.
> >
> 
> I was using firefox 3.6-2.
> Trying with Konqueror Version 4.3.4 (KDE 4.3.4) Using KDE 4.3.4 (KDE
> 4.3.4) I dont get the error but it does not list my projectts. I get
> this message on the page.
> 
> =================================================
> 
> projects /
> 
> 
>  404 - No projects found
> 
> OPMLTXT
> OK
> The requested URL /cgi-bin/gitweb.cgi was not found on this server.

You have two problems here.  First is that gitweb doesn't find your
projects because of problem with filesystem permissions.

Second is what it looks misconfigured web server.  The second part,
starting after [OPML][TXT] is not from gitweb, but from a web server.
It looks like you have either two web servers, or two parts of web
server configuration, or some worker of web server that didn't get
updated configuration, and it doesn't have permissions to access
gitweb.cgi or doesn't have configuration to know what to do with
the above URL.

What might help is, if you can, to restart your web server, something
like

  # apachectl restart           # as root

(I don't know what the proper command would be on DragonFlyBSD).

> ======================================================
> 
> this page is shown when I take the URL
> 
> http://172.16.3.27/cgi-bin/gitweb.cgi
> 
> but I have the projectroot configure in gitweb.conf and there is a git
> project in that location.
> 
> # cat /usr/pkg/etc/gitweb.conf | grep projectroot
> our $projectroot = "/Backup1/Data/git-repositories";
> # ls -l /Backup1/Data/git-repositories
> total 0
> drwxr-xr-x  1 root  wheel  0 Feb 11 10:40 systems-configuration
> # ls -l /Backup1/Data/git-repositories/systems-configuration/.git/
> total 0
> -rwxr-x---  1 root  wheel  393 Feb 11 11:03 COMMIT_EDITMSG
> -rwxr-x---  1 root  wheel   23 Feb 11 10:40 HEAD
> -rwxr-x---  1 root  wheel   92 Feb 11 10:40 config
> -rwxr-x---  1 root  wheel   73 Feb 11 10:40 description
> drwxr-x---  1 root  wheel    0 Feb 11 10:40 hooks
> -rwxr-x---  1 root  wheel  120 Feb 11 11:29 index
> drwxr-x---  1 root  wheel    0 Feb 11 10:40 info
> drwxr-x---  1 root  wheel    0 Feb 11 10:58 logs
> drwxr-x---  1 root  wheel    0 Feb 11 11:03 objects
> drwxr-x---  1 root  wheel    0 Feb 11 10:40 refs

Apache web server usually runs as apache:apache (user apache, group
apache); it most certainly *not* run as root, or is in wheel
(root-like) group.  So as you can see web server, and gitweb which
runs with the same uid and guid, doesn't have permissions to read
(access) your repositories.

You need to fix permissions, perhaps (as it seems to be your private
machine and private gitweb) by setting group to some common group
between you and web server and giving sticky group bit, or making
git repository world-readable: take a look at "shared repository"
thing: see description of core.sharedRepository config variable
(so that git wouldn't take world-readable permissions back).

BTW. what are you doing working as root?

> What could be the trouble?

Filesystem permissions on git repository, and some strange error in
web server configuration.  Unfortunately I haven't got a clue what
to do about the latter.

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]