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.conf
file to not decode encoded forward slashes:AllowEncodedSlashes NoDecode
-
Set the depot server
pkg/proxy_base
to 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
-g
option in an image that has non-global zones. Instead, use thepkg set-publisher
command to explicitly add that publisher and origin. -
Make sure the files and directories in file-based repositories are readable by the
pkg5srv
user. Thepkg5srv
user runs thesystem-repository
Apache 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
--proxy
option of thepkg set-publisher
command 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 --full
command. -
Make sure the service
svc:/application/pkg/system-repository:default
is online in the global zone. -
Make sure the service
svc:/application/pkg/zones-proxyd:default
is online in the global zone and the servicesvc:/application/pkg/zones-proxy-client:default
is 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
localhost
is set to127.0.0.1
in the/etc/hosts
file. Verify thatListen
is set to127.0.0.1:1008
andServerName
is set to127.0.0.1
in the/system/volatile/pkg/sysrepo/sysrepo_httpd.conf
file. -
In the global zone, check whether the file
/system/volatile/pkg/sysrepo/sysrepo_httpd.conf
contains Alias lines of the following form:$ grep Alias /system/volatile/pkg/sysrepo/sysrepo_httpd.conf WSGIScriptAlias /wsgi_p5p /etc/pkg/sysrepo/sysrepo_p5p.py
If the
sysrepo_httpd.conf
file has no Alias lines, restart thesysrepo
service:$ svcadm restart svc:/application/pkg/system-repository:default