Troubleshooting
This page details some common issues and their respective workarounds. For Anaconda installation or technical support options, visit our support offerings page.
403 error
Problem
A 403 error is a generic Forbidden error issued by a web server in the event the client is forbidden from accessing a resource.
The 403 error you are receiving may look like the following:
There are several reasons a 403 error could be received:
- The user has misconfigured their channels in their configuration (for example, the secure location where the token is stored was accidentally deleted (most common))
- A firewall or other security device or system is preventing user access (second most common)
- We are blocking their access because of a potential terms of service violation (third most common)
Solution
-
First, run the following to undo your current configurations:
-
Next, install or upgrade the
conda-token
tool: -
Lastly, re-apply the token and configuration settings:
If this doesn’t resolve the issue, Anaconda recommends consulting our Terms of Service error page.
Conda: Channel is unavailable/missing or package itself is missing
Problem
Configuring your .condarc
might cause you to be unable to install packages. You might receive an error message that the channel or package is unavailable or missing.
Solution
One potential fix for all of these is to run the following command:
This will clear the “index cache” and force conda to sync metadata from the repo server.
SSL-related issues
If you experience any trouble regarding SSL errors, confirm that you are adhering to the guidance in this section.
Moving CA certs to the docker-host
Anaconda recommends mounting the cacert.pem
file to the docker-host and concatenating the required root CAs
to that file on the docker-host, rather than copying the file to the containers.
-
First, place a
cacert.pem
file in${BASE_INSTALL_DIR}/config/cacert.pem
. You can obtain this file from any conda environment withcertifi
package installed ($<CONDA_PREFIX>/ssl/cacert.pem
) or from one of the Package Security Manager docker containers: -
Concatenate the necessary root certs in pem format:
-
You now have two options for updating the Package Security Manager application to use the docker-host
cacert.pem
:
- Edit the
docker-compose.yml
file and add volume mounts tonginx_proxy
,repo_api
,repo_worker
andrepo_dipacher
, or - Use a separate .yml file (shown below) and let docker-compose merge it with the stock one when starting up:
Storing user credentials
If the proxy connection requires credentials, Anaconda recommends storing the credentials in the .env file
(located in the same folder as the docker-compose.yml
file) and referencing it in docker_compose.yml
so that docker-compose.yml
is readable for a broader set of users.
When Package Security Manager is installed, an .env file is created alongside the docker-compose.yml
file by default. You can
edit this file and add variables to be referenced in the docker-compose.yml
file as follows:
Then, merge the following with existing compose content in the docker-compose.yml
file.
Notice the environment variable from .env being referenced in the environment variables:
Local mirrors
Another option is mirroring locally. You can do this by getting packages into an admin-managed channel—say, anaconda/main
—and then mirroring filtered packages from that channel to other channels.
This will make Package Security Manager the source for the mirror. As such, Package Security Manager needs to be able to validate its
own certificate, which in most cases won’t work (in very much the same way PROXY with terminating SSL will not work).
For this to work, then, you will most likely need to update the cacert.pem
file of all Package Security Manager containers. For this reason, Anaconda recommends hosting the cacert.pem
file on the docker-host instead of the containers.
SSL verification error
Cause
You may receive an SSL verification error if you have SSL enabled with a self-signed certificate.
Solution
Run the following command to disable SSL certificate check:
Run the following to verify the above command worked:
OAuth2 with self-signed certificates
Cause
Even if you have ssl_verify
set to false
while using self-signed certificates and SAML, you may still run into SSL verification errors.
You may receive an error similar to the following:
Solution
Set an environment variable called a REQUESTS_CA_BUNDLE
.
For Windows, run the following:
For Unix, run the following:
HTTP 000 CONNECTION FAILED
If you receive this error message, run the following command:
Using Redis
Cause
By default, Redis does not require a password. Not enabling a password requirement leaves your instance of Package Security Manager vulnerable.
Solution
Follow these steps to password protect your instance:
-
In the installation directory, update
config/nginx/conf.d/repo.conf
to include theadd_header
directive somewhere in theserver
block: -
Create a directory called
redis
in the configs directory: -
Create a file called
redis.conf
insideconfig/redis
with the following contents: -
Update the
docker-compose.yml
file of Package Security Manager installation to mount this custom redis config: -
Update
REDIS_ADDR
variable in.env
file to include password: -
Restart docker-compose services so changes are picked up. You can do this using:
Error message on initial login to Package Security Manager
If you receive an error on your initial login to Package Security Manager and are unable to set your license, it is likely that you have forgotten to include a default user during your installation command, and your current user lacks the administrative permissions necessary to register your license.
To correct this issue:
- Log in to the Keycloak administrative console.
- Navigate to the dev realm.
- Select Users from the left-hand navigation.
- Create a user or select an existing user from the list to view their profile page.
- Select the Role Mapping tab.
- Click Assign role.
- Select the admin role, then click Assign.
- Return to Package Security Manager and log in as this admin user.
- Set your license.
Backup fails with exit status 1
If you attempt to run the backup command and receive an error in dumping the repo database with exit status 1
returned by the command, complete the following procedure:
-
Connect to your instance of Package Security Manager. If necessary, get help from your IT department with this step.
-
Open your installation directory by running the following command:
-
Open your
docker-compose.yml
file using your preferred file editor. -
Find the
postgres:
section of the file. -
Replace the following portion of the
postgres:
configurations:With this:
Here is an example of what your file should look like when you are finished:
-
Retry the backup command.
Was this page helpful?