0

Bug description

Problem connecting to virtuoso db using PyODBC when installing virtuoso-opensource with apt.txt

Expected behaviour

Successful connection to the virtuoso db using PyODBC

Actual behaviour

Problem occured:

Error: ('S2801', '[S2801] [OpenLink][Virtuoso iODBC Driver]CL033: Connect failed to <host>:<port> = <host>:<port>. (-1) (SQLDriverConnect)

when running:

c = pyodbc.connect('DRIVER=/usr/lib/odbc/virtodbc.so;HOST=<host>:<port>;UID=<uid>;PWD=<pwd>;DATABASE=<db>')

(all are replaced with real values)

How to reproduce

Use the following repo in binder:

repo: https://github.com/eurostat/NLP4Stat

branch: testing

.binder directory (configuration files): https://github.com/eurostat/NLP4Stat/tree/testing/.binder

apt.txt: https://github.com/eurostat/NLP4Stat/blob/testing/.binder/apt.txt

Notes

I think that virtuoso-opensource is not installed correctly in binder underlying system using apt.txt. It seems that is not starting/configured correctly and probably virtuoso.ini configuration is missing.

Please help!

  • 1
    I don't think the installation per se is the problem. It installed and tries to run but doesn't connect, right? Is your database outside of the MyBinder system? See [this](https://github.com/jupyterhub/binderhub/issues/982#issuecomment-544631964). There is an example of using SQL in MyBinder [here](https://github.com/jupyter-xeus/xeus-sql). – Wayne Feb 15 '22 at 16:41
  • Plus, [here](https://github.com/Coleridge-Initiative/ada-intro-sql7). – Wayne Feb 15 '22 at 16:48
  • 1
    Masking all the "real values" you're trying to use, in both commands and error messages, makes it very difficult to diagnose any error. If I understand your post correctly, it appears you should be logging an issue against [the NLP4Stat project](https://github.com/eurostat/NLP4Stat/issues), whose documentation has a great many broken links, among other challenges. (I'm not sure why you think it's the Virtuoso installation that's causing your problem, though apt packages are often outdated… Note that Virtuoso will create a default `virtuoso.ini` upon first launch, so that's not the issue.) – TallTed Feb 16 '22 at 17:13

1 Answers1

0

How are you starting your Virtuoso database which seems to have been installed on a debian/ubuntu Linux system with an old Virtuoso 6.1.6 bundled version from over a decade ago ?

If the Virtuoso database is running which can typically be determined with command service virtuoso-opensource-6.1 status or ps -ef | grep virtuoso , then the pyodbc connection should work if the host:port , uid and pwd are correct.

Although we would recommend use of our latest Virtuoso 7 open source offers on docker or standalone Linux installer.

Should you want to continue pursuing this issue I would suggest reporting as a Virtuoso open source git issue or on the OpenLink community forum.

HughWilliams
  • 126
  • 1