Troubleshooting
Common API Errors
401 Errors
Sample 401 Response:
{\
"message" : "Invalid Token",\
"status" : 401\
}\Most ops and environment services require an authentication token. If a particular request fails with a 401 error, doublecheck the following:
- Insure that you are using a token generated from the environment you are attempting to access (you will need different tokens to access https://ops.minusonedb.com and each of your environments).
- Insure that you are including the m1-auth-token HTTP header in your request. The api reference sections in this documentation show a number of
curlexamples that illustrate how this is done. - By default, tokens can only be used from the IP address from where they were originally generated. If you are using a token generated from a different machine, you will need to create a new token on that machine.
- Tokens will expire after a user configurable time. If your token has expired, you will need to generate a new token.
/token/data can provide some additional diagnostic information that may be helpful in understanding why a token is not working.
Consider using the m1 client to manage the token life cycle for you.
Java Setup
Successful java -version output: you already have a JRE installed
openjdk version "16.0.1" 2021-04-20\
OpenJDK Runtime Environment (build 16.0.1+9-Ubuntu-120.04)\
OpenJDK 64-Bit Server VM (build 16.0.1+9-Ubuntu-120.04, mixed mode, sharing)\Unsuccessful java -version output: you need to install a JRE.
java: command not found\The m1 client requires a Java Runtime Environment (JRE) version 1.8 or higher. You may already have a java runtime installed on your computer. To check, run the following:
java -version
The exact output may vary (some samples are below) but if it looks like you do not have a JRE installed, download and install the latest for your platform from https://adoptium.net/.
Python Setup
To run any MinusOneDB samples that require python, you will need to install python3 and some 3rd party python packages.
Step 1: Install python3
Step 2: Install 3rd party libraries used in MinusOneDB samples.
Ubuntu
sudo apt-get install python3-boto3 python3-pebble
Windows & Mac
pip install boto3 pebble requests
If you are using a python package manager other than pip, refer to its documentation to install the boto3 and pebble packages on your system.
