{"record":{"id":"262e04ac9bb22a13","repo":"NationalSecurityAgency/ghidra","slug":"unknown-error-connection-to","errorCode":null,"errorMessage":"Unknown error connection to: {}","messagePattern":"Unknown error connection to: (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java","lineNumber":126,"sourceCode":"\t\tif (querydb != null) {\n\t\t\treturn querydb.getInfo();\n\t\t}\n\n\t\tcheckBSimServerOperation();\n\n\t\tquerydb = BSimClientFactory.buildClient(bsimServerInfo, async);\n\n\t\tif (!querydb.initialize()) {\n\t\t\tthrow new IOException(querydb.getLastError().message);\n\t\t}\n\n\t\tDatabaseInformation info = querydb.getInfo();\n\t\tif (info == null) {\n\t\t\tBSimError lastError = querydb.getLastError();\n\t\t\tif (lastError != null && lastError.category == ErrorCategory.Nodatabase) {\n\t\t\t\tthrow new IOException(lastError.message);\n\t\t\t}\n\t\t\tthrow new IOException(\"Unknown error connection to: \" + bsimServerInfo.toString());\n\t\t}\n\n\t\tMsg.debug(this, \"Connected to \" + info.databasename);\n\t\treturn info;\n\t}\n\n\t/**\n\t * This will be automatically invoked when BulkSignatures is out of scope, if using\n\t * try-with-resources to create it. When this happens we need to clean up the \n\t * connection.\n\t */\n\t@Override\n\tpublic void close() {\n\t\tcloseConnection();\n\t}\n\n\t/**\n\t * Closes the current database connection.","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java#L108-L144","documentation":"Thrown in establishQueryServerConnection as the final fallback when getInfo() returns null but there is no usable error (no lastError, or its category is not Nodatabase). It signals the connection reached a state where the client cannot report a specific cause, so BulkSignatures reports the target server info verbatim. This is a catch-all for unexpected/unexplained connection failures.","triggerScenarios":"Server accepted the connection but returned no DatabaseInformation and no categorizable error; a malformed or empty response; partial protocol deserialization failure where getInfo() is null without a set BSimError.","commonSituations":"Server-side bug returning an empty response; version skew where the server omits expected fields; network interruption mid-handshake; backend (H2/PostgreSQL/Elastic) in an inconsistent state.","solutions":["Check server-side logs for the real reason the info response was empty.","Confirm client and server versions match and the protocol is supported.","Restart the BSim server and retry.","If reproducible, gather a protocol trace and report it as a server-side issue."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    bsim.prewarm();\n} catch (IOException e) {\n    if (e.getMessage().startsWith(\"Unknown error connection to:\")) {\n        // no specific cause; gather server logs and report\n    } else { throw e; }\n}","preventionTips":["Keep client and server versions in sync to avoid empty/malformed info responses.","Monitor server health; restart if the backend enters an inconsistent state.","Capture server-side logs when this catch-all fires to find the real cause."],"tags":["bsim","network","connection","unknown-error","ioexception"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}