Hi, I have installed DB connect 2 on my splunk server to retrieve data from a remote database.
After setup the identity and connection, it shows that it is a "Valid connection".
But in the query tab, it shows "No catalog found".
I switch to Advanced Query Mode, and the query is "SELECT * FROM myTable", the following error message is shown:
External search command 'dbxquery' returned error code 1. First 1000 (of 1061) bytes of script output: " ERROR "Exception at ""C:\Program Files\Splunk\etc\apps\splunk_app_db_connect\bin\dbxquery.py"", line 82 : {""messages"":[{""type"":""WARN"",""text"":""Traceback (most recent call last):\r\n File \""C:\Program Files\Splunk/bin/rest_handler.py\"", line 78, in <module>\r\n print splunk.rest.dispatch(**params)\r\n File \""C:\Program Files\Splunk\Python-2.7\Lib\site-packages\splunk\rest\init.py\"", line 215, in dispatch\r\n responseObject.write(json.dumps(feed.asJsonStruct(), separators=(',', ':')))\r\n File \""C:\Program Files\Splunk\Python-2.7\Lib\json\init.py\"", line 250, in dumps\r\n sort_keys=sort_keys, **kw).encode(obj)\r\n File \""C:\Program Files\Splunk\Python-2.7\Lib\json\encoder.py\"", line 230, in encode\r\n chunks = self.iterencode(o, _one_shot=True)\r\n File \""C:\Program Files\Splunk\Python-2.7\Lib\json\encoder.py\"", line 293, in iterencode\r\n return _iterencode(o, 0)\r\nUnicodeDecodeError: 'utf8' codec can't decode"
If anyone has the same problem? Any help is appreciated.
Solved this problem with DB connect 1. Maybe there are some bugs in DB connect 2...
There's a Java 1.8 issue with DB Connect 2 that requires you to pre-format date/time in the query. With MySQL it's DATE_FORMAT(date_column_name, '%Y%m%d') as date_column_name, for an example.
Hi,
I'm having exactly the same issue as mentioned above after upgrading from DBConnect 2.0.3 to 2.1.3.
Any idea why this is happening? Nothing has changed on the MSSQL server side..
In 2.0.3 everything has worked as expected.
Thanks in advance,
Christoph
I have similar problem with Oracle DB. Connection validates, but I get "No catalog found" and with query in advanced mode I always get following error:
command="dbxquery", {"messages":[{"type":"WARN","text":"Traceback (most recent call last):\r\n File \"C:\\Program Files\\Splunk/bin/rest_handler.py\", line 78, in \r\n print splunk.rest.dispatch(**params)\r\n File \"C:\\Program Files\\Splunk\\Python-2.7\\Lib\\site-packages\\splunk\\rest\\__init__.py\", line 215, in dispatch\r\n responseObject.write(json.dumps(feed.asJsonStruct(), separators=(',', ':')))\r\n File \"C:\\Program Files\\Splunk\\Python-2.7\\Lib\\json\\__init__.py\", line 250, in dumps\r\n sort_keys=sort_keys, **kw).encode(obj)\r\n File \"C:\\Program Files\\Splunk\\Python-2.7\\Lib\\json\\encoder.py\", line 230, in encode\r\n chunks = self.iterencode(o, _one_shot=True)\r\n File \"C:\\Program Files\\Splunk\\Python-2.7\\Lib\\json\\encoder.py\", line 293, in iterencode\r\n return _iterencode(o, 0)\r\nUnicodeDecodeError: 'utf8' codec can't decode byte 0xe4 in position 30: invalid continuation byte\r\n\r\n"}]}
Using old version can't really be the solution for DB connect 2? But as it is the accepted answer, do I have to open a new problem?
Solved this problem with DB connect 1. Maybe there are some bugs in DB connect 2...
I downvoted this post because this is not a solution
I downvoted this post because this isn't a solution, it's a workaround.
I downvoted this post because using v1 should not be the accepted answer
from my experience with DB 2, it certainly comes a bit below the expectations. i cannot blame @sjlin
What kind of database are you trying to connect to? And did you install the drivers for it?
MySQL database, and yes , I have installed mysql-connector-java-5.1.35-bin.