Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-110

Error Connecting and Communicating with SkySQL

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 1.0.1
    • 1.0.2
    • DBAPI 2.0
    • None

    Description

      I was previously able to connect to SkySQL using the Python Connector (v. 0.9.59), but am unable to do so with the same configuration with versions 1.0.0+.

      The sample application I am using to test is here. (A react.js front-end with a variety of api project options)

      The Python API project lives here.

      The connection configuration I am using:

      config = {
          'host': os.getenv("DB_HOST"),
          'port': int(os.getenv("DB_PORT")),
          'user': os.getenv("DB_USER"),
          'password': os.getenv("DB_PASS"),
          'database': os.getenv("DB_NAME"),
          'ssl': 'True'
      }
      

      DB_HOST=htap-1.mdb0001390.db.skysql.net
      DB_PORT=5002
      DB_USER=DB00002718
      DB_PASS=y4]0Xhzz8k5N5|tX1O5c207
      DB_NAME=todo
      

      I have also attached:

      • a sample (sample.zip) with my exact settings. I have a running SkySQL instance that can be used to test.
      • a log file containing the error I am experiencing when attempting to connect to SkySQL

      Attachments

        1. log.rtf
          57 kB
        2. sample.zip
          8 kB

        Activity

          georg Georg Richter added a comment -

          I don't have any problems to connect to connectors SkySQL test instance.
          Can you please provide an error message/exception from mariadb.connect() method?

          georg Georg Richter added a comment - I don't have any problems to connect to connectors SkySQL test instance. Can you please provide an error message/exception from mariadb.connect() method?
          rhedgpeth Rob Hedgpeth (Inactive) added a comment - - edited

          Just out of curiosity - Is Connector/Python tested with production instances of SkySQL? Customers will not be using test instances.

          I'm not receiving an error message/exception. The crash I'm encountering appears to happen after the connection object (`conn`) is created. So using print(conn), conn.cur(), etc. The crash I'm receiving is in log.rtf (attached).

          I've tried wrapping the `conn` usage with basic exception handling to see if I can print sys.exec_info, but no go. Is there something else I can do to inspect, step-through, etc. to dive deeper into what is happening with `conn`? (Sorry, still newer to Python debugging processes)

          rhedgpeth Rob Hedgpeth (Inactive) added a comment - - edited Just out of curiosity - Is Connector/Python tested with production instances of SkySQL? Customers will not be using test instances. I'm not receiving an error message/exception. The crash I'm encountering appears to happen after the connection object (`conn`) is created. So using print(conn), conn.cur(), etc. The crash I'm receiving is in log.rtf (attached). I've tried wrapping the `conn` usage with basic exception handling to see if I can print sys.exec_info, but no go. Is there something else I can do to inspect, step-through, etc. to dive deeper into what is happening with `conn`? (Sorry, still newer to Python debugging processes)
          georg Georg Richter added a comment -

          Ok, I'm able to repeat the problem on Mac (without SkySQL)

          Python 3.7.4 (default, Aug 13 2019, 15:17:50) 
          [Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
          Type "help", "copyright", "credits" or "license" for more information.
          >>> import mariadb
          >>> c=mariadb.connect()
          >>> d=mariadb.connect(ssl=True)
          Segmentation fault: 11
          

          Testing Connector/C with TLS/SSL connection on the same machine works without problems.

          georg Georg Richter added a comment - Ok, I'm able to repeat the problem on Mac (without SkySQL) Python 3.7.4 (default, Aug 13 2019, 15:17:50) [Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import mariadb >>> c=mariadb.connect() >>> d=mariadb.connect(ssl=True) Segmentation fault: 11 Testing Connector/C with TLS/SSL connection on the same machine works without problems.
          georg Georg Richter added a comment -

          fixed in rev. e807101db22349901663957abf98aef2e74f7399

          georg Georg Richter added a comment - fixed in rev. e807101db22349901663957abf98aef2e74f7399

          You rock, georg! Thank you!

          rhedgpeth Rob Hedgpeth (Inactive) added a comment - You rock, georg ! Thank you!

          People

            georg Georg Richter
            rhedgpeth Rob Hedgpeth (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.