Cannot connect to Redshift using IAM/AWS profile via GUI with 'Exec failed, error: 2 (No such file or directory) '

Problem

A connection to Amazon Redshift fails in DataGrip when using AWS Profile authentication with the following error:

[99999] Something unusual has occurred to cause the driver to fail. Please report this exception: Failed to refresh process-based credentials.

Launching DataGrip directly via the Terminal resolves the issue, but attempting a normal launch through the application GUI fails to establish the connection.

In the idea.log file (accessible via Help | Show Log in ...), the following error is present:

2026-04-08 09:36:12,099 [  17809]   WARN - #c.i.d.d.BaseDatabaseErrorHandler$IOErrorInfo - Exec failed, error: 2 (No such file or directory) 
java.io.IOException: Exec failed, error: 2 (No such file or directory) 
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:300)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:231)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1078)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1046)
at software.amazon.awssdk.auth.credentials.ProcessCredentialsProvider.executeCommand(ProcessCredentialsProvider.java:243)
at software.amazon.awssdk.auth.credentials.ProcessCredentialsProvider.refreshCredentials(ProcessCredentialsProvider.java:150)
at software.amazon.awssdk.utils.cache.CachedSupplier.lambda$jitteredPrefetchValueSupplier$8(CachedSupplier.java:300)
at software.amazon.awssdk.utils.cache.CachedSupplier$PrefetchStrategy.fetch(CachedSupplier.java:448)
at software.amazon.awssdk.utils.cache.CachedSupplier.refreshCache(CachedSupplier.java:208)
at software.amazon.awssdk.utils.cache.CachedSupplier.get(CachedSupplier.java:135)
at software.amazon.awssdk.auth.credentials.ProcessCredentialsProvider.resolveCredentials(ProcessCredentialsProvider.java:145)
at com.amazon.redshift.core.PluginProfilesCredentialsProvider.getCredentials(PluginProfilesCredentialsProvider.java:160)
at com.amazon.redshift.core.PluginProfilesCredentialsProvider.resolveCredentials(PluginProfilesCredentialsProvider.java:52)
at com.amazon.redshift.core.IamHelper.setIAMCredentials(IamHelper.java:498)
at com.amazon.redshift.core.IamHelper.setIAMProperties(IamHelper.java:360)
at com.amazon.redshift.jdbc.RedshiftConnectionImpl.<init>(RedshiftConnectionImpl.java:280)
at com.amazon.redshift.Driver.makeConnection(Driver.java:500)
at com.amazon.redshift.Driver.connect(Driver.java:314)

Possible resolution

The issue may be caused by an incorrect configuration of the PATH variable in the shell environment. DataGrip inherits an incomplete PATH environment during startup, which is missing required directories that contain the executable necessary for AWS credentials (credential_process).

In one of the reported cases, the line in the user's shell configuration file (~/.zshrc) set the PATH variable incorrectly, for example:

export PATH=/usr/bin:$HOME/.toolbox/bin:/opt/homebrew/bin:PATH

To resolve the issue, modifying the PATH value as shown below helped:

export PATH=/usr/bin:$HOME/.toolbox/bin:/opt/homebrew/bin:$PATH

Following this correction, DataGrip successfully inherited the correct shell environment variables, resolving the Redshift connectivity issue.

0 out of 0 found this helpful

Please sign in to leave a comment.

Have more questions?

Submit a request