MS Sql Plugin

Trying to test ms sql connection → unknown error

Using MSSQL connection string...
invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/komand-1.0.1-py3.7.egg/komand/plugin.py", line 311, in handle_step
    output = self.start_step(input_message['body'], 'action', logger, log_stream, is_test, is_debug)
  File "/usr/local/lib/python3.7/site-packages/komand-1.0.1-py3.7.egg/komand/plugin.py", line 352, in start_step
    connection = self.connection_cache.get(message_body['connection'], logger)
  File "/usr/local/lib/python3.7/site-packages/komand-1.0.1-py3.7.egg/komand/connection.py", line 43, in get
    conn.connect(parameters)
  File "/usr/local/lib/python3.7/site-packages/sql_rapid7_plugin-3.0.0-py3.7.egg/komand_sql/connection/connection.py", line 64, in connect
    self.connection.__enter__()
  File "/usr/local/lib/python3.7/site-packages/sql_rapid7_plugin-3.0.0-py3.7.egg/komand_sql/connection/connection.py", line 16, in __enter__
    engine = sqlalchemy.create_engine(self.connection_string)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/__init__.py", line 419, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py", line 50, in create
    u = url.make_url(name_or_url)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/url.py", line 205, in make_url
    return _parse_rfc1738_args(name_or_url)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/url.py", line 251, in _parse_rfc1738_args
    return URL(name, **components)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/url.py", line 60, in __init__
    self.port = int(port)
ValueError: invalid literal for int() with base 10: ''

did you define your port?

1 Like

Hey @Brian_rapid7 Can you let us know a little more about the connection settings, action you’re using or plan to use, and the inputs? Looks like we need to improve the error handling on this one at the very least. I created a ticket for engineering on that while we await for further information to help resolve the issue.

Thanks!

I was just trying to test the connection, and pulling info from a MS SQL server , no inputs / actions used
and Port is optional , I used the default port for MS SQL

Thanks @Brian_rapid7, we’re looking into it.

Default port the plugin uses is one of the default SQL ports, it did not look for the default MS SQL port we used so i had to specify my port

APP was looking for something else , i had to specify 1433

Hey @Brian_rapid7, If I understand you correctly, it is working now that you specified the port? If so, we can improve the documentation and user experience.

Yes , you cannot leave it blank ( default doesnt work )