#962 Nhaystack for Niagara 4.7

Ricky Tijero Fri 10 Dec 2021

Hello,

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.
Set-Cookie: 
JSESSIONID=ea34993519bf6285bb4c62b8529bceb9a424f1a053cad86ae2;Path=/;Se 
cure;HttpOnly
Content-Length: 264
Content-Type: text/html;charset=iso-8859-1
Cache-Control: must-revalidate,no-cache,no-store
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 401 </title>
</head>
<body>
<h2>HTTP ERROR: 401</h2>
<p>Problem accessing /haystack/about. Reason:
<pre>    Authentication failed.</pre></p>
<hr />
</body>
</html>

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.