#962 Nhaystack for Niagara 4.7

Ricky Tijero Fri 10 Dec 2021


Has anyone been able to successfully connect to a Niagara 4.7 station using the Nhaystack module? I am experiencing some issues authenticating to it, and I am not sure what I am missing. I had the customer install nhaystack-3.0.1 and the module appears to be working on the Niagara side. I am able to initialize it and see the <server>/haystack/about page. I've created a user with admin access and HTTPBasic authetication. However, when I try to connect via haystack (from a SkySpark instance) I get the error below. I have verified I am typing the correct login credentials multiple times, but I still get the same error.

< [3]
401 Authentication failed.
Content-Length: 264
Content-Type: text/html;charset=iso-8859-1
Cache-Control: must-revalidate,no-cache,no-store
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 401 </title>
<h2>HTTP ERROR: 401</h2>
<p>Problem accessing /haystack/about. Reason:
<pre>    Authentication failed.</pre></p>
<hr />

Brian Frank Sat 11 Dec 2021

The Haystack authentication protocol is what should be used, not basic. If your client application is Haxall or SkySpark you can run this command line tool to dump the full HTTP exchange to see what is happening:

bin/fan haystack::Client <uri> <user> <pass>

Login or Signup to reply.