Common Connector Errors

EACCES | ER_DBACCESS_DENIED_ERROR| ER_ACCESS_DENIED_ERROR | ER_HOST_NOT_PRIVILEGED (Permission denied | Login failed Error)

An attempt was made to get access in a way forbidden by its access permissions. Database prohibits granting access for given credentials.

Probable Reasons

  • Incorrect username or password
  • Case mismatch for username or password
  • The user does not exist
  • You enter a password when no password is required for the specific database.
  • User doesn’t have access to the given Database

Solutions

  • Use correct credentials, as well as use the correct case
  • Check the access privileges for this user

EADDRINUSE (Address already in use)

An attempt to bind a server to a local address failed due to another server on the local system already occupying that address.

Probable Reasons

  • The Port which you want to assign is already in use.

Solutions

  • Assign another port
  • Kill current process that is running on the desired port

ECONNREFUSED (Connection refused)

No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host.

Probable Reasons

  • Firewall can be interfering with the connection
  • Using a wrong port while making a connection

Solutions

  • Make sure your database is publicly accessible.
  • Whitelist DronaHQ IP to allow establishing a connection. You can add rules in your Firewall settings for whitelist DronaHQ IP address -
  • Check connection string, validate host, port, etc.

ECONNRESET (Connection reset by peer)

A connection was forcibly closed by a peer. This normally results from a loss of the connection on the remote socket due to a timeout or reboot.

Probable Reasons

  • Database server is suddenly stopped, the remote machine is rebooted or used a “hard close” on a remote socket.
  • A large number of concurrent requests to database
  • Database is configured to close TCP connection after certain idle time

Solutions

  • Health Check database server for possible abrupt crash or reboot.
  • Configure idle connection time according to use case
  • Keep a check on concurrent request count

ENOENT (No such file or directory)

Commonly raised by fs operations to indicate that a component of the specified pathname does not exist. No entity (file or directory) could be found by the given path.

Probable Reasons

  • Incorrect socket path
  • Incorrect bind-address parameter
  • Use of “localhost” as host string while connecting to the local database

Solutions

  • Validate socket path while establishing a connection
  • Use “127.0.0.1” instead of “localhost” while connecting to the local database
  • Set bind-address to correct address

ENOTFOUND | ER_BAD_HOST_ERROR (DNS lookup failed)

Indicates a DNS failure of either EAI_NODATA or EAI_NONAME. This is not a standard POSIX error.

Probable Reasons

  • Use of “localhost” as host string while connecting to the local database
  • Domain is not correctly resolving to host IP
  • Incorrect port being used

Solutions

  • Use “127.0.0.1” instead of “localhost” while connecting to the local database
  • Validate host’s domain name or use ip instead. Alternatively, Make sure Domain is pointing to the correct host ip address.
  • Make sure correct port is being used while establishing connection
  • In case of concurrent requests, check your max_connections and max_user_connections haven’t been changed from the default settings

EPIPE (Broken pipe)

A write on a pipe, socket, or FIFO for which there is no process to read the data. Commonly encountered at the net and HTTP layers, indicative that the remote side of the stream being written to has been closed.

Probable Reasons

  • Maximum allowed packets being sent exceeds the allowed limit
  • Query length is too large
  • Trying to write to the remote side of the stream that is closed

Solutions

  • Check maximum allowed packets configuration
  • Try reducing query length or segregating queries
  • In case the error is at the HTTP layer, get the exception logs and try resolving it manually depending on the logs.

ETIMEDOUT (Operation timed out)

A connect or send request failed because the connected party did not properly respond after a period of time. Failed to Connect Error.

Probable Reasons

  • In case the database is not publicly accessible
  • Requires whitelisting

Solutions

  • Enable whitelist toggle and add this ip in your DB Server rules
  • If not public - then connect via SSH Tunneling

HANDSHAKE_SSL_ERROR

The server and client were unable to establish a secure connection.

Probable Reasons

  • A cipher suite mismatch.
  • A protocol used by the client that isn’t supported by the server.
  • A certificate that is incomplete, invalid, or expired.

Solutions

  • Check to See If Your SSL Certificate Is Valid
  • Verify That Your Server Is Properly Configured to Support SNI (Server Name Indication configuration)
  • If the above solution doesn’t work, then you can raise a Ticket to DronaHQ Support, DronaHQ may need to Configure its client with the Latest SSL/TLS Protocol Support OR Match the Cipher Suites of your DB Server

ER_HANDSHAKE_ERROR

Bad handshake

Probable Reasons

  • Authentication method mismatch between client and server

Solutions

  • Most of the DronaHQ clients supports latest authentication mechanism. Some may or may not be backward compatible. Try migrating to latest auth if possible.
  • If the above solution doesn’t work, then you can raise a Ticket to DronaHQ Support, DronaHQ may need to Configure its client to support the respective auth version.

ER_CON_COUNT_ERROR

Too many connections

Probable Reasons

  • When the user is trying to connect, the maximum number of active user connections is reached
  • These following reasons cause MySQL to run out connections.
    • Slow Queries
    • Data Storage Techniques
    • Bad MySQL configuration

Solutions

  • For temporary increase use the following:

    • MySQL Example:
      • set global max_connections = 200;
  • For permanently increasing connection count

    • MySQL Example
      • If you want it to be permanent until you re-adjust it the next time, you have to edit the configuration file my.cnf (normally it’s stored in /etc/my.cnf).
      • Under the [mysqld] section add the following line:
        max_connections = 500
      • Then restart the MySQL server to take effect.

ER_OUT_OF_RESOURCES

Out of memory; check if the database server or some other process uses all available memory; if not, you may have to allocate more memory to your database server or you can add more memory space to your DB server

Probable Reasons

  • Memory is exhausted for your database server

Solutions

  • Allocate specific memory to your database thereby preventing other processes from utilizing this memory.

ER_NO_DB_ERROR | ER_BAD_DB_ERROR

No database or Unknown database selected

Probable Reasons

  • Database name is incorrect or not present
  • User does not have sufficient privileges for the specified database

Solutions

  • Check database name is correctly provided
  • Check user privileges

ER_SERVER_SHUTDOWN

Server shutdown in progress

Probable Reasons

  • Server is in state of closing

Solutions

  • Healthcheck your database server, if this is unexpected

ER_HOST_IS_BLOCKED

Host ‘hostname’ is blocked because of many connection errors;

Probable Reasons

  • Database server has received too many connection requests from the given host that were interrupted in the middle:
  • Number of failed requests have exceeded max_connect_errors

Solutions

  • To unblock blocked hosts, flush the host (Your Database Server) cache
    • For MySQL DB - unblock with 'mysqladmin flush-hosts
  • Verify that there is nothing wrong with TCP/IP connections from the blocked hosts
  • Increasing max_connect_errors to a large value makes it less likely that a host reaches the threshold and becomes blocked

CR_SERVER_GONE_ERROR

The Database server has gone away, which means that the Database server timed out and closed the connection.

Probable Reasons

  • Server timed out and closed the connection
  • Someone has killed the running thread with kill thread_id
  • Database server has crashed unexpectedly
  • Query is too large or incorrect

Solutions

  • Validate connection timeout parameter
  • Check database server hasn’t died, also examine the uptime
  • If the problem is that the database crashed detect the reasons for the crash
  • Check maximum allowed packets configuration
  • Try reducing query length or segregating queries