Location Not Found
Error message: http protocol error: code: 404 reason: Not Found
Check your publisher URIs as described in Cannot Access Package Repository. If you can view or ping the location successfully, use the pkgrepo list command to try to show one of the packages in the repository.
If the URI is a file-based repository, make sure the files and directories are readable by the pkg5srv user. You can use the pkgrepo verify command to check whether the repository is readable by the pkg5srv user.
Check your web server configuration. See Chapter 5, Running the Package Depot Server Behind a Web Server in Creating Package Repositories in Oracle Solaris 11.4 for more information.
-
If you run the package depot server behind an Apache web server instance, include the following setting in your
httpd.conffile to not decode encoded forward slashes:AllowEncodedSlashes NoDecode
-
Set the depot server
pkg/proxy_baseto the URL of the repository on the Apache server:$ svccfg -s pkg/server:repo setprop pkg/proxy_base = astring: http://pkg.example.com/myrepo $ svcadm refresh pkg/server:repo
If the problem occurs in a non-global zone, take the following troubleshooting steps. Remember that non-global zones use a special package repository called the system repository. See the pkg.sysrepo(8) man page for more information about the system repository.
-
You cannot use the
-goption in an image that has non-global zones. Instead, use thepkg set-publishercommand to explicitly add that publisher and origin. -
Make sure the files and directories in file-based repositories are readable by the
pkg5srvuser. Thepkg5srvuser runs thesystem-repositoryApache instance. See Relationship Between Global and Non-Global Zones for examples that show how to find the location of a system repository. -
If your site requires a proxy to access external locations, make sure the proxy has been specified correctly for publishers in the global zone. Use the
--proxyoption of thepkg set-publishercommand to specify the proxy. See Specifying a Proxy for instructions. One way to check your proxy is to make sure you get no access error messages from thepkg refresh --fullcommand. -
Make sure the service
svc:/application/pkg/system-repository:defaultis online in the global zone. -
Make sure the service
svc:/application/pkg/zones-proxyd:defaultis online in the global zone and the servicesvc:/application/pkg/zones-proxy-client:defaultis online in the non-global zone. -
In the global zone, check the log files in
/var/log/pkg/sysrepo/*for any permissions errors reported when trying to read files. Check for 404 or 503 errors reported in/var/log/pkg/sysrepo/access_log. Check for errors reported in/var/log/pkg/sysrepo/error_log. -
In the global zone, verify that
localhostis set to127.0.0.1in the/etc/hostsfile. Verify thatListenis set to127.0.0.1:1008andServerNameis set to127.0.0.1in the/system/volatile/pkg/sysrepo/sysrepo_httpd.conffile. -
In the global zone, check whether the file
/system/volatile/pkg/sysrepo/sysrepo_httpd.confcontains Alias lines of the following form:$ grep Alias /system/volatile/pkg/sysrepo/sysrepo_httpd.conf WSGIScriptAlias /wsgi_p5p /etc/pkg/sysrepo/sysrepo_p5p.pyIf the
sysrepo_httpd.conffile has no Alias lines, restart thesysreposervice:$ svcadm restart svc:/application/pkg/system-repository:default