Using node-mwire on ArchLinux

77 views
Skip to first unread message

RedDevil

unread,
Dec 3, 2011, 5:30:10 PM12/3/11
to M/DB Community Forum
Hi Guys,
I have been reading up on M/DB and the more recent Node.js
developments. I am mainly an ArchLinux user and would love to
experiment with these great products. So far I have not had much luck
in installing GT.M and the other M/DB software. I have read about the
Ubuntu installer and I will give that a go if all else fails. So my
question is what are the prerequisites needed to set up such a system
and is there any guidance available?

K.S. Bhaskar

unread,
Dec 4, 2011, 11:34:53 AM12/4/11
to mdb-commu...@googlegroups.com
We might be able to help you more if you provided details of error
messages you are seeing when installing GT.M. I have no experience
with Arch Linux, but knowing the error message(s) would be a place to
start.

Regards
-- Bhaskar

> --
> You received this message because you are subscribed to the Google Groups "M/DB Community Forum" group.
> To post to this group, send an email to mdb-commu...@googlegroups.com.
> To unsubscribe from this group, send email to mdb-community-f...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mdb-community-forum?hl=en-GB.
>

--
Windows does to computers what smoking does to humans

RedDevil

unread,
Dec 4, 2011, 8:17:43 PM12/4/11
to M/DB Community Forum
Thanks Bhaskar,

Error: ./geteuid: error while loading shared libraries: libelf.so.1:
cannot open shared object file: No such file or directory

libelf was not installed so I compiled libelf.so.0.8.9 and created a
link from libelf.so.1 in the /usr/lib directory. Still configure can
not find the library.
Regards

> > For more options, visit this group athttp://groups.google.com/group/mdb-community-forum?hl=en-GB.

K.S. Bhaskar

unread,
Dec 4, 2011, 9:00:31 PM12/4/11
to mdb-commu...@googlegroups.com
I presume you are trying to load a 32-bit GT.M on a 64-bit Linux.
Either switch to a 64-bit GT.M or load the 32-bit libraries and try
again.

Regards
-- Bhaskar

> For more options, visit this group at http://groups.google.com/group/mdb-community-forum?hl=en-GB.

RedDevil

unread,
Dec 4, 2011, 9:39:57 PM12/4/11
to M/DB Community Forum
I think I am back on track. Had to install elfutils package and GT.M
installed correctly. Now I will keep working on node-mwire.
Thanks for being responsive - I will let you know how I go. BTW I an
installing to 64 bit ArchLinux. Regards RD.

RedDevil

unread,
Dec 4, 2011, 11:27:53 PM12/4/11
to M/DB Community Forum
Now Having trouble connecting to GT.M when running the 'Test1.js'
script in node-mwire. Getting the following error:

node.js:201
throw e; // process.nextTick error, or 'error' event on first
tick
^
Error: connect ECONNREFUSED
at errnoException (net.js:614:11)
at Object.afterConnect [as oncomplete] (net.js:605:18)

I think GT.M is running OK, but I am not sure. Here is the start up
info:

[rick@pluto ~]$ sudo gtm
Password:
%GDE-I-GDUSEDEFS, Using defaults for Global Directory
/root/.fis-gtm/V5.4-002B_x86_64/g/gtm.gld

GDE>
%GDE-I-EXECOM, Executing command file /usr/local/gtm/gdedefaults

GDE>
%GDE-I-VERIFY, Verification OK

%GDE-I-GDCREATE, Creating Global Directory file
/root/.fis-gtm/V5.4-002B_x86_64/g/gtm.gld
Created file /root/.fis-gtm/V5.4-002B_x86_64/g/gtm.dat
%GTM-I-JNLCREATE, Journal file /root/.fis-gtm/V5.4-002B_x86_64/g/
gtm.mjl created for region DEFAULT with BEFORE_IMAGES
%GTM-I-JNLSTATE, Journaling state for region DEFAULT is now ON

I will keep trying and any assistance would be much appreciated. RD

K.S. Bhaskar

unread,
Dec 5, 2011, 7:24:15 AM12/5/11
to mdb-commu...@googlegroups.com
I am curious as to why you are running GT.M as root. It's a bad
habit. But the GT.M part appears to be OK.

> --
> You received this message because you are subscribed to the Google Groups "M/DB Community Forum" group.
> To post to this group, send an email to mdb-commu...@googlegroups.com.
> To unsubscribe from this group, send email to mdb-community-f...@googlegroups.com.

> For more options, visit this group at http://groups.google.com/group/mdb-community-forum?hl=en-GB.

RedDevil

unread,
Dec 5, 2011, 2:30:58 PM12/5/11
to M/DB Community Forum
I must have set GT.M up as root as I got the following error while
starting an normal user:
 [rick@pluto ~]$ gtm/usr/local/gtm/gtm: line 17: /
rick_20111205192400UTC_mupip_recover: Permission denied
So I just SUDO to get things moving.  Could this be the reason for the
'connect ECONNREFUSED' error?
> > For more options, visit this group athttp://groups.google.com/group/mdb-community-forum?hl=en-GB.

K.S. Bhaskar

unread,
Dec 5, 2011, 3:06:17 PM12/5/11
to mdb-commu...@googlegroups.com
No idea. ECONNREFUSED is not a GT.M error.

Regards
-- Bhaskar

> For more options, visit this group at http://groups.google.com/group/mdb-community-forum?hl=en-GB.

RedDevil

unread,
Dec 6, 2011, 7:16:45 AM12/6/11
to M/DB Community Forum
Fixed that one - I failed to start xinitd. Making progress but not
sure what this is telling me:

[rick@pluto ~]$ gtm &
[3] 1533
[rick@pluto ~]$ telnet 127.0.0.1 6330
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.


%GDE-I-GDUSEDEFS, Using defaults for Global Directory

/.fis-gtm/V5.4-002B_x86_64/g/gtm.gld
%GTM-E-STACKCRIT, Stack space critical
%GTM-E-ERRWIOEXC, Error while processing I/O exception string
%GTM-E-STACKCRIT, Stack space critical
%GTM-E-ERRWETRAP, Error while processing $ETRAP
stty: standard input: Inappropriate ioctl for device
%GTM-E-ZGBLDIRACC, Cannot access global directory /.fis-gtm/
V5.4-002B_x86_64/g/gtm.gld. Cannot continue.
%SYSTEM-E-ENO2, No such file or directory
%GTM-E-ZGBLDIRACC, Cannot access global directory /.fis-gtm/
V5.4-002B_x86_64/g/gtm.gld. Cannot continue.
%SYSTEM-E-ENO2, No such file or directory
%GTM-E-ZLINKFILE, Error while zlinking "zmwire"
%GTM-E-FILENOTFND, File zmwire not found
Connection closed by foreign host.

[3]+ Stopped gtm

Any clues? Thanks. RD

Rob Tweed

unread,
Dec 6, 2011, 7:57:51 AM12/6/11
to mdb-commu...@googlegroups.com
Looks like you maybe haven't got the M/Wire xinetd files saved in the right place or configured correctly

You probably need to edit the path in the file "/etc/xinetd.d/mwire" (which is invoked by your xinetd config) to correctly point to the zmwire file

By default it's set to:

server      = /usr/local/gtm/zmwire

So edit that to match your configuration if required.

Rob

Rob Tweed
Director, M/Gateway Developments Ltd
http://www.mgateway.com
------------------
EWD Mobile: Build mobile applications faster
http://www.mgateway.com/ewd.html

K.S. Bhaskar

unread,
Dec 6, 2011, 10:01:32 AM12/6/11
to mdb-commu...@googlegroups.com
STACKCRIT usually means a defective error trap that recurses for ever
(or at least, till it runs out of stack space).

Regards
-- Bhaskar

> For more options, visit this group at http://groups.google.com/group/mdb-community-forum?hl=en-GB.

RedDevil

unread,
Dec 6, 2011, 8:40:43 PM12/6/11
to M/DB Community Forum
Thanks Rob - I will check tonight. Where does the 'zmwire.m' file
go? Also what is the significance of running the test1.js script from
the .../ewd directory? Rgds.

On Dec 6, 11:57 pm, Rob Tweed <rob.tw...@gmail.com> wrote:
> Looks like you maybe haven't got the M/Wire xinetd files saved in the right
> place or configured correctly
>
> You probably need to edit the path in the file "/etc/xinetd.d/mwire" (which
> is invoked by your xinetd config) to correctly point to the zmwire file
>
> By default it's set to:
>
> server      = /usr/local/gtm/zmwire
>
> So edit that to match your configuration if required.
>
> Rob
>

> Director, M/Gateway Developments Ltdhttp://www.mgateway.com

Mike Clayton

unread,
Dec 6, 2011, 10:53:08 PM12/6/11
to mdb-commu...@googlegroups.com
Actually the zmwire file is a bash script, not an m file. It should look something like this:

#!/bin/bash
cd /usr/local/gtm/ewd
source /usr/local/gtm/gtmprofile
mumps -r command^zmwire

You can place it anywhere really, as long as it can be reached and executed by the xinetd.d config. You may want to place it in /usr/local/gtm, for example, or even in your ewd directory (in which case you won't need the cd command). Just make sure your xinetd.d config points to it correctly. E.g your mwire file in /etc/xinetd.d might look like:

service mwire
{
    disable     = no
    type        = UNLISTED
    port        = 6330
    socket_type = stream
    wait        = no
    user        = root
    server      = /usr/local/gtm/zmwire

Hopefully this will give you all you need,

Mike

> Date: Tue, 6 Dec 2011 17:40:43 -0800
> Subject: [MDB] Re: Using node-mwire on ArchLinux
> From: dick....@gmail.com
> To: mdb-commu...@googlegroups.com

RedDevil

unread,
Dec 6, 2011, 11:11:45 PM12/6/11
to M/DB Community Forum
Thanks Mike. Here is the bit that is confusing me from node-mwire:

To install and configure the M/Wire routines manually in GT.M, you
need just 3 files from the mdb repository:

zmwire.m (the GT.M routine file that does the work)
mwire and zmwire (the xinetd service files)

The comments at the top of the zmwire.m file will tell you how to
install and configure everything. Ignore the paragraph on requiring
MGWSI and m_apache as you won't need these if you're just using node-
mwire.

The zmwire.m file says what to do with the mwire and zmwire files. I
am not sure what to do with the zmwire.m file itself. It is probably
obvious but I haven't got it yet.

On Dec 7, 2:53 pm, Mike Clayton <mike_clay...@hotmail.com> wrote:
> Actually the zmwire file is a bash script, not an m file. It should look something like this:

> #!/bin/bashcd /usr/local/gtm/ewdsource /usr/local/gtm/gtmprofilemumps -r command^zmwire


> You can place it anywhere really, as long as it can be reached and executed by the xinetd.d config. You may want to place it in /usr/local/gtm, for example, or even in your ewd directory (in which case you won't need the cd command). Just make sure your xinetd.d config points to it correctly. E.g your mwire file in /etc/xinetd.d might look like:
> service mwire{    disable     = no    type        = UNLISTED    port        = 6330    socket_type = stream    wait        = no    user        = root    server      = /usr/local/gtm/zmwire}
> Hopefully this will give you all you need,
> Mike
>
> > Date: Tue, 6 Dec 2011 17:40:43 -0800
> > Subject: [MDB] Re: Using node-mwire on ArchLinux

> > From: dick.hal...@gmail.com

Mike Clayton

unread,
Dec 6, 2011, 11:25:36 PM12/6/11
to mdb-commu...@googlegroups.com
OK, sorry that just needs to go where you normally place your M files. The trouble is that it's all so flexible, that depending on your setup, this could be anywhere! :)

Let's just say for this example that your database files mumps.gld and mumps.dat are placed in /usr/local/gtm/ewd.
Your gtmprofile in that directory has the following:

gtmgbldir="mumps.gld"; export gtmgbldir
gtmroutines=". $gtm_dist"; export gtmroutines

So GT.M is going to look for mumps.gld in the current directory and look for routines first in the current directory, and then wherever $gtm_dist is.
Given the above, you could put zmwire.m either in /usr/local/gtm/ewd, or in $gtm_dist. My preference would be the former, so it wouldn't be affected by a GT.M upgrade.
So in this case you could place both zmwire.m and the zmwire bash script in /usr/local/gtm/ewd and change the /etc/xinetd.d/mwire file to point to /usr/local/gtm/ewd/zmwire instead. 

I hope that helps, but if your GT.M setup is considerably different, just post the details here.

Mike

> Date: Tue, 6 Dec 2011 20:11:45 -0800

> Subject: [MDB] Re: Using node-mwire on ArchLinux
Reply all
Reply to author
Forward
0 new messages