If you encounter an error in your wiki such as, "CANT_CONNECT_LOOPBACK" or "DNS_HOST_NOT_FOUND" it is likely that you have an apache configuration problem or your deki-wiki daemon isn't running (i.e. it is failing to start properly or dying right after startup). Essentially, this error indicates that Apache is having trouble communicating with the deki-wiki daemon (mindtouch.host.exe).
If your deki-wiki daemon isn't running you'll need to fix whatever is causing that problem. Troubleshooting a failed deki-wiki daemon is a much larger problem than this wiki page is meant to cover. For help with this please refer to the following topics (or perform a search):
If your deki-wiki daemon is running and you can connect to it successfully from your server it is likely that your apache configuration is causing the problem. To test if the deki-wiki daemon is working properly you can use the curl command:
root@riskable ~ # curl http://localhost:8081/host/test <message><status>200</status><headers><User-Agent>curl/7.12.1 (x86_64-redhat-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6</User-Agent><Host>localhost:8081</Host><Pragma>no-cache</Pragma><Accept>*/*</Accept><Content-Length>0</Content-Length><Content-Type>application/octet-stream</Content-Type><Content-Encoding>utf-8</Content-Encoding><X-Dream-Transport>http://localhost:8081/</X-Dream-Transport><X-Dream-User-Host>127.0.0.1:8081</X-Dream-User-Host><X-Dream-Path-Prefix>@api</X-Dream-Path-Prefix><X-Dream-Origin></X-Dream-Origin></headers><body format="none" /><verb>GET</verb></message>
As long as you see, "<status>200</status>" your deki-wiki daemon is (most likely) running properly. This means that the problem is likely in your apache configuration.
The default deki-wiki proxy configuration for Apache 2.2 is the following (typically somewhere in /etc/apache2/conf.d or /etc/httpd/conf.d):
ProxyPass /@api http://localhost:8081 retry=1 ProxyPassReverse /@api http://localhost:8081
If you're using a version of Apache prior to 2.2 you'll want to make sure that "retry=1" option is omitted (since it will just give you errors when trying to start Apache):
ProxyPass /@api http://localhost:8081 ProxyPassReverse /@api http://localhost:8081
If your deki-wiki daemon is on another server you'll need to replace "localhost" with your remote server's hostname or IP address. Note: If you're using localhost and Apache can't connect to the deki-wiki daemon you'll see the "CANT_CONNECT_LOOPBACK" error whereas if you're using a real hostname instead of localhost you'll see the "DNS_HOST_NOT_FOUND" error.
At this point if you've verified that your deki-wiki daemon is working (you can connect to it successfully from the server running Apache) it is likely that apache is trying to connect to your deki-wiki daemon via a proxy server (inadvertently). Check to make sure that you don't have the $http_proxy variable set in your shell when you restart apache. You can check this by typing "echo $http_proxy" on the command line:
root@riskable ~ $ echo $http_proxy http://proxy.mycompany.com:8080
If you see something like that you've just figured out the problem :). You can unset this variable before starting apache by simply typing "unset http_proxy" (note this will likely prevent tools like wget from being able to download files until you re-login). To ensure this problem never happens again you can add http_proxy="" somewhere at the top of your apache init script (i.e. /etc/init.d/httpd).
root@riskable ~ $ unset http_proxy ; /etc/init.d/httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ]
Your wiki should now be working properly!