Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
5d9f770a
Commit
5d9f770a
authored
1 year ago
by
eugene.livis
Browse files
Options
Downloads
Patches
Plain Diff
Improved error handling
parent
08a3670c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java
+6
-2
6 additions, 2 deletions
bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java
with
6 additions
and
2 deletions
bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java
+
6
−
2
View file @
5d9f770a
...
@@ -112,7 +112,10 @@ public class SleuthkitCase {
...
@@ -112,7 +112,10 @@ public class SleuthkitCase {
private static final ResourceBundle bundle = ResourceBundle.getBundle("org.sleuthkit.datamodel.Bundle");
private static final ResourceBundle bundle = ResourceBundle.getBundle("org.sleuthkit.datamodel.Bundle");
private static final int IS_REACHABLE_TIMEOUT_MS = 1000;
private static final int IS_REACHABLE_TIMEOUT_MS = 1000;
private static final String SQL_ERROR_CONNECTION_GROUP = "08";
private static final String SQL_ERROR_CONNECTION_GROUP = "08";
private static final String SQL_CONNECTION_REJECTED = "08006";
// either one of these mean connection was rejected by Postgres server
private static final String SQL_CONNECTION_REJECTED_1 = "08004";
private static final String SQL_CONNECTION_REJECTED_2 = "08006";
private static final String SQL_ERROR_AUTHENTICATION_GROUP = "28";
private static final String SQL_ERROR_AUTHENTICATION_GROUP = "28";
private static final String SQL_ERROR_PRIVILEGE_GROUP = "42";
private static final String SQL_ERROR_PRIVILEGE_GROUP = "42";
private static final String SQL_ERROR_RESOURCE_GROUP = "53";
private static final String SQL_ERROR_RESOURCE_GROUP = "53";
...
@@ -305,7 +308,8 @@ public static void tryConnect(CaseDbConnectionInfo info) throws TskCoreException
...
@@ -305,7 +308,8 @@ public static void tryConnect(CaseDbConnectionInfo info) throws TskCoreException
String sqlState = ex.getSQLState().toLowerCase();
String sqlState = ex.getSQLState().toLowerCase();
if (sqlState.startsWith(SQL_ERROR_CONNECTION_GROUP)) {
if (sqlState.startsWith(SQL_ERROR_CONNECTION_GROUP)) {
if (SQL_CONNECTION_REJECTED.equals(ex.getSQLState())) {
if (SQL_CONNECTION_REJECTED_1.equals(ex.getSQLState()) ||
SQL_CONNECTION_REJECTED_2.equals(ex.getSQLState())) {
if (info.isSslEnabled()) {
if (info.isSslEnabled()) {
result = "Server rejected the SSL connection attempt. Check SSL configuration.";
result = "Server rejected the SSL connection attempt. Check SSL configuration.";
} else {
} else {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment