-
Notifications
You must be signed in to change notification settings - Fork 63
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
webapi.source JDBC string results in connection refused in develop branch but not in main branch #93
Comments
With security enabled, those "source" endpoints aren't supposed to be available just straightaway. They're supposed to only be available with a session token from your ldap. The way to verify sources are working would be through the Atlas Config GUI, or by using an API call with a session token, such as the method provided in ROhdsiWebApi. |
What I mean is, going via web browser to the /source API endpoints is not valid because the browser doesn't have the session token on its own. That's expected because with security enabled, we should not allow any users to refresh the sources as that is an admin task. To use those endpoints, you'd need to use Atlas and log in (and be an admin), or use a tool like Postman or some other programmatic method (e.g. R, Python, etc) to log in (get a session token) and then invoke the API endpoints. TL;DR: going to the /source endpoints with your browser after enabling security is not supposed to work.
Can you walk me through where the 3 non-Eunomia CDMs are hosted? |
Ah ok, sorry I misunderstood what you meant. Yeah that makes sense.
They are all hosted in different schemas of a postgres database on a server (the database is not in a container). The Broadsea containers are on that same server. The difference between the three is that I tried different JDBC strings in
|
Is your Broadsea Host env variable set to 127.0.0.1? Perhaps that is the reason for the issue with the cancer one being on localhost. For the diabetes one hosted on another server, I think it might be good to verify that there's no firewall / AWS sec group rules blocking it. |
No the Broadsea Host is set to the |
So it sounds like IBD is fine, just need achilles tables. That cache warming line, was there an actual error stated? I just see the job description. For Cancer, I think resolving "localhost" seems to be an issue for the ohdsi-webapi container, it must be trying to use localhost within the container. If 127.0.0.1 is not set as your BROADSEA_HOST, maybe try using that for the host name? For Diabetes, I'm not clear on the error here. If you use the develop branch (and update to the latest version of it), you can set the WebAPI log levels to get more details (again, only with latest commits from develop branch): https://github.com/OHDSI/Broadsea/blob/develop/.env#L33-L35 |
Hi @RomainTching - any luck? |
Hi @alondhe, sorry I got caught up in testing and setting other things up. But yes, a little over a week ago I finally managed to establish the connection. The issue was that for the host I needed to use the IPv4 address from the "docker bridge" entry of the network. For people like me who struggle over these network configurations notions:
Now things seem to work fine, thanks a lot for all your help and patience! |
Actually I stand corrected, I managed to query the database with that JDBC string from the HADES/RStudio container, but with that same string used in |
Hi!
In order to try out the openldap implementation for user management, I switched to the develop branch and managed to implement it (again, thanks for the help!).
But now I noticed that a few inconsistent behaviours from
https://<hostname>/WebAPI/source/sources
andhttps://<hostname>/WebAPI/source/refresh
, depending on the Broadsea set up:main
branch (andHTTPS
protocol) I get the list of sources as expected, including the default EUNOMIA and the source I added manually towebapi.source
andwebapi.source_daimon
develop
branch BUT not configuring the OpenLDAP server security option, I get an empty page, and checkingdocker logs ohdsi-webapi
shows an error "Connection to localhost:5432 refused...". I assume I can't use localhost and need to use the actual host IP and maybe even change some postgres configuration, as suggested here (not tested yet). But removing my source data (only leaving Eunomia entries) and restarting the docker allows to at least show the Eunomia entries inhttps://<hostname>/WebAPI/source/refresh
andhttps://<hostname>/WebAPI/source/sources
So on one hand I wanted to point out this difference between the
main
anddevelop
branches (no error message inmain
) to make sure you were aware of it and it is an expected behaviour.On the other, I was hoping to clarify why not even Eunomia shows up when the OpenLDAP is configured and how to fix that, since then I can't see the sources in ATLAS even when I do figure out exactly what to put as hostname in the JDBC...
The text was updated successfully, but these errors were encountered: