#235 restart Haystacks

Al Tufano Sat 6 Dec 2014

I am installing Haystacks as a part of a project. I installed the service and followed the instructions to build the site equipment point hierarchy. When I go to load the query, I get no results. If I add the naystack to a new point, in the essential pane, it asks me for a schedule. I do not know where that came from. But in either case, I am not able to build my database.

Al Tufano Sat 6 Dec 2014

To add to this, in the stats container it shows num points at 671, equipment at 1 and sites at 1, 00.00.00 for last cache rebuild. Is there a way to -0- out the stats or refrence links? It looks like as if the service is locked or the database file or something is just not updating as I proceede to build the site.

Mike Jarmy Sat 6 Dec 2014

Are there any errors showing up in the station console output when you do the cache rebuild? That cache build time of 00.00 makes me think that maybe rebuildCache() isn't working on your data set.

Al Tufano Sat 6 Dec 2014

I performed a rebuild:

MESSAGE [21:15:51 06-Dec-14 EST][nhaystack] Begin cache rebuild. MESSAGE [21:15:52 06-Dec-14 EST][nhaystack] End cache rebuild 345ms.

Then I did a search (points).

java.lang.ClassCastException: javax.baja.sys.BString

at nhaystack.server.TagManager.findUnit(TagManager.java) at nhaystack.server.TagManager.addPointKindTags(TagManager.java) at nhaystack.server.TagManager.createHistoryTags(TagManager.java) at nhaystack.server.SpaceManager$HIterator.findNext(SpaceManager.java) at nhaystack.server.SpaceManager$HIterator.<init>(SpaceManager.java) at nhaystack.server.SpaceManager.makeHistorySpaceIterator(SpaceManager.java) at nhaystack.server.NHServer.iterator(NHServer.java) at org.projecthaystack.server.HServer.onReadAll(HServer.java) at nhaystack.server.NHServer.onReadAll(NHServer.java) at org.projecthaystack.HProj.readAll(HProj.java) at org.projecthaystack.HProj.readAll(HProj.java) at nhaystack.server.BNHaystackService.doReadAll(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(Unknown Source) java.lang.ClassCastException: javax.baja.sys.BString at nhaystack.server.TagManager.findUnit(TagManager.java) at nhaystack.server.TagManager.addPointKindTags(TagManager.java) at nhaystack.server.TagManager.createHistoryTags(TagManager.java) at nhaystack.server.SpaceManager$HIterator.findNext(SpaceManager.java) at nhaystack.server.SpaceManager$HIterator.<init>(SpaceManager.java) at nhaystack.server.SpaceManager.makeHistorySpaceIterator(SpaceManager.java) at nhaystack.server.NHServer.iterator(NHServer.java) at org.projecthaystack.server.HServer.onReadAll(HServer.java) at nhaystack.server.NHServer.onReadAll(NHServer.java) at org.projecthaystack.HProj.readAll(HProj.java) at org.projecthaystack.HProj.readAll(HProj.java) at nhaystack.server.BNHaystackService.doReadAll(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(Unknown Source) ERROR [21:16:13 06-Dec-14 EST][fox.broker] Cannot invoke action: h:1abef readAll java.lang.ClassCastException: javax.baja.sys.BString

at nhaystack.server.TagManager.findUnit(TagManager.java)
at nhaystack.server.TagManager.addPointKindTags(TagManager.java)
at nhaystack.server.TagManager.createHistoryTags(TagManager.java)
at nhaystack.server.SpaceManager$HIterator.findNext(SpaceManager.java)
at nhaystack.server.SpaceManager$HIterator.<init>(SpaceManager.java)
at nhaystack.server.SpaceManager.makeHistorySpaceIterator(SpaceManager.java)
at nhaystack.server.NHServer.iterator(NHServer.java)
at org.projecthaystack.server.HServer.onReadAll(HServer.java)
at nhaystack.server.NHServer.onReadAll(NHServer.java)
at org.projecthaystack.HProj.readAll(HProj.java)
at org.projecthaystack.HProj.readAll(HProj.java)
at nhaystack.server.BNHaystackService.doReadAll(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)

java.lang.ClassCastException: javax.baja.sys.BString

at nhaystack.server.TagManager.findUnit(TagManager.java) at nhaystack.server.TagManager.addPointKindTags(TagManager.java) at nhaystack.server.TagManager.createHistoryTags(TagManager.java) at nhaystack.server.SpaceManager$HIterator.findNext(SpaceManager.java) at nhaystack.server.SpaceManager$HIterator.<init>(SpaceManager.java) at nhaystack.server.SpaceManager.makeHistorySpaceIterator(SpaceManager.java) at nhaystack.server.NHServer.iterator(NHServer.java) at org.projecthaystack.server.HServer.onReadAll(HServer.java) at nhaystack.server.NHServer.onReadAll(NHServer.java) at org.projecthaystack.HProj.readAll(HProj.java) at org.projecthaystack.HProj.readAll(HProj.java) at nhaystack.server.BNHaystackService.doReadAll(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(Unknown Source)

I was running 1.2.1 and upgraded to 1.2.4. I think that is when I started running into problems. The new version asks for physical location (Floor, etc) as the earlier version did not. It's almost seems like I'm missing one stupid step. So I removed the 1.2.4, the haystack tag slots from all the ord's, went back to 1.2.1 and still no luck. It's as if i missed that one file that is hidden somewhere. If I cannot fix it from remote, I'm going to have to reload the station (which I'd rather not) I am running 1.2.1 on another station and I think everything is working well.

I will be deploying this to a network of over 100 stations and possibly to thousands. I need to make sure that I can have this down so as I roll this out, i tackle any issues now.

Mike Jarmy Sun 7 Dec 2014

OK, here is what I think is happening. It looks like somewhere in your station, there is a "units" facet that is a BString rather than a BUnit.

This is actually a misconfiguration of your station, so you will want to track that thing down and fix it.

I will also fix NHaystack for Build 1.2.5 so that it can handle this case gracefully, rather than failing to build as it does now.

We will most likely not be releasing 1.2.5 for several weeks. So if you can't track down that errant facet, let me know and I can send you an interim patch to work around this problem.

Al Tufano Sun 7 Dec 2014

Not surprised that its a misconfiguration. Though they are not easy to find and on that station, there's a lot of items to go over.

Actually, that brings me to another issue that I was going to mention. IF the facet is null, the nHaystacks will not bind to the ord. I figured out what the issue was and took care of it.

Login or Signup to reply.