github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/internal/config/errors.go (about) 1 // Copyright (c) 2015-2021 MinIO, Inc. 2 // 3 // This file is part of MinIO Object Storage stack 4 // 5 // This program is free software: you can redistribute it and/or modify 6 // it under the terms of the GNU Affero General Public License as published by 7 // the Free Software Foundation, either version 3 of the License, or 8 // (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU Affero General Public License for more details. 14 // 15 // You should have received a copy of the GNU Affero General Public License 16 // along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 package config 19 20 // UI errors 21 var ( 22 ErrInvalidXLValue = newErrFn( 23 "Invalid drive path", 24 "Please provide a fresh drive for single drive MinIO setup", 25 "MinIO only supports fresh drive paths", 26 ) 27 28 ErrInvalidBrowserValue = newErrFn( 29 "Invalid console value", 30 "Please check the passed value", 31 "Environment can only accept `on` and `off` values. To disable Console access, set this value to `off`", 32 ) 33 34 ErrInvalidFSOSyncValue = newErrFn( 35 "Invalid O_SYNC value", 36 "Please check the passed value", 37 "Can only accept `on` and `off` values. To enable O_SYNC for fs backend, set this value to `on`", 38 ) 39 40 ErrOverlappingDomainValue = newErrFn( 41 "Overlapping domain values", 42 "Please check the passed value", 43 "MINIO_DOMAIN only accepts non-overlapping domain values", 44 ) 45 46 ErrInvalidDomainValue = newErrFn( 47 "Invalid domain value", 48 "Please check the passed value", 49 "Domain can only accept DNS compatible values", 50 ) 51 52 ErrInvalidErasureSetSize = newErrFn( 53 "Invalid erasure set size", 54 "Please check the passed value", 55 "Erasure set can only accept any of [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] values", 56 ) 57 58 ErrInvalidWormValue = newErrFn( 59 "Invalid WORM value", 60 "Please check the passed value", 61 "WORM can only accept `on` and `off` values. To enable WORM, set this value to `on`", 62 ) 63 64 ErrInvalidConfigDecryptionKey = newErrFn( 65 "Incorrect encryption key to decrypt internal data", 66 "Please set the correct default KMS key value or the correct root credentials for older MinIO versions.", 67 `Revert MINIO_KMS_KES_KEY_NAME or MINIO_ROOT_USER/MINIO_ROOT_PASSWORD (for older MinIO versions) to be able to decrypt the internal data again.`, 68 ) 69 70 ErrInvalidCredentials = newErrFn( 71 "Invalid credentials", 72 "Please provide correct credentials", 73 `Access key length should be at least 3, and secret key length at least 8 characters`, 74 ) 75 76 ErrMissingEnvCredentialRootUser = newErrFn( 77 "Missing credential environment variable, \""+EnvRootUser+"\"", 78 "Environment variable \""+EnvRootUser+"\" is missing", 79 `Root user name (access key) and root password (secret key) are expected to be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD respectively`, 80 ) 81 82 ErrMissingEnvCredentialRootPassword = newErrFn( 83 "Missing credential environment variable, \""+EnvRootPassword+"\"", 84 "Environment variable \""+EnvRootPassword+"\" is missing", 85 `Root user name (access key) and root password (secret key) are expected to be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD respectively`, 86 ) 87 88 ErrMissingEnvCredentialAccessKey = newErrFn( 89 "Missing credential environment variable, \""+EnvAccessKey+"\"", 90 "Environment variables \""+EnvAccessKey+"\" and \""+EnvSecretKey+"\" are deprecated", 91 `Root user name (access key) and root password (secret key) are expected to be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD respectively`, 92 ) 93 94 ErrMissingEnvCredentialSecretKey = newErrFn( 95 "Missing credential environment variable, \""+EnvSecretKey+"\"", 96 "Environment variables \""+EnvSecretKey+"\" and \""+EnvAccessKey+"\" are deprecated", 97 `Root user name (access key) and root password (secret key) are expected to be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD respectively`, 98 ) 99 100 ErrInvalidErasureEndpoints = newErrFn( 101 "Invalid endpoint(s) in erasure mode", 102 "Please provide correct combination of local/remote paths", 103 "For more information, please refer to https://min.io/docs/minio/linux/operations/concepts/erasure-coding.html", 104 ) 105 106 ErrInvalidNumberOfErasureEndpoints = newErrFn( 107 "Invalid total number of endpoints for erasure mode", 108 "Please provide number of endpoints greater or equal to 2", 109 "For more information, please refer to https://min.io/docs/minio/linux/operations/concepts/erasure-coding.html", 110 ) 111 112 ErrStorageClassValue = newErrFn( 113 "Invalid storage class value", 114 "Please check the value", 115 `MINIO_STORAGE_CLASS_STANDARD: Format "EC:<Default_Parity_Standard_Class>" (e.g. "EC:3"). This sets the number of parity drives for MinIO server in Standard mode. Objects are stored in Standard mode, if storage class is not defined in Put request 116 MINIO_STORAGE_CLASS_RRS: Format "EC:<Default_Parity_Reduced_Redundancy_Class>" (e.g. "EC:3"). This sets the number of parity drives for MinIO server in Reduced Redundancy mode. Objects are stored in Reduced Redundancy mode, if Put request specifies RRS storage class 117 Refer to the link https://github.com/minio/minio/tree/master/docs/erasure/storage-class for more information`, 118 ) 119 120 ErrUnexpectedBackendVersion = newErrFn( 121 "Backend version seems to be too recent", 122 "Please update to the latest MinIO version", 123 "", 124 ) 125 126 ErrInvalidAddressFlag = newErrFn( 127 "--address input is invalid", 128 "Please check --address parameter", 129 `--address binds to a specific ADDRESS:PORT, ADDRESS can be an IPv4/IPv6 address or hostname (default port is ':9000') 130 Examples: --address ':443' 131 --address '172.16.34.31:9000' 132 --address '[fe80::da00:a6c8:e3ae:ddd7]:9000'`, 133 ) 134 135 ErrInvalidEndpoint = newErrFn( 136 "Invalid endpoint for single drive mode", 137 "Please check the endpoint", 138 `Single-Node modes requires absolute path without hostnames: 139 Examples: 140 $ minio server /data/minio/ #Single Node Single Drive 141 $ minio server /data-{1...4}/minio # Single Node Multi Drive`, 142 ) 143 144 ErrUnsupportedBackend = newErrFn( 145 "Unable to write to the backend", 146 "Please ensure your drive supports O_DIRECT", 147 "", 148 ) 149 150 ErrUnableToWriteInBackend = newErrFn( 151 "Unable to write to the backend", 152 "Please ensure MinIO binary has write permissions for the backend", 153 `Verify if MinIO binary is running as the same user who has write permissions for the backend`, 154 ) 155 156 ErrPortAlreadyInUse = newErrFn( 157 "Port is already in use", 158 "Please ensure no other program uses the same address/port", 159 "", 160 ) 161 162 ErrPortAccess = newErrFn( 163 "Unable to use specified port", 164 "Please ensure MinIO binary has 'cap_net_bind_service=+ep' permissions", 165 `Use 'sudo setcap cap_net_bind_service=+ep /path/to/minio' to provide sufficient permissions`, 166 ) 167 168 ErrTLSReadError = newErrFn( 169 "Cannot read the TLS certificate", 170 "Please check if the certificate has the proper owner and read permissions", 171 "", 172 ) 173 174 ErrTLSUnexpectedData = newErrFn( 175 "Invalid TLS certificate", 176 "Please check your certificate", 177 "", 178 ) 179 180 ErrTLSNoPassword = newErrFn( 181 "Missing TLS password", 182 "Please set the password to environment variable `MINIO_CERT_PASSWD` so that the private key can be decrypted", 183 "", 184 ) 185 186 ErrNoCertsAndHTTPSEndpoints = newErrFn( 187 "HTTPS specified in endpoints, but no TLS certificate is found on the local machine", 188 "Please add TLS certificate or use HTTP endpoints only", 189 "Refer to https://min.io/docs/minio/linux/operations/network-encryption.html for information about how to load a TLS certificate in your server", 190 ) 191 192 ErrCertsAndHTTPEndpoints = newErrFn( 193 "HTTP specified in endpoints, but the server in the local machine is configured with a TLS certificate", 194 "Please remove the certificate in the configuration directory or switch to HTTPS", 195 "", 196 ) 197 198 ErrTLSWrongPassword = newErrFn( 199 "Unable to decrypt the private key using the provided password", 200 "Please set the correct password in environment variable `MINIO_CERT_PASSWD`", 201 "", 202 ) 203 204 ErrUnexpectedError = newErrFn( 205 "Unexpected error", 206 "Please contact MinIO at https://slack.min.io", 207 "", 208 ) 209 210 ErrInvalidCompressionIncludesValue = newErrFn( 211 "Invalid compression include value", 212 "Please check the passed value", 213 "Compress extensions/mime-types are delimited by `,`. For eg, MINIO_COMPRESS_MIME_TYPES=\"A,B,C\"", 214 ) 215 216 ErrInvalidReplicationWorkersValue = newErrFn( 217 "Invalid value for replication workers", 218 "", 219 "MINIO_API_REPLICATION_WORKERS: should be > 0", 220 ) 221 222 ErrInvalidTransitionWorkersValue = newErrFn( 223 "Invalid value for transition workers", 224 "", 225 "MINIO_API_TRANSITION_WORKERS: should be >= GOMAXPROCS/2", 226 ) 227 ErrInvalidBatchKeyRotationWorkersWait = newErrFn( 228 "Invalid value for batch key rotation workers wait", 229 "Please input a non-negative duration", 230 "keyrotation_workers_wait should be > 0ms", 231 ) 232 ErrInvalidBatchReplicationWorkersWait = newErrFn( 233 "Invalid value for batch replication workers wait", 234 "Please input a non-negative duration", 235 "replication_workers_wait should be > 0ms", 236 ) 237 ErrInvalidBatchExpirationWorkersWait = newErrFn( 238 "Invalid value for batch expiration workers wait", 239 "Please input a non-negative duration", 240 "expiration_workers_wait should be > 0ms", 241 ) 242 )