"Unable to attach to shared memory: Invalid argument" using onmonitor on Fedora
Posted in 2012
Topics: Installation, Setup & Upgrades, Storage & Space Management, Stored Procedures & SPL, Server Administration, Licensing & Editions, Migration, Import/Export & Data Conversion, Platform-Specific Issues
(IDS 11.70.UC4IE Innovator-C, Fedora Linux 16, IBM thinkpad Laptop
running a Centrino2 Vpro)
Having been asked to try Innovator-C on Fedora (now they tell me,
after getting a nice stable system running on Ubuntu...) and having no
real issues setting it all up, I now have a server configured and a
dummy of our production database on it, nicely set up with several
dbspaces and so on. Only thing is, I can't use Onmonitor as a standard
(non-group informix) user, getting the above error message; and as
user 'informix', Onmonitor starts up and I can access onmonitor but it
displays "Off-Line" on the information line and I can't access the
"Status", "Dbspaces", "Force-Ckpt" or "Logical-Logs" options (getting
the same error message).
Weird thing is, I'd done a configuration using the Onmonitor
"Parameters"/"Initialize" route with no errors, and I can similarly
use the Onmonitor "Mode"/"Startup" etc options again with no problem.
"onstat -" on the command- ine shows "On-Line", and all the onstat/
onmode/onspaces/dbaccess etc etc commands work with no errors.
I've tried running it with RESIDENT set to 1,0 and -1 all with the
same result; SHMBASE is set to 0X44000000L as in the machine notes
(all the other SHM setting in ONCONFIG and the Fedora kernel meet or
exceed the recommended values).
Nothing looks untoward in onstat -g seg (the R, V and M portions are
all present and correct) or onstat -g glo; ipcs shows all shared
memory segments allocated to informix are owned by root with perms 660
(and the Resident portion is marked as 'locked').
The same happens whether I connect via shm (NETTYPE ipcshm 1,50,CPU)
or tcp (NETTYPE soctcp,1,50,NET).
I installed as a root user and all the $INFORMIXDIR/bin/on* commands
are owner root, group informix in the case of onmode, oninit, and some
others and owner/group informix in the case of onmonitor, onparams,
onspaces, onload, onlog and a few more. Most are mode rwsr-sr-x apart
from oninit which is rwsr-sr--.
The engine was started under user 'informix' but the same things
happen if I bring it up as 'root'.
I spotted some old threads mentioning the same issue but as to parsing
the output of 'truss' "to determine if the results are sensible or
not", well...
I hope I've covered all the bases here; anyone have any clues for me?
To all intents and purposes the system works, it's just the onmonitor
problems that are a pain!
Malcolm:
I'm going to shout, not because you need to be shouted at, but because
everyone needs to 'hear' this:
*YOU MUST NEVER USE ONMONITOR FOR ANY VERSION OF INFORMIX LATER THAN 9.40.
IT WILL MESS UP YOUR ONCONFIG FILE!*
Instead just edit the ONCONFIG file manually (parameters are now well
documented in the file itself), use the commandline tools (onparams,
onspaces, onmode, oninit, etc.), use the Admin API functions, or use OAT or
AGS's Server Studio, but never use onmonitor. It will likely go away soon
because it causes so many problems for support (or rather for people who
end up needing support)! It should have been deprecated in v10.00.
My suggestion: If you can start the engine successfully using "oninit -v"
do so and rename onmonitor to "Please_Do_Not_Use_Me.onmonitor" as a
reminder. If the engine won't even start up using oninit, then copy a
fresh clean ONCONFIG file from onconfig.std and start all over again to
configure it manually. Really!
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Mon, Mar 5, 2012 at 6:30 AM, Malc P <malcrp@googlemail.com> wrote:
> (IDS 11.70.UC4IE Innovator-C, Fedora Linux 16, IBM thinkpad Laptop
> running a Centrino2 Vpro)
> Having been asked to try Innovator-C on Fedora (now they tell me,
> after getting a nice stable system running on Ubuntu...) and having no
> real issues setting it all up, I now have a server configured and a
> dummy of our production database on it, nicely set up with several
> dbspaces and so on. Only thing is, I can't use Onmonitor as a standard
> (non-group informix) user, getting the above error message; and as
> user 'informix', Onmonitor starts up and I can access onmonitor but it
> displays "Off-Line" on the information line and I can't access the
> "Status", "Dbspaces", "Force-Ckpt" or "Logical-Logs" options (getting
> the same error message).
> Weird thing is, I'd done a configuration using the Onmonitor
> "Parameters"/"Initialize" route with no errors, and I can similarly
> use the Onmonitor "Mode"/"Startup" etc options again with no problem.
> "onstat -" on the command- ine shows "On-Line", and all the onstat/
> onmode/onspaces/dbaccess etc etc commands work with no errors.
> I've tried running it with RESIDENT set to 1,0 and -1 all with the
> same result; SHMBASE is set to 0X44000000L as in the machine notes
> (all the other SHM setting in ONCONFIG and the Fedora kernel meet or
> exceed the recommended values).
> Nothing looks untoward in onstat -g seg (the R, V and M portions are
> all present and correct) or onstat -g glo; ipcs shows all shared
> memory segments allocated to informix are owned by root with perms 660
> (and the Resident portion is marked as 'locked').
> The same happens whether I connect via shm (NETTYPE ipcshm 1,50,CPU)
> or tcp (NETTYPE soctcp,1,50,NET).
> I installed as a root user and all the $INFORMIXDIR/bin/on* commands
> are owner root, group informix in the case of onmode, oninit, and some
> others and owner/group informix in the case of onmonitor, onparams,
> onspaces, onload, onlog and a few more. Most are mode rwsr-sr-x apart
> from oninit which is rwsr-sr--.
> The engine was started under user 'informix' but the same things
> happen if I bring it up as 'root'.
>
> I spotted some old threads mentioning the same issue but as to parsing
> the output of 'truss' "to determine if the results are sensible or
> not", well...
> I hope I've covered all the bases here; anyone have any clues for me?
> To all intents and purposes the system works, it's just the onmonitor
> problems that are a pain!
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>
On Monday, March 5, 2012 11:50:14 AM UTC, Art S. Kagel wrote:
> Malcolm:
>
> I'm going to shout, not because you need to be shouted at, but because everyone needs to 'hear' this:
>
> <b>YOU MUST NEVER USE ONMONITOR FOR ANY VERSION OF INFORMIX LATER THAN 9.40.
> IT WILL MESS UP YOUR ONCONFIG FILE!</b>
>
>
>
Owwwwww my ears!
OK point taken - and yes, I configured the whole thing with onspaces et al anyway, but onmonitor is a handy shortcut sometimes when you can't immediately recall all the command-line switches (some of us are approaching senility quicker than we'd like); and I'd always use oninit -v/onmode -uck for cycling the engine.
OK, but you did mention onmonitor and several ONCONFIG parameters in the
same post. The one time you use onmonitor to change a single parameter can
muck up your ONCONFIG all to hell. Onmonitor does not "edit" the onconfig
file. It parses the file for parameters that it recognizes and loads them
into memory. If you ask it to change something it rewrites the entire file
using its own internal template which has not been updated probably since
7.30/9.20 so it will simply wipe out any parameters that did not exist to
that point in time. I won't even use onmonitor to change LTAPEDEV anymore
because of that, even though there is no other way to make that change in
memory without bouncing the instance.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Mon, Mar 5, 2012 at 7:05 AM, Malc P <malcrp@googlemail.com> wrote:
> On Monday, March 5, 2012 11:50:14 AM UTC, Art S. Kagel wrote:
> > Malcolm:
> >
> > I'm going to shout, not because you need to be shouted at, but
> because everyone needs to 'hear' this:
> >
> > <b>YOU MUST NEVER USE ONMONITOR FOR ANY VERSION OF INFORMIX LATER THAN
> 9.40.
> > IT WILL MESS UP YOUR ONCONFIG FILE!</b>
> >
> >
> >
> Owwwwww my ears!
> OK point taken - and yes, I configured the whole thing with onspaces et al
> anyway, but onmonitor is a handy shortcut sometimes when you can't
> immediately recall all the command-line switches (some of us are
> approaching senility quicker than we'd like); and I'd always use oninit
> -v/onmode -uck for cycling the engine.
>
>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>
Well, apart from the issue of whether or not onmonitor is stable or not, I can't find a mention (with an albeit perfunctory search) on the IBM Informix pages that onmonitor is or is due to be deprecated...but whatever, the fact that I get the "Unable to attach..." error when installing the very same tarball (the RHEL download) on Ubuntu didn't invoke the same problem is still giving me pause to worry if there's something somewhere in my installation that is wrong. Nothing else seems broken (yet) but I also haven't (yet) tried to do anything clever with the installation above and beyond creating a database and connecting to it. I was just wondering if any bells were being rung in the dim deep recesses of anyone's brains?
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g