storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/cmd/config/errors.go (about) 1 /* 2 * MinIO Cloud Storage, (C) 2018-2019 MinIO, Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package config 18 19 // UI errors 20 var ( 21 ErrInvalidBrowserValue = newErrFn( 22 "Invalid browser value", 23 "Please check the passed value", 24 "Browser can only accept `on` and `off` values. To disable web browser access, set this value to `off`", 25 ) 26 27 ErrInvalidFSOSyncValue = newErrFn( 28 "Invalid O_SYNC value", 29 "Please check the passed value", 30 "Can only accept `on` and `off` values. To enable O_SYNC for fs backend, set this value to `on`", 31 ) 32 33 ErrOverlappingDomainValue = newErrFn( 34 "Overlapping domain values", 35 "Please check the passed value", 36 "MINIO_DOMAIN only accepts non-overlapping domain values", 37 ) 38 39 ErrInvalidDomainValue = newErrFn( 40 "Invalid domain value", 41 "Please check the passed value", 42 "Domain can only accept DNS compatible values", 43 ) 44 45 ErrInvalidErasureSetSize = newErrFn( 46 "Invalid erasure set size", 47 "Please check the passed value", 48 "Erasure set can only accept any of [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] values", 49 ) 50 51 ErrInvalidWormValue = newErrFn( 52 "Invalid WORM value", 53 "Please check the passed value", 54 "WORM can only accept `on` and `off` values. To enable WORM, set this value to `on`", 55 ) 56 57 ErrInvalidCacheDrivesValue = newErrFn( 58 "Invalid cache drive value", 59 "Please check the value in this ENV variable", 60 "MINIO_CACHE_DRIVES: Mounted drives or directories are delimited by `,`", 61 ) 62 63 ErrInvalidCacheExcludesValue = newErrFn( 64 "Invalid cache excludes value", 65 "Please check the passed value", 66 "MINIO_CACHE_EXCLUDE: Cache exclusion patterns are delimited by `,`", 67 ) 68 69 ErrInvalidCacheExpiryValue = newErrFn( 70 "Invalid cache expiry value", 71 "Please check the passed value", 72 "MINIO_CACHE_EXPIRY: Valid cache expiry duration must be in days", 73 ) 74 75 ErrInvalidCacheQuota = newErrFn( 76 "Invalid cache quota value", 77 "Please check the passed value", 78 "MINIO_CACHE_QUOTA: Valid cache quota value must be between 0-100", 79 ) 80 81 ErrInvalidCacheAfter = newErrFn( 82 "Invalid cache after value", 83 "Please check the passed value", 84 "MINIO_CACHE_AFTER: Valid cache after value must be 0 or greater", 85 ) 86 87 ErrInvalidCacheWatermarkLow = newErrFn( 88 "Invalid cache low watermark value", 89 "Please check the passed value", 90 "MINIO_CACHE_WATERMARK_LOW: Valid cache low watermark value must be between 0-100", 91 ) 92 93 ErrInvalidCacheWatermarkHigh = newErrFn( 94 "Invalid cache high watermark value", 95 "Please check the passed value", 96 "MINIO_CACHE_WATERMARK_HIGH: Valid cache high watermark value must be between 0-100", 97 ) 98 99 ErrInvalidCacheEncryptionKey = newErrFn( 100 "Invalid cache encryption master key value", 101 "Please check the passed value", 102 "MINIO_CACHE_ENCRYPTION_MASTER_KEY: For more information, please refer to https://docs.min.io/docs/minio-disk-cache-guide", 103 ) 104 105 ErrInvalidCacheRange = newErrFn( 106 "Invalid cache range value", 107 "Please check the passed value", 108 "MINIO_CACHE_RANGE: Valid expected value is `on` or `off`", 109 ) 110 111 ErrInvalidCacheCommitValue = newErrFn( 112 "Invalid cache commit value", 113 "Please check the passed value", 114 "MINIO_CACHE_COMMIT: Valid expected value is `writeback` or `writethrough`", 115 ) 116 117 ErrInvalidCacheSetting = newErrFn( 118 "Incompatible cache setting", 119 "Please check the passed value", 120 "MINIO_CACHE_AFTER cannot be used with MINIO_CACHE_COMMIT setting", 121 ) 122 ErrInvalidRotatingCredentialsBackendEncrypted = newErrFn( 123 "Invalid rotating credentials", 124 "Please set correct rotating credentials in the environment for decryption", 125 `Detected encrypted config backend, correct old access and secret keys should be specified via environment variables MINIO_ROOT_USER_OLD and MINIO_ROOT_PASSWORD_OLD to be able to re-encrypt the MinIO config, user IAM and policies with new credentials`, 126 ) 127 128 ErrInvalidCredentialsBackendEncrypted = newErrFn( 129 "Invalid credentials", 130 "Please set correct credentials in the environment for decryption", 131 `Detected encrypted config backend, correct access and secret keys should be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD to be able to decrypt the MinIO config, user IAM and policies`, 132 ) 133 134 ErrMissingCredentialsBackendEncrypted = newErrFn( 135 "Credentials missing", 136 "Please set your credentials in the environment", 137 `Detected encrypted config backend, access and secret keys should be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD to be able to decrypt the MinIO config, user IAM and policies`, 138 ) 139 140 ErrInvalidCredentials = newErrFn( 141 "Invalid credentials", 142 "Please provide correct credentials", 143 `Access key length should be at least 3, and secret key length at least 8 characters`, 144 ) 145 146 ErrEnvCredentialsMissingGateway = newErrFn( 147 "Credentials missing", 148 "Please set your credentials in the environment", 149 `In Gateway mode, access and secret keys should be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD respectively`, 150 ) 151 152 ErrEnvCredentialsMissingDistributed = newErrFn( 153 "Credentials missing", 154 "Please set your credentials in the environment", 155 `In distributed server mode, access and secret keys should be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD respectively`, 156 ) 157 158 ErrInvalidErasureEndpoints = newErrFn( 159 "Invalid endpoint(s) in erasure mode", 160 "Please provide correct combination of local/remote paths", 161 "For more information, please refer to https://docs.min.io/docs/minio-erasure-code-quickstart-guide", 162 ) 163 164 ErrInvalidNumberOfErasureEndpoints = newErrFn( 165 "Invalid total number of endpoints for erasure mode", 166 "Please provide an even number of endpoints greater or equal to 4", 167 "For more information, please refer to https://docs.min.io/docs/minio-erasure-code-quickstart-guide", 168 ) 169 170 ErrStorageClassValue = newErrFn( 171 "Invalid storage class value", 172 "Please check the value", 173 `MINIO_STORAGE_CLASS_STANDARD: Format "EC:<Default_Parity_Standard_Class>" (e.g. "EC:3"). This sets the number of parity disks for MinIO server in Standard mode. Objects are stored in Standard mode, if storage class is not defined in Put request 174 MINIO_STORAGE_CLASS_RRS: Format "EC:<Default_Parity_Reduced_Redundancy_Class>" (e.g. "EC:3"). This sets the number of parity disks for MinIO server in Reduced Redundancy mode. Objects are stored in Reduced Redundancy mode, if Put request specifies RRS storage class 175 Refer to the link https://github.com/minio/minio/tree/master/docs/erasure/storage-class for more information`, 176 ) 177 178 ErrUnexpectedBackendVersion = newErrFn( 179 "Backend version seems to be too recent", 180 "Please update to the latest MinIO version", 181 "", 182 ) 183 184 ErrInvalidAddressFlag = newErrFn( 185 "--address input is invalid", 186 "Please check --address parameter", 187 `--address binds to a specific ADDRESS:PORT, ADDRESS can be an IPv4/IPv6 address or hostname (default port is ':9000') 188 Examples: --address ':443' 189 --address '172.16.34.31:9000' 190 --address '[fe80::da00:a6c8:e3ae:ddd7]:9000'`, 191 ) 192 193 ErrInvalidFSEndpoint = newErrFn( 194 "Invalid endpoint for standalone FS mode", 195 "Please check the FS endpoint", 196 `FS mode requires only one writable disk path 197 Example 1: 198 $ minio server /data/minio/`, 199 ) 200 201 ErrUnsupportedBackend = newErrFn( 202 "Unable to write to the backend", 203 "Please ensure your disk supports O_DIRECT", 204 "", 205 ) 206 207 ErrUnableToWriteInBackend = newErrFn( 208 "Unable to write to the backend", 209 "Please ensure MinIO binary has write permissions for the backend", 210 `Verify if MinIO binary is running as the same user who has write permissions for the backend`, 211 ) 212 213 ErrPortAlreadyInUse = newErrFn( 214 "Port is already in use", 215 "Please ensure no other program uses the same address/port", 216 "", 217 ) 218 219 ErrPortAccess = newErrFn( 220 "Unable to use specified port", 221 "Please ensure MinIO binary has 'cap_net_bind_service=+ep' permissions", 222 `Use 'sudo setcap cap_net_bind_service=+ep /path/to/minio' to provide sufficient permissions`, 223 ) 224 225 ErrSSLUnexpectedError = newErrFn( 226 "Invalid TLS certificate", 227 "Please check the content of your certificate data", 228 `Only PEM (x.509) format is accepted as valid public & private certificates`, 229 ) 230 231 ErrSSLUnexpectedData = newErrFn( 232 "Invalid TLS certificate", 233 "Please check your certificate", 234 "", 235 ) 236 237 ErrSSLNoPassword = newErrFn( 238 "Missing TLS password", 239 "Please set the password to environment variable `MINIO_CERT_PASSWD` so that the private key can be decrypted", 240 "", 241 ) 242 243 ErrNoCertsAndHTTPSEndpoints = newErrFn( 244 "HTTPS specified in endpoints, but no TLS certificate is found on the local machine", 245 "Please add TLS certificate or use HTTP endpoints only", 246 "Refer to https://docs.min.io/docs/how-to-secure-access-to-minio-server-with-tls for information about how to load a TLS certificate in your server", 247 ) 248 249 ErrCertsAndHTTPEndpoints = newErrFn( 250 "HTTP specified in endpoints, but the server in the local machine is configured with a TLS certificate", 251 "Please remove the certificate in the configuration directory or switch to HTTPS", 252 "", 253 ) 254 255 ErrSSLWrongPassword = newErrFn( 256 "Unable to decrypt the private key using the provided password", 257 "Please set the correct password in environment variable `MINIO_CERT_PASSWD`", 258 "", 259 ) 260 261 ErrUnexpectedError = newErrFn( 262 "Unexpected error", 263 "Please contact MinIO at https://slack.min.io", 264 "", 265 ) 266 267 ErrInvalidCompressionIncludesValue = newErrFn( 268 "Invalid compression include value", 269 "Please check the passed value", 270 "Compress extensions/mime-types are delimited by `,`. For eg, MINIO_COMPRESS_MIME_TYPES=\"A,B,C\"", 271 ) 272 273 ErrInvalidGWSSEValue = newErrFn( 274 "Invalid gateway SSE value", 275 "Please check the passed value", 276 "MINIO_GATEWAY_SSE: Gateway SSE accepts only C and S3 as valid values. Delimit by `;` to set more than one value", 277 ) 278 279 ErrInvalidGWSSEEnvValue = newErrFn( 280 "Invalid gateway SSE configuration", 281 "", 282 "Refer to https://docs.min.io/docs/minio-kms-quickstart-guide.html for setting up SSE", 283 ) 284 285 ErrInvalidReplicationWorkersValue = newErrFn( 286 "Invalid value for replication workers", 287 "", 288 "MINIO_API_REPLICATION_WORKERS: should be > 0", 289 ) 290 )