#246 Connection Issues

Brandon Fowler Wed 14 Jan 2015

New to haystack in general. I have one site running on two different JACEs and wantd to use haystack with the "master". What's the best way to do this?

Currently on the "master" I setup a haystack network and added a haystackServer. The uri I'm using is : "http://xxx.xx.xxx.xx:86/haystack" (replacing xxx.xxx with ip). I've also tried "http://xxx.xx.xxx.xx:86/api/site-name" (replacing site-name with actual site name). In both cases I always get a "java.net.ConnectException: Connection refused" error. Any help would be great!

Brian Frank Wed 14 Jan 2015

wantd to use haystack with the "master"

What does "master" mean? You mean Niagara Supervisor? The default URI for nHaystack on Niagara will be http://host:port/haystack. You can always try it in your browser by tacking on about such as http://localhost/haystack/about

Mike Jarmy Wed 14 Jan 2015

Brian is correct. The /api/demo uri is not used by nhaystack. Also the port 86 that you are using is only relevant if the station in question is configured to use port 86 for http requests. Testing in a browser is always a good idea before you try to plug things together.

But what is your use case? It sounds like you are trying to communicate between two stations via the haystack protocol, is that correct?

Although you can communicate between two AX stations using the NHaystack driver (a.k.a client) on one side, and the NHaystack server on the other, generally speaking there really isn't a good reason to do so.

Mainly you would either (a) use the server so that you can get data out of an AX system using the haystack protocol, or (b) use the driver so that you can bring data in using the haystack protocol.

Brandon Fowler Thu 15 Jan 2015

Thanks for the replies. The thought was to be able to use the haystack query from one device rather logging into individual stations just to do the query. My situation is 2 Stations each with 2 LON trunks. I'm using one of them as the "master", master in quotes because its not really a master slave situation. I'd like the client to be able to log into only one of them to do the haystack queries. If there is a better way of doing this than the Haystack sever I'm open to suggestions.

Best, Brandon

Login or Signup to reply.