#225 nHaystack <url>/about returns "Gone"

Deactivate Me Thu 6 Nov 2014

I am having issues getting the nHaystack service working on a JACE7. I had an older version of the driver (think 1.1.2) and I would just get a 500 error when going to <url>/about. I have upgraded to 1.2.2 and now get the following:

<html> <body> <h1>410: Gone</h1> Gone </body></html>

Does anyone know what that means and what could be the issue?

Mike Jarmy Fri 7 Nov 2014

This can happen under two circumstances:

  1. During startup, NHaystack failed to build its internal cache for some reason. This is generally due to a broken Ref (see the documentation), but occasionally there is a configuration on the station that nhaystack has not encountered before and doesn't know how to deal with.
  2. NHaystack has not built its internal cache yet, because the initializationDelayTime slot on the NHaystackService was set to a non-zero value, and has not yet expired.

If you haven't configured initializationDelayTime, then its probably because nhaystack can't build its internal cache.

Do you have any station-side log output that happened when the station was booted? If you turn "trace" logging on for the nhaystack module as well, then there will be more useful info in the log output.

Deactivate Me Mon 23 Nov 2015

Never did get this working yet. Here is the error:

MESSAGE [15:54:31 23-Nov-15 PST][nhaystack] Begin initializing NHaystack ERROR [15:54:31 23-Nov-15 PST][sys.engine] Action failed: initializeHaystack() java.lang.NullPointerException

at nhaystack.server.BNHaystackService.doInitializeHaystack(BNHaystackService.java)
at auto.nhaystack_server_BNHaystackService.invoke(AutoGenerated)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java)
at com.tridium.sys.engine.EngineUtil.doInvoke(EngineUtil.java)
at javax.baja.sys.BComponent.doInvoke(BComponent.java)
at javax.baja.util.Invocation.run(Invocation.java)
at nhaystack.worker.WorkerInvocation.doRun(WorkerInvocation.java)
at nhaystack.worker.WorkerChore.run(WorkerChore.java)
at javax.baja.util.Worker.process(Worker.java)
at javax.baja.util.Worker$Processor.run(Worker.java)
at java.lang.Thread.run(Thread.java:823)

MESSAGE [16:12:34 23-Nov-15 PST][nhaystack] NHaystack Service started ERROR [16:12:34 23-Nov-15 PST][sys.service] Service start failed: N Haystack Service java.lang.NullPointerException

at org.projecthaystack.HDateTime.make(HDateTime.java)
at org.projecthaystack.HDateTime.make(HDateTime.java)
at org.projecthaystack.HDateTime.now(HDateTime.java)
at org.projecthaystack.server.HServer.<init>(HServer.java)
at nhaystack.server.NHServer.<init>(NHServer.java)
at nhaystack.server.BNHaystackService.createServer(BNHaystackService.java)
at nhaystack.server.BNHaystackService.serviceStarted(BNHaystackService.java)
at com.tridium.sys.service.ServiceManager.startService(ServiceManager.java)
at com.tridium.sys.service.ServiceManager.register(ServiceManager.java)
at com.tridium.sys.schema.ComponentSlotMap.mount(ComponentSlotMap.java)
at com.tridium.sys.schema.ComponentSlotMap.parent(ComponentSlotMap.java)
at com.tridium.sys.schema.ComponentSlotMap.add(ComponentSlotMap.java)
at javax.baja.sync.AddOp.commit(AddOp.java)
at javax.baja.sync.SyncBuffer.commitOp(SyncBuffer.java)
at javax.baja.sync.SyncBuffer.commit(SyncBuffer.java)
at com.tridium.fox.sys.broker.BBrokerChannel.syncToMaster(BBrokerChannel.java)
at com.tridium.fox.sys.broker.BBrokerChannel.circuitOpened(BBrokerChannel.java)
at com.tridium.fox.sys.BFoxConnection.circuitOpened(BFoxConnection.java)
at com.tridium.fox.session.SessionCircuits$ServiceThread.run(SessionCircuits.java)

MESSAGE [16:12:34 23-Nov-15 PST][nhaystack] NHaystack Servlet disabled ERROR [16:12:58 23-Nov-15 PST][web] Internal Server Error java.lang.NullPointerException

at org.projecthaystack.server.HServlet.onService(HServlet.java)
at org.projecthaystack.server.HServlet.doGet(HServlet.java)
at nhaystack.server.BNHaystackServlet.doGet(BNHaystackServlet.java)
at javax.baja.web.BWebServlet.service(BWebServlet.java)
at com.tridium.web.WebProcess.serviceWebServlet(WebProcess.java)
at com.tridium.web.WebProcess.service(WebProcess.java)
at com.tridium.web.SysServlet.service(SysServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at com.tridium.httpd.ServiceThread.handleRequest(ServiceThread.java)
at com.tridium.httpd.ServiceThread.run(ServiceThread.java)

ERROR [16:14:00 23-Nov-15 PST][web] Internal Server Error java.lang.NullPointerException

at org.projecthaystack.server.HServlet.onService(HServlet.java)
at org.projecthaystack.server.HServlet.doGet(HServlet.java)
at nhaystack.server.BNHaystackServlet.doGet(BNHaystackServlet.java)
at javax.baja.web.BWebServlet.service(BWebServlet.java)
at com.tridium.web.WebProcess.serviceWebServlet(WebProcess.java)
at com.tridium.web.WebProcess.service(WebProcess.java)
at com.tridium.web.SysServlet.service(SysServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at com.tridium.httpd.ServiceThread.handleRequest(ServiceThread.java)
at com.tridium.httpd.ServiceThread.run(ServiceThread.java)

ERROR [16:15:26 23-Nov-15 PST][fox.broker] Cannot invoke action: h:6b311 fetchSepNav javax.baja.sys.BajaRuntimeException

at nhaystack.server.BNHaystackService.doFetchSepNav(BNHaystackService.java)
at auto.nhaystack_server_BNHaystackService.invoke(AutoGenerated)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java)
at javax.baja.sys.BComponent.invoke(BComponent.java)
at com.tridium.fox.sys.broker.BBrokerChannel.invoke(BBrokerChannel.java)
at com.tridium.fox.sys.broker.BBrokerChannel.process(BBrokerChannel.java)
at com.tridium.fox.sys.BFoxConnection.process(BFoxConnection.java)
at com.tridium.fox.session.SessionDispatcher.dispatch(SessionDispatcher.java)
at com.tridium.fox.session.SessionDispatcher.run(SessionDispatcher.java)
at java.lang.Thread.run(Thread.java:823)

Caused by: java.lang.NullPointerException

... 11 more
java.lang.NullPointerException
   at nhaystack.server.BNHaystackService.doFetchSepNav(BNHaystackService.java)
   at auto.nhaystack_server_BNHaystackService.invoke(AutoGenerated)
   at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java)
   at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java)
   at javax.baja.sys.BComponent.invoke(BComponent.java)
   at com.tridium.fox.sys.broker.BBrokerChannel.invoke(BBrokerChannel.java)
   at com.tridium.fox.sys.broker.BBrokerChannel.process(BBrokerChannel.java)
   at com.tridium.fox.sys.BFoxConnection.process(BFoxConnection.java)
   at com.tridium.fox.session.SessionDispatcher.dispatch(SessionDispatcher.java)
   at com.tridium.fox.session.SessionDispatcher.run(SessionDispatcher.java)
   at java.lang.Thread.run(Thread.java:823)

javax.baja.sys.BajaRuntimeException

at nhaystack.server.BNHaystackService.doFetchSepNav(BNHaystackService.java) at auto.nhaystack_server_BNHaystackService.invoke(AutoGenerated) at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java) at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java) at javax.baja.sys.BComponent.invoke(BComponent.java) at com.tridium.fox.sys.broker.BBrokerChannel.invoke(BBrokerChannel.java) at com.tridium.fox.sys.broker.BBrokerChannel.process(BBrokerChannel.java) at com.tridium.fox.sys.BFoxConnection.process(BFoxConnection.java) at com.tridium.fox.session.SessionDispatcher.dispatch(SessionDispatcher.java) at com.tridium.fox.session.SessionDispatcher.run(SessionDispatcher.java) at java.lang.Thread.run(Thread.java:823)

Any ideas what the issue could be?

Mike Jarmy Tue 24 Nov 2015

That's a fairly substantial list of errors :-). I'm really not sure at the moment how that many different errors could have been triggered. Can you contact me through J2 support so we can fix this?

Jake MacArthur Fri 19 Feb 2016

I am getting this same 410 error with nHaystack 1.2.5. Originally, nHaystack initialized and I was able to connect to it.

Any thoughts on this?

According the trace, the cache rebuild is failing on initialization:

TRACE [14:15:47 19-Feb-16 MST][nhaystack] Chore ENQUEUE initializeHaystack
  
TRACE [14:15:47 19-Feb-16 MST][nhaystack] Chore BEGIN initializeHaystack
  
MESSAGE [14:15:47 19-Feb-16 MST][nhaystack] Begin initializing NHaystack
  
MESSAGE [14:15:47 19-Feb-16 MST][nhaystack] Begin cache rebuild.
  
TRACE [14:15:47 19-Feb-16 MST][nhaystack] Rebuild cache: step 1 of 5...
  
ERROR [14:15:50 19-Feb-16 MST][sys.engine] Action failed: initializeHaystack()
  
javax.baja.naming.SyntaxException: Trailing slash  
   at javax.baja.naming.SlotPath.parseNames(SlotPath.java:408)  
   at javax.baja.naming.SlotPath.parse(SlotPath.java:382)  
   at javax.baja.naming.SlotPath. (SlotPath.java:56)  
   at nhaystack.server.RemotePoint. (RemotePoint.java:130)  
   at nhaystack.server.RemotePoint.fromControlPoint(RemotePoint.java:78)  
   at nhaystack.server.Cache.rebuildComponentCache_firstPass(Cache.java:276)  
   at nhaystack.server.Cache.rebuild(Cache.java:53)  
   at nhaystack.server.BNHaystackService.doInitializeHaystack(BNHaystackService.java:677)  
   at auto.nhaystack_server_BNHaystackService.invoke(AutoGenerated)  
   at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1599)  
   at com.tridium.sys.engine.EngineUtil.doInvoke(EngineUtil.java:49)  
   at javax.baja.sys.BComponent.doInvoke(BComponent.java:1135)  
   at javax.baja.util.Invocation.run(Invocation.java:46)  
   at nhaystack.worker.WorkerInvocation.doRun(WorkerInvocation.java:32)  
   at nhaystack.worker.WorkerChore.run(WorkerChore.java:40)  
   at javax.baja.util.Worker.process(Worker.java:166)  
   at javax.baja.util.Worker$Processor.run(Worker.java:139)  
   at java.lang.Thread.run(Thread.java:744)  
TRACE [14:15:50 19-Feb-16 MST][nhaystack] Chore END initializeHaystack (2559ms)

Richard McElhinney Sat 20 Feb 2016

Hi Jake,

I'm happy to review the issue here. Seeing as there is an existing thread I'll need to go through what was done before. Can you post some more details on your installation please?

  • Do you have any point names that contain special characters?
  • The exact URL you typed into the web browser to get the 410 error?
  • Niagara version this is running on?
  • Is this reproducible reliably?
  • Is this a Web Supervisor station?
  • Do you have Niagara devices/points in the station?
  • Can you share the station this is running so I can test myself?

regards, Richard

kathiresan rajagopal Wed 28 Sep 2016

Hi Richard,

I am facing similar issue. connErr:haystack::AuthErr: Basic authentication failed [410] It was working fine and suddenly stopped. Any help on this to reconnect successully?

Regards, Kathiresan

Jason LaBuff Sat 11 Feb 2017

I got that exact same error (Trailing slash)- was there ever a resolution?

I deleted everything in the station, saved the station, restarted it, re-inserted nHaystack module, initialized haystack, and still got the error below.

ERROR [20:12:54 11-Feb-17 MST][sys.engine] Action failed: initializeHaystack()

javax.baja.naming.SyntaxException: Trailing slash

at javax.baja.naming.SlotPath.parseNames(SlotPath.java:408)  
at javax.baja.naming.SlotPath.parse(SlotPath.java:382)  
at javax.baja.naming.SlotPath. (SlotPath.java:56)  
at nhaystack.server.RemotePoint. (RemotePoint.java:130)  
at nhaystack.server.RemotePoint.fromControlPoint(RemotePoint.java:78)  
at nhaystack.server.Cache.rebuildComponentCache_firstPass(Cache.java:276)  
at nhaystack.server.Cache.rebuild(Cache.java:53)  
at ...

Thanks,

Jason

Jason LaBuff Thu 2 Mar 2017

I found the issue with the above error. I "half-bracket" troubleshot my 23 site station by deleting parts of it at a time and trying to initiate haystack. I narrowed it down to one single point. That point was evidently migrated from AX to N4 with a little bug in it that left off part of the slot path. It evidently throws the above exact error no matter where it is located in the station.

The point itself had the proxy path of slot:/Drivers/BacnetNetwork/LPEC/points/

The fault cause in the proxyExt was Read fault: javax.baja.naming.SyntaxException: Trailing slash.

Fixing this fixes the entire nHaystack funtionality.

Login or Signup to reply.