usgs / winston

Winston is a Java-based seismic wave server, which provides data and plots to clients.
http://volcanoes.usgs.gov/software/winston/
Other
11 stars 6 forks source link

Issue with 1.3 WWS menu, Swarm can't read #79

Closed stefanisti closed 5 years ago

stefanisti commented 5 years ago

I sent email about this originally because I wasn't sure if the problem was with Swarm or with Winston, but after I reverted from Winston 1.3.4 to Winston 1.2.12, the problem went away, I'm posting the bug report here.

I'm trying the latest version of Swarm 2.8.9 against the latest Winston 1.3.4

I'm able to view a wave server v which has the same content as my Winston, but on Windows 10 Swarm hangs when trying to show me the index of the Winston Wave Server.

Here's the index: Tank contents for localhost:16022 ws: localhost:16022 pin: 16 WADM.SCZ.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 53 WADM.SCN.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 15 WADM.SCE.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 55 TWAR.SCZ.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 39 TWAR.SCN.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 57 TWAR.SCE.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 58 TUMT.EGZ.NM.-- Start: 20190603_0012_42.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 42 TUMT.EGN.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 28 TUMT.EGG.NM.-- Start: 20190603_0012_41.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 4 TUMT.EGE.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 6 SFTN.EHZ.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 8 SFTN.EH2.NM.-- Start: 20190603_0012_37.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 50 SFTN.EH1.NM.-- Start: 20190603_0012_40.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 37 RELT.SCZ.NM.-- Start: 20190603_0012_39.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 36 RALT.EGZ.NM.-- Start: 20190603_0012_42.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 10 RALT.EGN.NM.-- Start: 20190603_0012_41.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 5 RALT.EGG.NM.-- Start: 20190603_0012_39.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 31 RALT.EGE.NM.-- Start: 20190603_0012_39.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 20 QUAR.SCZ.NM.-- Start: 20190603_0012_42.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 59 QUAR.SCN.NM.-- Start: 20190603_0012_37.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 24 QUAR.SCE.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 9 PWLA.EHZ.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 46 PWLA.EHN.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 14 PWLA.EHE.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 41 MPHB.HHZ.NM.-- Start: 20190603_0012_36.89 End: 20190603_0013_15.89 ws: localhost:16022 pin: 33 MPHB.HH2.NM.-- Start: 20190603_0012_36.89 End: 20190603_0013_14.89 ws: localhost:16022 pin: 23 MPHB.HH1.NM.-- Start: 20190603_0012_36.89 End: 20190603_0013_17.89 ws: localhost:16022 pin: 38 MPH.LLZ.NM.-- Start: 20190603_0012_37.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 21 MPH.LLN.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 35 MPH.LLE.NM.-- Start: 20190603_0012_37.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 18 MPH.LHZ.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 30 MPH.LHN.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 12 MPH.LHE.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 52 MPH.BHZ.NM.-- Start: 20190603_0012_39.45 End: 20190603_0013_16.10 ws: localhost:16022 pin: 7 MPH.BHN.NM.-- Start: 20190603_0012_40.05 End: 20190603_0013_24.75 ws: localhost:16022 pin: 43 MPH.BHE.NM.-- Start: 20190603_0012_32.60 End: 20190603_0013_19.05 ws: localhost:16022 pin: 3 MLNT.EGZ.NM.-- Start: 20190603_0012_37.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 56 MLNT.EGN.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 47 MLNT.EGG.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 11 MLNT.EGE.NM.-- Start: 20190603_0012_37.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 49 LVAR.SCZ.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 1 LVAR.SCN.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 45 LVAR.SCE.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 29 IRIG.MEM.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 34 GUID.MEM.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 19 GNAR.HHZ.NM.-- Start: 20190603_0012_36.89 End: 20190603_0013_18.89 ws: localhost:16022 pin: 26 GNAR.HHN.NM.-- Start: 20190603_0012_36.89 End: 20190603_0013_15.89 ws: localhost:16022 pin: 22 GNAR.HHE.NM.-- Start: 20190603_0012_36.89 End: 20190603_0013_19.89 ws: localhost:16022 pin: 51 GLST.SCZ.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 44 GLST.SCN.NM.-- Start: 20190603_0012_39.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 54 GLST.SCE.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 2 EBZ.EHZ.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 27 DLAR.SCZ.NM.-- Start: 20190603_0012_37.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 40 DLAR.SCN.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 25 DLAR.SCE.NM.-- Start: 20190603_0012_37.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 17 CWPT.SCZ.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 32 CWPT.SCN.NM.-- Start: 20190603_0012_39.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 13 CWPT.SCE.NM.-- Start: 20190603_0012_40.03 End: 20190603_0013_15.03 ws: localhost:16022 pin: 48 BRGM.SCZ.NM.-- Start: 20190603_0012_36.03 End: 20190603_0013_15.03

Here's the error output from Swarm:

... 2019-06-02 08:49:34 INFO - loading MapPack: mapdata\world\MapPack.txt "ava.lang.NumberFormatException: For input string: "59 at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at gov.usgs.volcanoes.wwsclient.handler.GetChannelsHandler.handle(GetChannelsHandler.java:56) at gov.usgs.volcanoes.wwsclient.handler.WWSClientHandler.channelRead(WWSClientHandler.java:39) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294) at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) at java.lang.Thread.run(Unknown Source)

I tried with a Windows Swarm and an OSX Swarm. Same result. (Winston was on W10 64 bit in both cases running java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode))

With Winston 1.2.12, there are no errors in the Swarm log, and Swarm reads the index fine, and I can see waveforms, etc.

I'm running the "Memphis Test" tankplayer playback with only the addition of an export_generic.d to send to ImportEW. So you should be able to reproduce exactly what I'm seeing if you want to.

http://earthwormcentral.com/distribution/memphis_test.zip

dlnorgaard commented 5 years ago

In the handle code of wwsclient GetChannelsHandler the header returned from ClientUtils.readResponseHeader(msgBuf) is returning "GC 57\r" and it is trying to parse 57\r into an integer. Against Linux Winston the \r is not there, e.g. "GC 308".

public void handle(ByteBuf msgBuf) throws IOException { if (linesTotal < 0) { String header = ClientUtils.readResponseHeader(msgBuf); if (header == null) { LOGGER.debug("Still waiting for full response line."); return; } else { linesTotal = Integer.parseInt(header.split(" ")[1]); LOGGER.debug("Server has {} channels.", linesTotal); } }

dlnorgaard commented 5 years ago

Put fix into wwsclient and released 1.3.7. Updated Swarm to use the fixed client and released (2.8.11).

dlnorgaard commented 5 years ago

Commit for this fix: https://github.com/dnorgaard-usgs/wwsclient/commit/c5bc6df8fb7cf6df5ad59f15a1be0b1e914db2dd.

Seems there is a similar issue in GetWaveHandler. Will open separate ticket.