git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Siju George <sgeorge.ml@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: XML Parsing Error: junk after document element
Date: Fri, 12 Feb 2010 11:48:33 +0100	[thread overview]
Message-ID: <201002121148.37761.jnareb@gmail.com> (raw)
In-Reply-To: <b713df2c1002112023k757a54faq933b9a9bdacc7d1c@mail.gmail.com>

On Fri, Feb 12, 2010, Siju George wrote:
> On Thu, Feb 11, 2010 at 4:31 PM, Jakub Narebski <jnareb@gmail.com> 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

  reply	other threads:[~2010-02-12 10:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-11  7:47 XML Parsing Error: junk after document element Siju George
2010-02-11 11:01 ` Jakub Narebski
2010-02-12  4:23   ` Siju George
2010-02-12 10:48     ` Jakub Narebski [this message]
2010-02-17  9:46       ` Siju George

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201002121148.37761.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sgeorge.ml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).