Skip to main content
Question

Database connection unsuccessful: Failed to connect - What certificate is it using?

  • March 11, 2025
  • 67 replies
  • 186 views

Show first post

67 replies

Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

I will hold off on this for now, but if someone has more advice on what to try, reach out please. Really want to test this more to replace some DB Connect stuff


David Maislin

Is User ID or User Id? And Semicolon at the end?


is the SQL Server on Azure? one thing I'm seeing in <https://tediousjs.github.io/node-mssql/#tedious|the docs of the library we're using under the hood> is to try adding `;Encrypt=True`


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

SQL server is at our data center, my Cribl test server is in AWS. Firewalls have already had the ports opened so comms is there.


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

<@U01C35EMQ01&gt; i based my connection string off of this page. https://connectionstrings.com/sql-server/


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

User ID is what they had


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

so assumed it was good


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

also verified that my db connect connection to the same server is not using a secured connection but according to my Palo logs, the Cribl Stream box is using mssql-db-encrypted


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

doubt that is my issue though


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

great conversations here, thanks


David Maislin

I see both cases are used without issue on that page :slightly_smiling_face: so nevermind.


Probably a good idea to link to those docs from ours so that users know all the options, etc. that are supported.


Forum|alt.badge.img
  • Participating Frequently
  • March 11, 2025

You could try adding Integrated Security=false and Trusted_Connection=false (or just one of it)


Forum|alt.badge.img
  • Participating Frequently
  • March 11, 2025

Is your DBConnect on a windows box?


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

nope db connect is on a Linux box


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

ok spun up a different test Cribl Stream box on same network as mostof my SQL servers. i have a successful connection to a different SQL server so the one with the untrusted domain one must have a weird requirement on it.Anyway, for database collection, what is the proper javascript expression that contains my SQL query in it? Would be nice for the docs to have some generic examples


I can work on updating the docs with a simple example


you can just do a regular query in here! something like `SELECT * from database.table WHERE column = whatever`. you can use `${earliest}` and `${latest}` if you want to leverage the Collector's start and end times


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

tried a normal SQL query and it complained, i wll try again


can you provide the query?


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

yeah hang on


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

SELECT * FROM "database"."dbo"."table"Even if i remove the quotes, it tells meUnexpected identifier 'database'


did you wrap the entire thing in ` ` ?


Shawn Cannon
Forum|alt.badge.img+1
  • Author
  • Inspiring
  • March 11, 2025

did not know i needed that


David Maislin

:slightly_smiling_face: Those quotes again!