Kemin Zhou
Kemin Zhou

Reputation: 6891

hgweb server abort: HTTP Error 404: Condition Intercepted

I have set up an http server with the hgweb.cgi cgi script in a Linux server. I put up a mercurial repository in the server. I can clone the repository from a windows machine without any problems. I can view the server in any browser. I can clone the repository from my localhost: (the server)

hg clone http:// localhost /hg/proj

works perfectly. But when I tried to access the server on another Linux machine I got this error message:

hg clone http://myhgserver/hg/proj

abort: HTTP Error 404: Condition Intercepted

I could not find any error message in the error_log file on the apache2 web server.

First I suspected that I am using an older version of hg on my client side (1.4). My server side is hg 2.6.3.
Then I tied to install the latest mercurial in my home directory (I have no permission the system directories)

I used the "make local" command to install the mercurial package locally.

./hg --version Mercurial Distributed SCM (version 3.0+4-75aaae8ad660+20140613)

The clonning command gave the same error: abort: HTTP Error 404: Condition Intercepted

I have spend almost the whole day, and now it is mid night, still could not find any answer.

Anyone else has seen such a problem?

Kemin

Upvotes: 0

Views: 562

Answers (1)

Kemin Zhou
Kemin Zhou

Reputation: 6891

After a night of sleep, I got my problem resolved. Basically, the hg program is missing the ability to resolve hostname into IP addresses. Since my server and client computers are on the same LAN, there is no connection or firewall problems.

I can PING from my client to my server without any problems. I can run the host command: host myhgserver it will give you the whole IP address and the fully qualified domain names. If I used the IP address instead of the host short name, then hg works fine.

What I think is needed is to add a few lines of code to hg client program so that it can find the server from an alias.

Upvotes: 0

Related Questions