Environment
SUSE Linux Enterprise Server 10 SP2
Novell SUSE Linux Enterprise Subscription Management tool (SMT)Situation
During the setup of a client side server to use a locally installed SMT server, these errors were seen in the /var/log/messages file on the client side, after running the 'suse_register' command:
ERROR: Could not add 'http://smt.mycompany.com/': Failed to download XML metadata: Download failed: (http://smt.mycompany.com/repo/repoindex.xml) The remote server returned an error: (502) Bad Gateway.
zmd: ServiceManager (ERROR): Service refresh failed for 'http://smt.mycompany.com/': Failed to download XML metadata: Download failed: (http://smt.mycompany.com/repo/repoindex.xml) The remote server returned an error: (502) Bad Gateway.
Resolution
Checking the /var/log/apache2/access_log for the SMT server, it showed the registration coming in as expected. It should look similar to this:
"POST /center/regsvc?command=listproducts&lang=en-US&version=1.0 HTTP/1.1" 200
"POST /center/regsvc?command=register&lang=en-US&version=1.0 HTTP/1.1" 200
"POST /center/regsvc?command=register&lang=en-US&version=1.0 HTTP/1.1" 200
The number 200 on the end means that Apache received the request and it responded with an "OK" message. Immediately after that, we should have been seeing the following message:
"GET /repo/repoindex.xml HTTP/1.1" 401 1302 "-""ZENWorks Management Daemon/7.2.2"
However, it was not showing up. Once suse_register is done, it hands off the downloading of the repoindex.xml file from either nu.novell.com or your local SMT server to the zmd daemon. In this case, we found that the /etc/zmd/zmd.conf file had a listing for a proxy server. The YaST tool for proxy listings had been setup to not go to the proxy for this SMT server, but zmd is not aware of this setting. Once the proxy listing in the zmd.conf file was removed, and the novell-zmd service was restarted, the registration could complete normally and download patches from the SMT server.