Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error while using some commands. #1

Closed
ayazwani opened this issue Jan 19, 2022 · 1 comment
Closed

Getting error while using some commands. #1

ayazwani opened this issue Jan 19, 2022 · 1 comment

Comments

@ayazwani
Copy link

Presently i'm setting up ohdsi on my local using the docker-compose. While everything works fine until when I use this command psql omop --user user -f ohdsi.sql inside the postgres container, it shows some error

2022-01-19 18:33:11.431 IST [51] STATEMENT:  (SELECT
	   aa1.analysis_name AS attribute_name,
	   ar1.stratum_1     AS attribute_value
	 FROM results.ACHILLES_analysis aa1
	INNER JOIN
	results.achilles_results ar1
	ON aa1.analysis_id = ar1.analysis_id
	                   WHERE aa1.analysis_id = 0
	
	 UNION
	
	SELECT
	  aa1.analysis_name                AS attribute_name,
	  cast(ar1.count_value AS VARCHAR) AS attribute_value
	FROM results.ACHILLES_analysis aa1
	INNER JOIN
	results.achilles_results ar1
	ON aa1.analysis_id = ar1.analysis_id
	WHERE aa1.analysis_id = 1
	)
	ORDER BY attribute_name DESC

Also further when I run the R command during the last steps when I run

library(Achilles)

connectionDetails <- createConnectionDetails(dbms = "postgresql",
                                             server = "<DB container IP>/omop",
                                             user = "user",
                                             password = "password")

achilles(connectionDetails = connectionDetails,
         cdmDatabaseSchema = "cdm",
         resultsDatabaseSchema = "results",
         vocabDatabaseSchema = "cdm",
         sourceName = "OHDSI-CDMV5",
         cdmVersion = "5.2.2",
         numThreads = 1,
         runHeel = FALSE)
         ``` 
     it shows 
     
     ```
     Connecting using PostgreSQL driver
Error in rJava::.jcall(jdbcDriver, "Ljava/sql/Connection;", "connect",  : 
  org.postgresql.util.PSQLException: The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver

Can anyone share tell what's going wrong, I'm using cdm v5.2.2

@martinchapman
Copy link
Member

@ayazwani sorry for the delayed response.

I believe the first issue is (as far as I can tell) caused by the second, in that the JDBC driver used by Broadsea, of which this project is essentially a fork, isn't compatible with the encryption used by recent versions of Postgres.

So you have a couple of options:

  • (Recommended) Open an issue with Broadsea directly and request that the version of Achillies (and its dependencies, including DatabaseConnector) that ships with RStudio within their broadsea-methodslibrary Docker image be updated.
  • Pin the version of Postgres used by this project to something lower than Postgres 13 (which saw the introduction of the new encryption mechanism), e.g. FROM library/postgres:12.

Remember also to add the IP of the database container to the fourth line of the R script above. This can be found using Docker's network command.

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants