Network problem with ew2mseed

81 views
Skip to first unread message

Roderick Stewart

unread,
Apr 1, 2020, 11:11:33 AM4/1/20
to earthwo...@googlegroups.com
I had a perfectly working earthworm running ew2mseed manually, with this 

earthworm 7.9
Ubuntu 18.04 virtual machine running under OSX Parallels

I upgraded to

earthworm 7.10
Ubuntu 19.10 virtual machine running under OSX Parallels

Earthworm installed OK, but I now have network problems when I run ew2mseed.

The waveserver is properly specified in the ew2mseed.d file, and I can ping it. But the log file shows it’s not being read properly from the .d file and says I have a problem with name resolution (see below).


Any ideas?

Rod

-------------------------------------------------------
ew2mseed: startup at UTC_20200401_14:54:59
This program is using the MT-Safe version of logit.
-------------------------------------------------------
20200401_UTC_14:54:59 ew2mseed: Read command file <ew2mseed.d>
MseedDir          = /home/stewart/src/earthworm/run_mvo/data
configFile        = ew2mseed.d
Verbosity         = 4
logSwitch         = 2
GapThresh         = 20
SocketReconnect   = 3000 s
Travel Tm-out     = 20 s
Start Time (s)    = 1584712320.000000
LockFile          = ./ew2mseed_1.lock
UsePriority       = NO
Records num-r     = 10
----------------------
WaveServer-0   = nfiguration:16022 
-----------------------
             STN    CHAN     NET   Loc.ID Rec. length Compr.
SCN-0   =    MBGH     HHZ      MV      --  4096 10 
SCN-1   =    MBGH     HH1      MV      --  4096 10 
SCN-2   =    MBGH     HH2      MV      --  4096 10 
SCN-3   =    MBFL     HHZ      MV      --  4096 10 
SCN-4   =    MBFL     HH1      MV      --  4096 10 
SCN-5   =    MBFL     HH2      MV      --  4096 10 
SCN-6   =    MSS1     SHZ      MV      --  4096 10 
=========================
20200401_UTC_14:54:59 setuptcpclient_ew()- getaddrinfo error: Temporary failure in name resolution
20200401_UTC_14:54:59 wsAppendMenu nfiguration:16022 : Could not get a connection.
20200401_UTC_14:54:59 processWsAppendMenu: menu is empty, retrying to connect to servers...20200401_UTC_14:55:19 setuptcpclient_ew()- getaddrinfo error: Temporary failure in name resolution
20200401_UTC_14:55:19 wsAppendMenu nfiguration:16022 : Could not get a connection.
20200401_UTC_14:55:19 processWsAppendMenu: menu is empty, retrying to connect to servers...


--
Roderick Stewart
Research Fellow (Volcano-Seismology), Montserrat Volcano Observatory
www.mvo.ms
email: r...@mvo.msroderick...@gmail.comrod.s...@uwiseismic.com

phone: (+1-664) 491-5647
fax: (+1-664) 491-2423
direct line: (+1-664) 491-5726
mobile: (+1-664) 495-0743
home: (+1-664) 491-3139
roaming: +44 7452 023889
trinidad: +1 (868) 780-4296






Paul Friberg

unread,
Apr 1, 2020, 8:52:56 PM4/1/20
to Earthworm Community Forum
Try and run getmenu against your wave server and see that you can connect to that OK.

Paul

--
--
You received this message because you are subscribed to the Google
Groups "Earthworm Community Forum" group.
 
To post to this group, send an email to earthwo...@googlegroups.com
 
To unsubscribe from this group, send an email to
earthworm_for...@googlegroups.com
 
For more options, visit this group at
http://groups.google.com/group/earthworm_forum?hl=en

---
You received this message because you are subscribed to the Google Groups "Earthworm Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to earthworm_for...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/earthworm_forum/F13982FB-658B-438D-AAF9-B1726DFA6738%40gmail.com.


--
===================================
Paul Friberg   p.fr...@isti.com
CEO/Seismologist
ISTI==Instrumental Software Technologies, Inc.
Phone 845.256.9290  FAX 845.256.9299   Mobile +1.914.489.4888

Jim Riley

unread,
Mar 22, 2024, 2:06:33 PMMar 22
to Earthworm Community Forum
I too am experiencing this error. 7.9 centos6 binaries work on amazonlinux latest, but 7.10 centos7 and redhat8 binaries fail with:

20240319_UTC_23:08:57 setuptcpclient_ew()- getaddrinfo error: Name or service not known
20240319_UTC_23:08:57 wsAppendMenu nfiguration:16022 : Could not get a connection.
20240319_UTC_23:08:57 processWsAppendMenu: menu is empty, retrying to connect to servers...


Is there something new in 7.10's new setuptcpclient() function that creates a new dependency on the host running ew2mseed?

I'm trying to avoid building from src, but perhaps that is the best path forward.

Larry Baker

unread,
Mar 22, 2024, 2:48:55 PMMar 22
to jim....@earthscope.org, Larry Baker, Earthworm Community Forum
Jim,

It looks like you have an ew2mseed log file configured for verbose messages.  That's useful.  I see a weird line:

----------------------
WaveServer-0   = nfiguration:16022 
-----------------------

It looks like something got clobbered.  If you use an editor that can view non-printing characters to view the ew2mseed.log file, do you see garbage characters on that line?  Are they from your ew2mseed.d file?  Are they from a a bug in ew2mseed?

You can attach your ew2mseed.d file for us to look for parsing errors that might have cropped up.


Larry Baker

unread,
Mar 22, 2024, 3:01:57 PMMar 22
to jim....@earthscope.org, Larry Baker, Earthworm Community Forum
Jim,

Somehow, ew2mseed thinks the IP address for WaveServer-0 is "nfiguration", which explains why the DNS lookup fails.

If your ew2mseed.d file has not changed, then there must be an error since EW 7.9 in the ew2mseed.d file parser for the WaveServer.

Stefan Lisowski

unread,
Mar 22, 2024, 3:05:07 PMMar 22
to earthwo...@googlegroups.com, jim....@earthscope.org
If you have a Rocky or Redhat installation (CentOS at EOL) can you try
the latest redhat based build, compiled earlier today:

http://earthwormcentral.com/distribution/earthworm_7.11.alpha2-rocky8-64bit-bin.tar.gz
>> www.mvo.ms <http://www.mvo.ms/>
>> email: r...@mvo.ms, roderick...@gmail.com, rod.s...@uwiseismic.com
>>
>> phone: (+1-664) 491-5647 <tel:(664)%20491-5647>
>> fax: (+1-664) 491-2423 <tel:(664)%20491-2423>
>> direct line: (+1-664) 491-5726 <tel:(664)%20491-5726>
>> mobile: (+1-664) 495-0743 <tel:(664)%20495-0743>
>> home: (+1-664) 491-3139 <tel:(664)%20491-3139>
>> roaming: +44 7452 023889 <tel:+44%207452%20023889>
>> trinidad: +1 (868) 780-4296 <tel:(868)%20780-4296>‬
>>
>>
>>
>>
>>
>>
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Earthworm Community Forum" group.
>>
>> To post to this group, send an email to
>> earthwo...@googlegroups.com
>>
>> To unsubscribe from this group, send an email to
>> earthworm_for...@googlegroups.com
>>
>> For more options, visit this group at
>> http://groups.google.com/group/earthworm_forum?hl=en
>> <http://groups.google.com/group/earthworm_forum?hl=en>
>>
>> ---
>> You received this message because you are subscribed to the
>> Google Groups "Earthworm Community Forum" group.
>> To unsubscribe from this group and stop receiving emails from
>> it, send an email to earthworm_for...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/earthworm_forum/F13982FB-658B-438D-AAF9-B1726DFA6738%40gmail.com <https://groups.google.com/d/msgid/earthworm_forum/F13982FB-658B-438D-AAF9-B1726DFA6738%40gmail.com?utm_medium=email&utm_source=footer>.
>>
>>
>>
>> --
>> ===================================
>> Paul Friberg p.fr...@isti.com
>> CEO/Seismologist
>> ISTI==Instrumental Software Technologies, Inc.
>> Phone 845.256.9290 <tel:(845)%20256-9290>  FAX 845.256.9299
>> <tel:(845)%20256-9299>   Mobile +1.914.489.4888 <tel:(914)%20489-4888>
>>
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Earthworm Community Forum" group.
>>
>> To post to this group, send an email to earthwo...@googlegroups.com
>>
>> To unsubscribe from this group, send an email to
>> earthworm_for...@googlegroups.com
>>
>> For more options, visit this group at
>> http://groups.google.com/group/earthworm_forum?hl=en
>> <http://groups.google.com/group/earthworm_forum?hl=en>
>>
>> ---
>> You received this message because you are subscribed to the Google
>> Groups "Earthworm Community Forum" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to earthworm_for...@googlegroups.com
>> <mailto:earthworm_for...@googlegroups.com>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/earthworm_forum/47485763-c910-478b-b79c-6d2551944d67n%40googlegroups.com <https://groups.google.com/d/msgid/earthworm_forum/47485763-c910-478b-b79c-6d2551944d67n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Earthworm Community Forum" group.
>
> To post to this group, send an email to earthwo...@googlegroups.com
>
> To unsubscribe from this group, send an email to
> earthworm_for...@googlegroups.com
>
> For more options, visit this group at
> http://groups.google.com/group/earthworm_forum?hl=en
> <http://groups.google.com/group/earthworm_forum?hl=en>
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Earthworm Community Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to earthworm_for...@googlegroups.com
> <mailto:earthworm_for...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/earthworm_forum/5366F189-ECDE-4543-A423-D32C2E8339CC%40stanfordalumni.org <https://groups.google.com/d/msgid/earthworm_forum/5366F189-ECDE-4543-A423-D32C2E8339CC%40stanfordalumni.org?utm_medium=email&utm_source=footer>.

--








*To follow ISTI news and updates please subscribe to our newsletter
"the isti letter" at  https://www.isti.com/newsletter-sign-up
<https://www.isti.com/newsletter-sign-up>.*





Stefan Lisowski

unread,
Mar 22, 2024, 3:47:09 PMMar 22
to earthwo...@googlegroups.com, jim....@earthscope.org

Larry Baker

unread,
Mar 22, 2024, 4:54:18 PMMar 22
to jim....@earthscope.org, Larry Baker, Stefan Lisowski, Earthworm Community Forum
Jim,

There is a bug in ew2mseed_config.c where it parses the WaveServer IP address.  It was introduced in GIT commit 1c1e1d7e, "Updating modules to correctly parse/handle IPv6", on July 14, 2016.

The code where the error occurs is near line 315 in ew2mseed_config.c:

/*5*/ else if( k_its("WaveServer") ) /* Filling WS linked list */ { rn->wsRing->wsIP = format_IP(k_str()); <=== old code rn->wsRing->wsIP = k_str(); <=== new code if (rn->wsRing->wsIP == NULL) exit(-2); tmpWord = k_str(); rn->wsRing->wsPort = (char *) calloc(1, strlen(tmpWord) + 1); strcpy(rn->wsRing->wsPort, tmpWord) ; rn->WS_num++; rn->wsRing->next = (struct WS_ring *) calloc(1, sizeof (struct WS_ring )); rn->wsRing = rn->wsRing->next; rn->wsRing->wsIP = (char *) NULL; rn->wsRing->wsPort = (char *) NULL; rn->wsRing->next = (struct WS_ring *) NULL; }

The comments for the change are:

**  Revision 1.2  2019/01/15 23:15:00  alexander
**  Removed use and function 'format_IP()' as addresses are handled by wsAppendMenu 

The error is caused by the removal of the call to function format_IP(), which returned a copy of the k_str() value to the caller.

k_str() values are ephemeral.  What is missing after the change is code to create a copy of the WaveServer IP address.  The new code should have been something like:

/*5*/ else if( k_its("WaveServer") )  /* Filling WS linked list */
{
tmpWord = k_str();
if (tmpWord == NULL)
exit(-2);
rn->wsRing->wsIP = (char *) calloc(1, strlen(tmpWord) + 1);
strcpy(rn->wsRing->wsIP, tmpWord) ;
tmpWord = k_str();
rn->wsRing->wsPort = (char *) calloc(1, strlen(tmpWord) + 1);
strcpy(rn->wsRing->wsPort, tmpWord) ;
rn->WS_num++;
rn->wsRing->next = (struct WS_ring *) calloc(1, sizeof (struct WS_ring ));
rn->wsRing = rn->wsRing->next;
rn->wsRing->wsIP = (char *) NULL;
rn->wsRing->wsPort = (char *) NULL;
rn->wsRing->next = (struct WS_ring *) NULL;
}

The format_IP() function was removed by the same change.  format_IP() was global, but apparently was not used by any other module.  Someone should look for other instances where a copy of the k_str() string needs to be allocated/deallocated.

Larry Baker

unread,
Mar 22, 2024, 5:11:55 PMMar 22
to roderick...@gmail.com, Larry Baker, jim....@earthscope.org, Stefan Lisowski, Earthworm Community Forum
And, thank you, Rod, for including your ew2mseed log file in your original post back in 2020.  That was critical to finding the error.

Paul Friberg

unread,
Mar 22, 2024, 9:22:27 PMMar 22
to Earthworm Community Forum
Larry, 

Please open a ticket with this bug in GitLab and we'll get it fixed. 

Paul

Larry Baker

unread,
Mar 22, 2024, 10:05:20 PMMar 22
to Larry Baker, roderick...@gmail.com, jim....@earthscope.org, Paul Friberg, Stefan Lisowski, Earthworm Community Forum
I just opened Issue #183, ew2mseed fails to open connections to WaveServers in EW 7.10.

I added a note there that my proposed fix is still wrong in that it does not check whether the calloc()'s fail.  I posted what looks to me like a safe implementation of strdup() from https://stackoverflow.com/questions/252782/strdup-what-does-it-do-in-c.  If Earthworm does not already have ew_strdup() and ew_strndup() functions, those seem obviously useful here and elsewhere.  (Until Standard C adds strdup() and strndup(), and Microsoft decides to add it to MSVC.  They have declined to add other Standard C features that I would have liked to use, so there is no telling whether EW could use them in the future.)

Stefan Lisowski

unread,
Mar 25, 2024, 11:53:05 AMMar 25
to Larry Baker, Stefan Mertl, roderick...@gmail.com, jim....@earthscope.org, Paul Friberg, Earthworm Community Forum
Stefan Mertl has implemented the fix suggested by Larry; Jim and Roderick, can you test?

I've temporarily uploaded Ubuntu 22 and Rocky 8 binaries here:


I couldn't do a full build of Earthworm on the Ubuntu 19 OS as it is EOL and I didn't see the apt fortran compiler, but I was able to just build ew2mseed so  you can try that Roderick if you don't have a newer Ubuntu: http://earthwormcentral.com/distribution/ew2mseed_ubuntu19 

To follow ISTI news and updates please subscribe to our newsletter "the isti letter" at  https://www.isti.com/newsletter-sign-up.

Jim Riley

unread,
Mar 28, 2024, 11:25:07 PMMar 28
to s.lis...@isti.com, Larry Baker, Stefan Mertl, roderick...@gmail.com, Paul Friberg, Earthworm Community Forum
Hello Stefan and Larry,

Thank you so much for your efforts! It is much appreciated.

I can report success that your Rocky 8 build works on amazonlinux (latest). http://earthwormcentral.com/distribution/earthworm_7.11.git183-rocky8-bin.tar.gz

Let me know when an official distribution is available and I will use it in our Docker builds.

Cheers,
Jim
Reply all
Reply to author
Forward
Message has been deleted
0 new messages