Newbie question: fresh default Mac OSX install, co
Posted in 2012
A newcomer installed Informix 11.70 on Mac OS X; dbaccess worked, but JDBC connections (jdbc:informix-sqli://localhost:15222/sysmaster:INFORMIXSERVER=ol_informix1170) failed with 'Connection refused'. Responders checked sqlhosts, /etc/services (the Mac installer used port 15222, not the usual 9088), hostname vs localhost, and suggested using the service name and checking the online.log/netstat. The poster found that only the URL using the full machine hostname with port 15222 connected, and then only intermittently — the server sometimes failed to start with shared-memory allocation errors and later refused all connections even while oninit ran. One reply suggested hung shared memory segments and checking the message log. No resolution is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Connectivity: ODBC / JDBC / .NET, Server Administration, Security, Permissions & Auditing, Networking & sqlhosts Configuration
I have a fresh Informix 11.70 installation on Mac OSX.
I can connect to the sysmaster database using dbaccess, so I know that in
general I've got the system up and running. I haven't done anything other
than simply start the database.
I'm now attempting to hook my JDBC client up to it. I have experience
building Informix JDBC URL strings, so I don't believe I am making a
boneheaded error.
I am getting connection refused errors.
My URL is as follows:
jdbc:informix-sqli://localhost:15222/sysmaster:INFORMIXSERVER=ol_informix1170
I am connecting as user informix with the admin password I set up at
installation time.
Port 15222 is open to all computers on my network according to my firewall.
I have not made any further modifications to /etc/services or
$INFORMIX_HOME/etc/onconfig.ol_informix1170 or
$INFORMIX_HOME/etc/sqlhosts.ol_informix1170.
I would suspect that perhaps TCP connectivity is not enabled (after all,
dbaccess works, but I'm guessing does not use TCP), but I see the following
NETTYPE entries in my onconfig file:
NETTYPE ipcshm,1,50,CPU
NETTYPE onsoctcp,1,150,NET
NETTYPE drsoctcp,1,150,NET
After doing all this research, I find that I'm out of gas. What next?
Best,
Laird
--
http://about.me/lairdnelson
--f46d0444812d9553b104bf745b37
Your sqlhosts would be nice. Are you trying to connect locally or remote?
You're using "localhost" on the URL, so it will only work locally, if you
have a listener on 127.0.0.1.
What is the error you get (on the client side, but more importantly on the
server side - in the online.log - )?
Regards
On Mon, May 7, 2012 at 4:59 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> I have a fresh Informix 11.70 installation on Mac OSX.
>
> I can connect to the sysmaster database using dbaccess, so I know that in
> general I've got the system up and running. I haven't done anything other
> than simply start the database.
>
> I'm now attempting to hook my JDBC client up to it. I have experience
> building Informix JDBC URL strings, so I don't believe I am making a
> boneheaded error.
>
> I am getting connection refused errors.
>
> My URL is as follows:
>
>
> jdbc:informix-sqli://localhost:15222/sysmaster:INFORMIXSERVER=ol_informix1170
>
> I am connecting as user informix with the admin password I set up at
> installation time.
>
> Port 15222 is open to all computers on my network according to my firewall.
>
> I have not made any further modifications to /etc/services or
> $INFORMIX_HOME/etc/onconfig.ol_informix1170 or
> $INFORMIX_HOME/etc/sqlhosts.ol_informix1170.
>
> I would suspect that perhaps TCP connectivity is not enabled (after all,
> dbaccess works, but I'm guessing does not use TCP), but I see the following
> NETTYPE entries in my onconfig file:
>
> NETTYPE ipcshm,1,50,CPU
> NETTYPE onsoctcp,1,150,NET
> NETTYPE drsoctcp,1,150,NET>
> After doing all this research, I find that I'm out of gas. What next?
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>
> --f46d0444812d9553b104bf745b37
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--20cf306f7710130efc04bf7471a5
Is the server configured to listen on port 15222? What is in the sqlhosts
file ($INFORMIXDIR/etc/sqlhosts by default but if the INFORMIXSQLHOSTS
environment variable points to $INFORMIXDIR/etc/sqlhosts.ol_informix1170
then that's where to look)? The default port for Informix if you let the
install script create the instance for you is 9088. In that case your URL
should look like:
jdbc:informix-sqli://localhost:9088/sysmaster:INFORMIXSERVER=ol_informix1170
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, May 7, 2012 at 11:59 AM, Laird Nelson <ljnelson@gmail.com> wrote:
> I have a fresh Informix 11.70 installation on Mac OSX.
>
> I can connect to the sysmaster database using dbaccess, so I know that in
> general I've got the system up and running. I haven't done anything other
> than simply start the database.
>
> I'm now attempting to hook my JDBC client up to it. I have experience
> building Informix JDBC URL strings, so I don't believe I am making a
> boneheaded error.
>
> I am getting connection refused errors.
>
> My URL is as follows:
>
>
> jdbc:informix-sqli://localhost:15222/sysmaster:INFORMIXSERVER=ol_informix1170
>
> I am connecting as user informix with the admin password I set up at
> installation time.
>
> Port 15222 is open to all computers on my network according to my firewall.
>
> I have not made any further modifications to /etc/services or
> $INFORMIX_HOME/etc/onconfig.ol_informix1170 or
> $INFORMIX_HOME/etc/sqlhosts.ol_informix1170.
>
> I would suspect that perhaps TCP connectivity is not enabled (after all,
> dbaccess works, but I'm guessing does not use TCP), but I see the following
> NETTYPE entries in my onconfig file:
>
> NETTYPE ipcshm,1,50,CPU
> NETTYPE onsoctcp,1,150,NET
> NETTYPE drsoctcp,1,150,NET>
> After doing all this research, I find that I'm out of gas. What next?
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>
> --f46d0444812d9553b104bf745b37
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--e89a8ff1c0801ef68404bf7497c1
On Mon, May 7, 2012 at 12:05 PM, Fernando Nunes <domusonline@gmail.com>wrote:
> Your sqlhosts would be nice. Are you trying to connect locally or remote?
>
Locally. As I mentioned in my original message, I didn't change the
sqlhosts from its default settings. Do I need to? I didn't notice
anything in the Informix 11.70 Info Center that implied that I needed to.
I am happy to make these changes.
My sqlhosts.ol_informix1170 looks like this (as the installer generated it):
ol_informix1170 onsoctcp Laird-Nelsons-MacBook-Pro.local ol_informix1170
dr_informix1170 drsoctcp Laird-Nelsons-MacBook-Pro.local dr_informix1170
I have also tried to make my JDBC URL be all of the following combinations,
figuring that this error is network-related, not Informix related:
jdbc:informix-sqli://localhost:15222/sysmaster:INFORMIXSERVER=ol_informix1170
jdbc:informix-sqli://
127.0.0.1:15222/sysmaster:INFORMIXSERVER=ol_informix1170
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:15222/sysmaster:INFORMIXSER
VER=ol_informix1170
...which result in the same error.
> What is the error you get (on the client side, but more importantly on the
> server side - in the online.log - )?
>
Thank you for the pointer to the online.log file. I have no such file. I
do have an etc/ol_informix1170.log file. Its contents (snipped) are as
follows:
11:47:42 Checkpoint Completed: duration was 0 seconds.
11:47:42 Mon May 7 - loguniq 9, logpos 0x272018, timestamp: 0x285a7
Interval: 43
11:47:42 Maximum server connections 1
11:47:42 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked
0, Plog used 2, Llog used 2
12:02:43 Checkpoint Completed: duration was 0 seconds.
12:02:43 Mon May 7 - loguniq 9, logpos 0x274018, timestamp: 0x285b6
Interval: 44
12:02:43 Maximum server connections 1
12:02:43 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked
0, Plog used 2, Llog used 2
I selected the last 8 rows after making another (failed) connection attempt
at 12:12 PM local time. You can see that this connection attempt was not
reflected in this log file. Perhaps there is another one you are referring
to.
On the client side it's a Java stack trace, that is ultimately caused by:
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at com.informix.asf.Connection.openSocket(Connection.java:1906)
The Informix message string coming back is:
com.informix.asf.IfxASFException: Attempt to connect to database server
(ol_informix1170) failed.
There are no Mac console log (syslog) messages that have anything to do
with Informix, either.
Thanks for your prompt response and willingness to help.
Best,
Laird
--
http://about.me/lairdnelson
--0016e6d626506dfb2b04bf749715
OK, first, unless localhost and Laird-Nelsons-MacBook-Pro.local are mapped
to the same address in /etc/hosts, you will have to use the longer hostname
(you may not have to domain qualify it, just 'local' may work, depending on
how your domain is defined). Second, the service name for SQLI protocol
connections is 'ol_informix1170' and for DRDA protocol connections is
'dr_informix1170'. Your Java URL is specifying a SQLI type connection so
that is the service or port you need to use. What is the port number
assigned to service ol_informix1170 in /etc/services? Did you try using
the service name rather than a port number in the URL? So:
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:ol_informix1170/sysmaster:I
NFORMIXSERVER=ol_informix1170
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, May 7, 2012 at 12:16 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> On Mon, May 7, 2012 at 12:05 PM, Fernando Nunes <domusonline@gmail.com
> >wrote:
>
> > Your sqlhosts would be nice. Are you trying to connect locally or remote?
> >
>
> Locally. As I mentioned in my original message, I didn't change the
> sqlhosts from its default settings. Do I need to? I didn't notice
> anything in the Informix 11.70 Info Center that implied that I needed to.
> I am happy to make these changes.
>
> My sqlhosts.ol_informix1170 looks like this (as the installer generated
> it):
>
> ol_informix1170 onsoctcp Laird-Nelsons-MacBook-Pro.local ol_informix1170
> dr_informix1170 drsoctcp Laird-Nelsons-MacBook-Pro.local dr_informix1170>
> I have also tried to make my JDBC URL be all of the following combinations,
> figuring that this error is network-related, not Informix related:
>
>
> jdbc:informix-sqli://localhost:15222/sysmaster:INFORMIXSERVER=ol_informix1170
> jdbc:informix-sqli://
> 127.0.0.1:15222/sysmaster:INFORMIXSERVER=ol_informix1170
>
>
>
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:15222/sysmaster:INFORMIXSER
VER=ol_informix1170
>
> ....which result in the same error.
>
> > What is the error you get (on the client side, but more importantly on
> the
> > server side - in the online.log - )?
> >
>
> Thank you for the pointer to the online.log file. I have no such file. I
> do have an etc/ol_informix1170.log file. Its contents (snipped) are as
> follows:
>
> 11:47:42 Checkpoint Completed: duration was 0 seconds.
> 11:47:42 Mon May 7 - loguniq 9, logpos 0x272018, timestamp: 0x285a7
> Interval: 43
>
> 11:47:42 Maximum server connections 1
> 11:47:42 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked
> 0, Plog used 2, Llog used 2
>
> 12:02:43 Checkpoint Completed: duration was 0 seconds.
> 12:02:43 Mon May 7 - loguniq 9, logpos 0x274018, timestamp: 0x285b6
> Interval: 44
>
> 12:02:43 Maximum server connections 1
> 12:02:43 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked
> 0, Plog used 2, Llog used 2
>
> I selected the last 8 rows after making another (failed) connection attempt
> at 12:12 PM local time. You can see that this connection attempt was not
> reflected in this log file. Perhaps there is another one you are referring
> to.
>
> On the client side it's a Java stack trace, that is ultimately caused by:
>
> Caused by: java.net.ConnectException: Connection refused
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
> at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
> at java.net.Socket.connect(Socket.java:529)
> at java.net.Socket.connect(Socket.java:478)
> at java.net.Socket.<init>(Socket.java:375)
> at java.net.Socket.<init>(Socket.java:189)
> at com.informix.asf.Connection.openSocket(Connection.java:1906)
>
> The Informix message string coming back is:
>
> com.informix.asf.IfxASFException: Attempt to connect to database server
> (ol_informix1170) failed.
>
> There are no Mac console log (syslog) messages that have anything to do
> with Informix, either.
>
> Thanks for your prompt response and willingness to help.
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>
> --0016e6d626506dfb2b04bf749715
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--047d7b2e093969eda304bf74bb72
On Mon, May 7, 2012 at 12:16 PM, Art Kagel <art.kagel@gmail.com> wrote:
> Is the server configured to listen on port 15222? What is in the sqlhosts
> file ($INFORMIXDIR/etc/sqlhosts by default but if the INFORMIXSQLHOSTS
> environment variable points to $INFORMIXDIR/etc/sqlhosts.ol_informix1170
> then that's where to look)?
Thanks, Art, for your prompt response and willingness to help. This is a
subject I've always been unclear on when dealing with Informix JDBC URLs.
Obviously, for a TCP connection coming in from outer space, there is no
such thing as an environment variable from the client's perspective. The
server answering the phone may of course have an environment variable. I
have done nothing in addition to whatever the installer did to set
environment variables. I *did* start the database up having run the
ol_informix1170.ksh command as user informix, and *did* verify that all
those variables showed up in an "env" listing afterwards. In this case an
"env | sort" listing (trimmed and edited) looks like this:
bash-3.2$ env | sort
[snip]
HOME=/Users/informix
INFORMIXDIR=/Applications/IBM/informix
INFORMIXSERVER=ol_informix1170
INFORMIXSQLHOSTS=/Applications/IBM/informix/etc/sqlhosts.ol_informix1170LANG=en_US.UTF-8
[snip]
LOGNAME=ljnelson
OLDPWD=/Applications/IBM
ONCONFIG=onconfig.ol_informix1170
PATH=/Applications/IBM/informix/bin:/Applications/IBM/informix/extend/krakatoa/jre/bin:/opt/subversion/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/loc
al/git/bin:/usr/local/glassfish/glassfish/bin:/usr/local/MacGPG2/bin:/usr/X11/bi
n:~/bin
PWD=/Applications/IBM/informix
SHELL=/bin/bash
SHLVL=2
SSH_AUTH_SOCK=/tmp/launch-fxcY5G/Listeners
TERM=xterm-color
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=273.1
USER=informix
_=/usr/bin/env
_JAVA_OPTIONS=-Dfile.encoding=UTF-8
__CF_USER_TEXT_ENCODING=0x1F5:0:0
Now, I haven't added anything to my URL string to supply any of these kinds
of environment variable equivalents (I know you can override some of these
settings by setting JDBC properties with the same name; INFORMIXSERVER is
the most obvious such property, which as you can see from my prior messages
I did set).
> The default port for Informix if you let the
> install script create the instance for you is 9088. In that case your URL
> should look like:
>
>
> jdbc:informix-sqli://localhost:9088/sysmaster:INFORMIXSERVER=ol_informix1170
>
Thank you; I'll try that. What is port 15222 used for? So that perhaps
documentation for idiot newbies like me can be updated, I figured that
since the sqlhosts file specified a TCP service name, I'd trace that, and
find what the port number should be. When I did that, I found 15222 in
there. I see now that an IANA registration for 9088 is in there as well,
but there doesn't seem to be any indication that I can find anywhere that
my Informix installation is set up to use that port. Perhaps that is
because 9088 is its default if none other is specified?
Thanks,
Laird
--
http://about.me/lairdnelson
--f46d0444812d043f4d04bf74bf4b
I never used a Mac. But from your SQLHOSTS:
ol_informix1170 onsoctcp Laird-Nelsons-MacBook-Pro.local ol_informix1170
dr_informix1170 drsoctcp Laird-Nelsons-MacBook-Pro.local dr_informix1170
You should have two listeners on the IP address pointed by
"Laird-Nelsons-MacBook-Pro.local" on the TCP port pointed by
"ol_informix1170" and "dr_informix1170"
Since you're using port names they should be mapped in /etc/services. Can
you check?
The error looks like your client is trying to connect to another place
(IP/port).
Also, do you have something like:
"netstat -an | grep LISTEN" on MAC? I assume you do, so it could be a way
to match it.
On Mon, May 7, 2012 at 5:16 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> On Mon, May 7, 2012 at 12:05 PM, Fernando Nunes <domusonline@gmail.com
> >wrote:
>
> > Your sqlhosts would be nice. Are you trying to connect locally or remote?
> >
>
> Locally. As I mentioned in my original message, I didn't change the
> sqlhosts from its default settings. Do I need to? I didn't notice
> anything in the Informix 11.70 Info Center that implied that I needed to.
> I am happy to make these changes.
>
> My sqlhosts.ol_informix1170 looks like this (as the installer generated
> it):
>
> ol_informix1170 onsoctcp Laird-Nelsons-MacBook-Pro.local ol_informix1170
> dr_informix1170 drsoctcp Laird-Nelsons-MacBook-Pro.local dr_informix1170>
> I have also tried to make my JDBC URL be all of the following combinations,
> figuring that this error is network-related, not Informix related:
>
>
> jdbc:informix-sqli://localhost:15222/sysmaster:INFORMIXSERVER=ol_informix1170
> jdbc:informix-sqli://
> 127.0.0.1:15222/sysmaster:INFORMIXSERVER=ol_informix1170
>
>
>
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:15222/sysmaster:INFORMIXSER
VER=ol_informix1170
>
> ....which result in the same error.
>
> > What is the error you get (on the client side, but more importantly on
> the
> > server side - in the online.log - )?
> >
>
> Thank you for the pointer to the online.log file. I have no such file. I
> do have an etc/ol_informix1170.log file. Its contents (snipped) are as
> follows:
>
> 11:47:42 Checkpoint Completed: duration was 0 seconds.
> 11:47:42 Mon May 7 - loguniq 9, logpos 0x272018, timestamp: 0x285a7
> Interval: 43
>
> 11:47:42 Maximum server connections 1
> 11:47:42 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked
> 0, Plog used 2, Llog used 2
>
> 12:02:43 Checkpoint Completed: duration was 0 seconds.
> 12:02:43 Mon May 7 - loguniq 9, logpos 0x274018, timestamp: 0x285b6
> Interval: 44
>
> 12:02:43 Maximum server connections 1
> 12:02:43 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked
> 0, Plog used 2, Llog used 2
>
> I selected the last 8 rows after making another (failed) connection attempt
> at 12:12 PM local time. You can see that this connection attempt was not
> reflected in this log file. Perhaps there is another one you are referring
> to.
>
> On the client side it's a Java stack trace, that is ultimately caused by:
>
> Caused by: java.net.ConnectException: Connection refused
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
> at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
> at java.net.Socket.connect(Socket.java:529)
> at java.net.Socket.connect(Socket.java:478)
> at java.net.Socket.<init>(Socket.java:375)
> at java.net.Socket.<init>(Socket.java:189)
> at com.informix.asf.Connection.openSocket(Connection.java:1906)
>
> The Informix message string coming back is:
>
> com.informix.asf.IfxASFException: Attempt to connect to database server
> (ol_informix1170) failed.
>
> There are no Mac console log (syslog) messages that have anything to do
> with Informix, either.
>
> Thanks for your prompt response and willingness to help.
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>
> --0016e6d626506dfb2b04bf749715
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--00248c711badd5d62e04bf74bdad
On Mon, May 7, 2012 at 12:27 PM, Fernando Nunes <domusonline@gmail.com>wrote:
> I never used a Mac. But from your SQLHOSTS:
>
> ol_informix1170 onsoctcp Laird-Nelsons-MacBook-Pro.local ol_informix1170
> dr_informix1170 drsoctcp Laird-Nelsons-MacBook-Pro.local dr_informix1170>
> You should have two listeners on the IP address pointed by
> "Laird-Nelsons-MacBook-Pro.local" on the TCP port pointed by
> "ol_informix1170" and "dr_informix1170"
> Since you're using port names they should be mapped in /etc/services. Can
> you check?
>
Yes; /etc/services has:
ol_informix1170 15222/tcp
dr_informix1170 9521/tcp
...which was where I got the 15222 number. (I don't know what
dr_informix1170 is; I don't see any configuration files that match up to
this name, so I've put it out of my head for now.)
Following Art's advice, I tried blindly changing my port number in my JDBC
URL to 9088, which is also present in /etc/services:
sqlexec 9088/tcp # IBM Informix SQL
Interface
This didn't work either. (I've also verified that port 9088 is open on my
firewall.)
Best,
Laird
--
http://about.me/lairdnelson
--e89a8f2356f79a6e8804bf74ebce
On Mon, May 7, 2012 at 12:26 PM, Art Kagel <art.kagel@gmail.com> wrote: > OK, first, unless localhost and Laird-Nelsons-MacBook-Pro.local are mapped > to the same address in /etc/hosts, you will have to use the longer hostname > (you may not have to domain qualify it, just 'local' may work, depending on > how your domain is defined). Second, the service name for SQLI protocol > connections is 'ol_informix1170' and for DRDA protocol connections is > 'dr_informix1170'. Your Java URL is specifying a SQLI type connection so > that is the service or port you need to use. What is the port number > assigned to service ol_informix1170 in /etc/services? Did you try using > the service name rather than a port number in the URL? So: > > > > jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:ol_informix1170/sysmaster:I NFORMIXSERVER=ol_informix1170 > Thanks for the idea, Art. I tried that (it certainly makes sense) and it failed in the same manner. Best, Laird -- http://about.me/lairdnelson --f46d044288745b5cec04bf74f1aa
OK, so the port really IS 15222 according to the /etc/services entry (odd
that the MAC version of the installer doesn't use the 'usual' port <sigh>.
Your original URL should be working in that case... Not a Java guy, but
I've configured a few for clients and this one looks right to me with the
port and address issues put asside.
Just one more 'dumb' question: Is the Java client program running on the
same machine so that localhost is a valid address or is it running on a
separate box?
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, May 7, 2012 at 12:27 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> On Mon, May 7, 2012 at 12:16 PM, Art Kagel <art.kagel@gmail.com> wrote:
>
> > Is the server configured to listen on port 15222? What is in the sqlhosts
> > file ($INFORMIXDIR/etc/sqlhosts by default but if the INFORMIXSQLHOSTS
> > environment variable points to $INFORMIXDIR/etc/sqlhosts.ol_informix1170
> > then that's where to look)?
>
> Thanks, Art, for your prompt response and willingness to help. This is a
> subject I've always been unclear on when dealing with Informix JDBC URLs.
>
> Obviously, for a TCP connection coming in from outer space, there is no
> such thing as an environment variable from the client's perspective. The
> server answering the phone may of course have an environment variable. I
> have done nothing in addition to whatever the installer did to set
> environment variables. I *did* start the database up having run the
> ol_informix1170.ksh command as user informix, and *did* verify that all
> those variables showed up in an "env" listing afterwards. In this case an
> "env | sort" listing (trimmed and edited) looks like this:
>
> bash-3.2$ env | sort
> [snip]
> HOME=/Users/informix
> INFORMIXDIR=/Applications/IBM/informix
> INFORMIXSERVER=ol_informix1170
> INFORMIXSQLHOSTS=/Applications/IBM/informix/etc/sqlhosts.ol_informix1170> LANG=en_US.UTF-8
> [snip]
> LOGNAME=ljnelson
> OLDPWD=/Applications/IBM
> ONCONFIG=onconfig.ol_informix1170>
>
>
PATH=/Applications/IBM/informix/bin:/Applications/IBM/informix/extend/krakatoa/jre/bin:/opt/subversion/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/loc
al/git/bin:/usr/local/glassfish/glassfish/bin:/usr/local/MacGPG2/bin:/usr/X11/bi
n:~/bin
> PWD=/Applications/IBM/informix
> SHELL=/bin/bash
> SHLVL=2
> SSH_AUTH_SOCK=/tmp/launch-fxcY5G/Listeners
> TERM=xterm-color
> TERM_PROGRAM=Apple_Terminal
> TERM_PROGRAM_VERSION=273.1
> USER=informix
> _=/usr/bin/env
> _JAVA_OPTIONS=-Dfile.encoding=UTF-8
> __CF_USER_TEXT_ENCODING=0x1F5:0:0
>
> Now, I haven't added anything to my URL string to supply any of these kinds
> of environment variable equivalents (I know you can override some of these
> settings by setting JDBC properties with the same name; INFORMIXSERVER is
> the most obvious such property, which as you can see from my prior messages
> I did set).
>
> > The default port for Informix if you let the
> > install script create the instance for you is 9088. In that case your URL
> > should look like:
> >
> >
> >
> jdbc:informix-sqli://localhost:9088/sysmaster:INFORMIXSERVER=ol_informix1170
> >
>
> Thank you; I'll try that. What is port 15222 used for? So that perhaps
> documentation for idiot newbies like me can be updated, I figured that
> since the sqlhosts file specified a TCP service name, I'd trace that, and
> find what the port number should be. When I did that, I found 15222 in
> there. I see now that an IANA registration for 9088 is in there as well,
> but there doesn't seem to be any indication that I can find anywhere that
> my Informix installation is set up to use that port. Perhaps that is
> because 9088 is its default if none other is specified?
>
> Thanks,
> Laird
>
> --
> http://about.me/lairdnelson
>
> --f46d0444812d043f4d04bf74bf4b
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--047d7b15a90308e98c04bf75211f
On Mon, May 7, 2012 at 12:54 PM, Art Kagel <art.kagel@gmail.com> wrote: > OK, so the port really IS 15222 according to the /etc/services entry (odd > that the MAC version of the installer doesn't use the 'usual' port <sigh>. > Good; I'm not going crazy. :-) > Your original URL should be working in that case... Not a Java guy, but > I've configured a few for clients and this one looks right to me with the > port and address issues put asside. > OK; thanks. > Just one more 'dumb' question: Is the Java client program running on the > same machine so that localhost is a valid address or is it running on a > separate box? > Same box. I experience the same issues on Windows as well, though I'm less confident there that I've got my firewall configured. I'll explore that side of things more deeply. Best, Laird -- http://about.me/lairdnelson --f46d043892ab7d5ad104bf75332c
Aha; this is getting interesting.
I shut down the server with onmode -s (for a graceful shutdown; I
understand this puts the database into "quiescent mode", which seems like a
kind of limbo between online and offline), then with onmode -k. (Or at
least that was my intention, and ps -ef | grep oninit yields no processes.)
If I try to start it back up at this point with oninit -wv (I want it to
wait and be verbose), there is a (periodic) shared memory allocation issue.
If I stop, start, stop, start, then every so often startup will fail, and
other times it will succeed. Most of the time it succeeds.
When I get a clean start, then the only JDBC URL that works is as follows:
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:15222/sysmaster:INFORMIXSER
VER=ol_informix1170
I hope this helps other newbies out.
Best,
Laird
--
http://about.me/lairdnelson
--e89a8f2356f719060404bf755fd5
On Mon, May 7, 2012 at 1:12 PM, Laird Nelson <ljnelson@gmail.com> wrote: > When I get a clean start, then the only JDBC URL that works is as follows: > > > jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:15222/sysmaster:INFORMIXSER VER=ol_informix1170 > ...and now without any configuration change it stopped accepting connections. It's almost like there's some process that comes up and sticks around for a little bit, and then dies. Something is definitely not right. Best, Laird -- http://about.me/lairdnelson --e89a8f234ce5e68f9904bf757c27
Very strange. My boss has had Informix running on the MAC for over a year
with no problems except oversubscribing to kernel asynch IO resources
(turning KAIO off resooved that until IBM figures out how we can tune the
OS to allocate more KAIO resources).
Are the oninit processes still running when you have this problem?
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, May 7, 2012 at 1:20 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> On Mon, May 7, 2012 at 1:12 PM, Laird Nelson <ljnelson@gmail.com> wrote:
>
> > When I get a clean start, then the only JDBC URL that works is as
> follows:
> >
> >
> >
>
>
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:15222/sysmaster:INFORMIXSER
VER=ol_informix1170
> >
>
> ....and now without any configuration change it stopped accepting
> connections. It's almost like there's some process that comes up and
> sticks around for a little bit, and then dies. Something is definitely not
> right.
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>
> --e89a8f234ce5e68f9904bf757c27
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--047d7b2e09398eb25204bf759783
On Mon, May 7, 2012 at 1:28 PM, Art Kagel <art.kagel@gmail.com> wrote:
> Are the oninit processes still running when you have this problem [of
> connection refusal]?
Yes, and now I can't get a successful connection at all. I have updated my
firewall to put up dialog boxes if there's a blocked connection issue, but
so far that's not it.
Moving on to other things today since I've used up around half the day on
this issue. :-( I very much appreciate the help.
Best,
Laird
--
http://about.me/lairdnelson
--f46d04428874f0d9d604bf75a146
Sounds to me like some of the shared memory segments got hung.
I'd check the message log file to see what was in there when you tried =
to
start the server but it failed.
From: "Art Kagel" <art.kagel@gmail.com>
To: ids@iiug.org,
Date: 05/07/2012 12:29 PM
Subject: Re: Newbie question: fresh default Mac OSX ins.... [27017]
Sent by: ids-bounces@iiug.org
Very strange. My boss has had Informix running on the MAC for over a ye=
ar
with no problems except oversubscribing to kernel asynch IO resources
(turning KAIO off resooved that until IBM figures out how we can tune t=
he
OS to allocate more KAIO resources).
Are the oninit processes still running when you have this problem?
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 opinion=
s
and do not reflect on my employer, Advanced DataTools, the IIUG, nor an=
y
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, May 7, 2012 at 1:20 PM, Laird Nelson <ljnelson@gmail.com> wrote=
:
> On Mon, May 7, 2012 at 1:12 PM, Laird Nelson <ljnelson@gmail.com> wro=
te:
>
> > When I get a clean start, then the only JDBC URL that works is as
> follows:
> >
> >
> >
>
>
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:15222/sysmaster:IN=
FORMIXSERVER=3Dol_informix1170
> >
>
> ....and now without any configuration change it stopped accepting
> connections. It's almost like there's some process that comes up and
> sticks around for a little bit, and then dies. Something is definitel=
y
not
> right.
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>
> --e89a8f234ce5e68f9904bf757c27
>
>
>
>
***********************************************************************=
********
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--047d7b2e09398eb25204bf759783
***********************************************************************=
********
Forum Note: Use "Reply" to post a response in the discussion forum.
=
On Mon, May 7, 2012 at 1:34 PM, Madison Pruet <mpruet@us.ibm.com> wrote:
> Sounds to me like some of the shared memory segments got hung.
>
Here's my session:
bash-3.2$ onmode -ky
bash-3.2$ ps -ef | grep oninit502 36861 35084 0 0:00.00 ttys000 0:00.00 grep oninit
bash-3.2$ whoami
informix
bash-3.2$ oninit -wvChecking group membership to determine server run mode...succeeded
Reading configuration file
'/Applications/IBM/informix/etc/onconfig.ol_informix1170'...succeeded
Creating /INFORMIXTMP/.infxdirs...succeeded
Checking config parameters...succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 14720 kbytes...succeeded
Allocating 200016 kbytes for buffer pool of 4K page size...succeeded
Creating infos file
"/Applications/IBM/informix/etc/.infos.ol_informix1170"...succeeded
Linking conf file
"/Applications/IBM/informix/etc/.conf.ol_informix1170"...succeeded
Initializing rhead structure...succeeded
Writing to infos file...succeeded
Initialization of Encryption...succeeded
Initializing ASF...succeeded
Initializing Dictionary Cache and SPL Routine Cache...succeeded
Bringing up ADM VP...succeeded
Creating VP classes...succeeded
Onlining 0 additional cpu vps...succeeded
Onlining 2 IO vps...succeeded
Forking main_loop thread...succeeded
Initializing DR structures...succeeded
Forking 1 'soctcp' listener threads...succeeded
Forking 1 'soctcp' listener threads...succeeded
Starting tracing...succeeded
Initializing 8 flushers...succeeded
Initializing SDS Server network connections...succeeded
Initializing log/checkpoint information...succeeded
Initializing dbspaces...succeeded
Opening primary chunks...succeeded
Opening mirror chunks...succeeded
Validating chunks...succeeded
Initialize Async Log Flusher...succeeded
Starting B-tree Scanner...succeeded
Initializing DBSPACETEMP list...succeeded
Checking database partition index...succeeded
Initializing dataskip structure...succeeded
Checking for temporary tables to drop...succeeded
Updating Global Row Counter...
Forking onmode_mon thread...succeeded
Creating periodic thread...succeeded
Starting scheduling system...succeeded
Verbose output complete: mode = 5
bash-3.2$
So I read all this as "database server is up and running just fine".
Now I go to my JDBC client and try to do:
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:15222/sysmaster:INFORMIXSER
VER=ol_informix1170
...and I get connection refused.
Any other ideas?
The Windows installation seems to be just fine (it uses port 9088 as Art
indicated).
Best,
Laird
--
http://about.me/lairdnelson
--e89a8f2356f7a14a2504bf75c128
but what does the message log file say? You can run onstat -m to see w=
here
it is located.
From: "Laird Nelson" <ljnelson@gmail.com>
To: ids@iiug.org,
Date: 05/07/2012 12:41 PM
Subject: Re: Newbie question: fresh default Mac OSX ins.... [27020]
Sent by: ids-bounces@iiug.org
On Mon, May 7, 2012 at 1:34 PM, Madison Pruet <mpruet@us.ibm.com> wrote=
:
> Sounds to me like some of the shared memory segments got hung.
>
Here's my session:
bash-3.2$ onmode -ky
bash-3.2$ ps -ef | grep oninit502 36861 35084 0 0:00.00 ttys000 0:00.00 grep oninit
bash-3.2$ whoami
informix
bash-3.2$ oninit -wvChecking group membership to determine server run mode...succeeded
Reading configuration file
'/Applications/IBM/informix/etc/onconfig.ol_informix1170'...succeeded
Creating /INFORMIXTMP/.infxdirs...succeeded
Checking config parameters...succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 14720 kbytes...succeeded
Allocating 200016 kbytes for buffer pool of 4K page size...succeeded
Creating infos file
"/Applications/IBM/informix/etc/.infos.ol_informix1170"...succeeded
Linking conf file
"/Applications/IBM/informix/etc/.conf.ol_informix1170"...succeeded
Initializing rhead structure...succeeded
Writing to infos file...succeeded
Initialization of Encryption...succeeded
Initializing ASF...succeeded
Initializing Dictionary Cache and SPL Routine Cache...succeeded
Bringing up ADM VP...succeeded
Creating VP classes...succeeded
Onlining 0 additional cpu vps...succeeded
Onlining 2 IO vps...succeeded
Forking main_loop thread...succeeded
Initializing DR structures...succeeded
Forking 1 'soctcp' listener threads...succeeded
Forking 1 'soctcp' listener threads...succeeded
Starting tracing...succeeded
Initializing 8 flushers...succeeded
Initializing SDS Server network connections...succeeded
Initializing log/checkpoint information...succeeded
Initializing dbspaces...succeeded
Opening primary chunks...succeeded
Opening mirror chunks...succeeded
Validating chunks...succeeded
Initialize Async Log Flusher...succeeded
Starting B-tree Scanner...succeeded
Initializing DBSPACETEMP list...succeeded
Checking database partition index...succeeded
Initializing dataskip structure...succeeded
Checking for temporary tables to drop...succeeded
Updating Global Row Counter...
Forking onmode_mon thread...succeeded
Creating periodic thread...succeeded
Starting scheduling system...succeeded
Verbose output complete: mode =3D 5
bash-3.2$
So I read all this as "database server is up and running just fine".
Now I go to my JDBC client and try to do:
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:15222/sysmaster:IN=
FORMIXSERVER=3Dol_informix1170
....and I get connection refused.
Any other ideas?
The Windows installation seems to be just fine (it uses port 9088 as Ar=
t
indicated).
Best,
Laird
--
http://about.me/lairdnelson
--e89a8f2356f7a14a2504bf75c128
***********************************************************************=
********
Forum Note: Use "Reply" to post a response in the discussion forum.
=
On Mon, May 7, 2012 at 1:46 PM, Madison Pruet <mpruet@us.ibm.com> wrote: > but what does the message log file say? > Nothing special (to my eyes): Mon May 7 13:37:25 2012 13:37:25 Event alarms enabled. ALARMPROG = '/Applications/IBM/informix/etc/alarmprogram.sh' 13:37:25 Booting Language <c> from module <> 13:37:25 Loading Module <CNULL> 13:37:25 Booting Language <builtin> from module <> 13:37:25 Loading Module <BUILTINNULL> 13:37:31 Waiting 600 seconds for startup to complete. 13:37:31 DR: DRAUTO is 0 (Off) 13:37:31 DR: ENCRYPT_HDR is 0 (HDR encryption Disabled) 13:37:31 Dynamically allocated new virtual shared memory segment (size 8192KB) 13:37:31 Memory sizes:resident:217736 KB, virtual:40848 KB, SHMTOTAL:1048576 KB 13:37:31 IBM Informix Dynamic Server Version 11.70.FC1DE Software Serial Number AAA#B000000 13:37:32 IBM Informix Dynamic Server Initialized -- Shared Memory Initialized. 13:37:32 Started 1 B-tree scanners. 13:37:32 B-tree scanner threshold set at 5000. 13:37:32 B-tree scanner range scan size set to -1. 13:37:32 B-tree scanner ALICE mode set to 6. 13:37:32 B-tree scanner index compression level set to med. 13:37:32 Physical Recovery Started at Page (2:467). 13:37:32 Physical Recovery Complete: 0 Pages Examined, 0 Pages Restored. 13:37:32 Logical Recovery Started. 13:37:32 10 recovery worker threads will be started. 13:37:33 Logical Recovery has reached the transaction cleanup phase. 13:37:33 Logical Recovery Complete. 0 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks 13:37:34 Dataskip is now OFF for all dbspaces 13:37:34 Global Row Counter(Reset) 30064771072 0x700000000 13:37:34 Checkpoint Completed: duration was 0 seconds. 13:37:34 Mon May 7 - loguniq 9, logpos 0x2f7018, timestamp: 0x2b558 Interval: 61 13:37:34 Maximum server connections 0 13:37:34 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 7, Llog used 2 13:37:34 On-Line Mode 13:37:36 SCHAPI: Started dbScheduler thread. 13:37:36 Booting Language <spl> from module <> 13:37:36 Loading Module <SPLNULL> 13:37:36 SCHAPI: Started 2 dbWorker threads. 13:37:39 Defragmenter cleaner thread now running 13:37:39 Defragmenter cleaner thread cleaned:0 partitions 13:56:19 Checkpoint Completed: duration was 0 seconds. 13:56:19 Mon May 7 - loguniq 9, logpos 0x307018, timestamp: 0x2c029 Interval: 62 13:56:19 Maximum server connections 0 13:56:19 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 15, Llog used 16 -- http://about.me/lairdnelson --f46d044288742516e804bf7605dd
Either we're not looking at something obvious or something wrong is
happening....
Please, let's leave the ideal behavior to a later stage (it really should
be easy for unexperienced users) and let's try to "debug" it.
My suggestions:
- Check with netstat if the IP/port is in "LISTEN" mode
- Assuming it is, try to telnet to it (if you have telnet available)
- When it fails try to run:
onmode -P stop ol_informix1170
onmode -P start ol_informix1170
This should stop and restart the listener. Test it to see if it helps (if
it does we'd still need to understand what happens in between)
After these commands run onstat -m to see the log messages
Regards
On Mon, May 7, 2012 at 6:58 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> On Mon, May 7, 2012 at 1:46 PM, Madison Pruet <mpruet@us.ibm.com> wrote:
>
> > but what does the message log file say?
> >
>
> Nothing special (to my eyes):
>
> Mon May 7 13:37:25 2012
>
> 13:37:25 Event alarms enabled. ALARMPROG =
> '/Applications/IBM/informix/etc/alarmprogram.sh'
> 13:37:25 Booting Language <c> from module <>
> 13:37:25 Loading Module <CNULL>
> 13:37:25 Booting Language <builtin> from module <>
> 13:37:25 Loading Module <BUILTINNULL>
> 13:37:31 Waiting 600 seconds for startup to complete.
> 13:37:31 DR: DRAUTO is 0 (Off)
> 13:37:31 DR: ENCRYPT_HDR is 0 (HDR encryption Disabled)
> 13:37:31 Dynamically allocated new virtual shared memory segment (size
> 8192KB)
> 13:37:31 Memory sizes:resident:217736 KB, virtual:40848 KB,
> SHMTOTAL:1048576 KB
> 13:37:31 IBM Informix Dynamic Server Version 11.70.FC1DE Software Serial
> Number AAA#B000000
> 13:37:32 IBM Informix Dynamic Server Initialized -- Shared Memory
> Initialized.
>
> 13:37:32 Started 1 B-tree scanners.
> 13:37:32 B-tree scanner threshold set at 5000.
> 13:37:32 B-tree scanner range scan size set to -1.
> 13:37:32 B-tree scanner ALICE mode set to 6.
> 13:37:32 B-tree scanner index compression level set to med.
> 13:37:32 Physical Recovery Started at Page (2:467).
> 13:37:32 Physical Recovery Complete: 0 Pages Examined, 0 Pages Restored.
> 13:37:32 Logical Recovery Started.
> 13:37:32 10 recovery worker threads will be started.
> 13:37:33 Logical Recovery has reached the transaction cleanup phase.
> 13:37:33 Logical Recovery Complete.
> 0 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks
>
> 13:37:34 Dataskip is now OFF for all dbspaces
> 13:37:34 Global Row Counter(Reset) 30064771072 0x700000000
> 13:37:34 Checkpoint Completed: duration was 0 seconds.
> 13:37:34 Mon May 7 - loguniq 9, logpos 0x2f7018, timestamp: 0x2b558
> Interval: 61
>
> 13:37:34 Maximum server connections 0
> 13:37:34 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked
> 0, Plog used 7, Llog used 2
>
> 13:37:34 On-Line Mode
> 13:37:36 SCHAPI: Started dbScheduler thread.
> 13:37:36 Booting Language <spl> from module <>
> 13:37:36 Loading Module <SPLNULL>
> 13:37:36 SCHAPI: Started 2 dbWorker threads.
> 13:37:39 Defragmenter cleaner thread now running
> 13:37:39 Defragmenter cleaner thread cleaned:0 partitions
> 13:56:19 Checkpoint Completed: duration was 0 seconds.
> 13:56:19 Mon May 7 - loguniq 9, logpos 0x307018, timestamp: 0x2c029
> Interval: 62
>
> 13:56:19 Maximum server connections 0
> 13:56:19 Checkpoint Statistics - Avg. Txn Block Time 0.000, # Txns blocked
> 0, Plog used 15, Llog used 16
>
> --
> http://about.me/lairdnelson
>
> --f46d044288742516e804bf7605dd
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--20cf3074b01e5136fe04bf784c11
On Mon, May 7, 2012 at 4:41 PM, Fernando Nunes <domusonline@gmail.com>wrote:
> Either we're not looking at something obvious or something wrong is
> happening....
>
I agree.
> My suggestions:
>
> - Check with netstat if the IP/port is in "LISTEN" mode
>
It is; interestingly it's tcp6:
bash-3.2$ whoami
informix
bash-3.2$ netstat -a | grep LISTEN
tcp4 0 0 *.4242 *.* LISTEN
tcp4 0 0 localhost.4243 *.* LISTEN
tcp6 0 0 laird-nelsons-ma.dr_in *.* LISTEN
tcp6 0 0 laird-nelsons-ma.ol_in *.* LISTEN
[snip]
Recall that $INFORMIXDIR/etc/sqlhosts.ol_informix1170 is being used:
bash-3.2$ whoami
informix
bash-3.2$ env | sort | grep INFORMIX
INFORMIXDIR=/Applications/IBM/informix
INFORMIXSERVER=ol_informix1170
INFORMIXSQLHOSTS=/Applications/IBM/informix/etc/sqlhosts.ol_informix1170
...and that it says to use the ol_informix1170 service:
bash-3.2$ cat etc/sqlhosts.ol_informix1170ol_informix1170 onsoctcp Laird-Nelsons-MacBook-Pro.local ol_informix1170
dr_informix1170 drsoctcp Laird-Nelsons-MacBook-Pro.local dr_informix1170
...and that is of course present in /etc/services:
ash-3.2$ grep ol_informix /etc/servicesol_informix1170 15222/tcp
...so if I'm stitching this pinball machine together correctly, that tells
me that I should have a listener on Laird-Nelsons-MacBook-Pro.local using a
TCP port of 15222.
I would think therefore that provided that oninit processes are up:
bash-3.2$ ps -ef | grep oninit
502 815 1 0 0:00.17 ?? 0:00.47 oninit -wv
0 816 815 0 0:00.17 ?? 0:00.24 oninit -wv
0 817 816 0 0:00.08 ?? 0:00.09 oninit -wv
0 818 816 0 0:00.08 ?? 0:00.09 oninit -wv
0 819 816 0 0:00.08 ?? 0:00.10 oninit -wv
0 820 816 0 0:00.04 ?? 0:00.04 oninit -wv
0 821 816 0 0:00.07 ?? 0:00.08 oninit -wv
0 822 816 0 0:00.07 ?? 0:00.09 oninit -wv
0 823 816 0 0:00.34 ?? 0:00.51 oninit -wv
0 824 816 0 0:00.04 ?? 0:00.06 oninit -wv
0 825 816 0 0:00.04 ?? 0:00.06 oninit -wv
0 826 816 0 0:00.04 ?? 0:00.06 oninit -wv
0 827 816 0 0:00.04 ?? 0:00.06 oninit -wv
502 5163 5101 0 0:00.00 ttys000 0:00.00 grep oninit
...which they are as you can see above I should be able to telnet to
Laird-Nelsons-MacBook-Pro.local, port 15222 which I can:
bash-3.2$ telnet Laird-Nelsons-MacBook-Pro.local 15222
Trying 192.168.1.102...
telnet: connect to address 192.168.1.102: Connection refused
Trying fe80::9227:e4ff:feed:59eb...
Connected to laird-nelsons-macbook-pro.local.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
Now, I lied a little bit. First I actually tried this:
bash-3.2$ telnet localhost 15222
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refused
telnet: Unable to connect to remote host
...but lo and behold that did not work.
I looked at my Symantec Firewall that is running on my Mac (part of my
cable provider's TOS) and it reports that there is a program named oninit
listening on port 15222. However, the local IP address is notable for
being in ip6 form, whereas almost all the other entries in the list are in
ip4 form. I've attempted to attach a screenshot showing this; I have no
earthly idea what might happen to it on the way to the forums/email
gateway. The local IP address so listed is as follows:
fe80::9227:e4ff:feed:59eb
Port 15222 is open to all connections (says my firewall).
Other entries in the list are notable for listing their local IP addresses
as 0.0.0.0, which looks much more familiar to me.
(oninit is also listed in this output as listening on the same ip6 host,
port 9521.)
Telnetting to any ip6 host so listed or fe80::1 doesn't work. Adding
explicit allowance rules in my firewall for such addresses doesn't work.
I had a brief momentary flash this morning where a connection did get
through. Then after zero configuration changes on my part, it failed again
about 2 minutes later. I've since restarted Informix several times over to
no avail.
- When it fails try to run:
> onmode -P stop ol_informix1170>
This hung the first time I ran it. Then I went back and did a telnet to
Laird-Nelsons-MacBook-Pro.local port 15222, got in, and when I cancelled
out of that this job completed on its own.
> onmode -P start ol_informix1170>
This ran fine.
None of this had any effect; a JDBC URL of
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:1522/sysmaster:INFORMIXSERV
ER=ol_informix1170
still doesn't connect because the connection is refused.
However, now the message output is this at the end:
17:21:10 Listen thread shutdown SUCCESS
17:22:06 listener-thread: err = -25582: oserr = 4: errstr = : Network
connection is broken.
System error = 4.
17:23:56 Starting listen thread for sqlhosts server ol_informix1170
17:23:56 Listen thread init SUCCESS
17:24:30 listener-thread: err = -25582: oserr = 4: errstr = : Network
connection is broken.
System error = 4.
Thank you so much for your help.
Best,
Laird
--
http://about.me/lairdnelson
--f46d043c801c586e5f04bf78f071
The URL port (1522) is missing a "2". Was that a typo?
In a previous email, you mentioned the successful URL with 15222.
Another test:
touch $INFORMIXDIR/etc/IFX_DISABLE_IPV6
and recycle the engine (onmode -ky;oninit)
Regards.
On Mon, May 7, 2012 at 10:27 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> On Mon, May 7, 2012 at 4:41 PM, Fernando Nunes <domusonline@gmail.com
> >wrote:
>
> > Either we're not looking at something obvious or something wrong is
> > happening....
> >
>
> I agree.
>
> > My suggestions:
> >
> > - Check with netstat if the IP/port is in "LISTEN" mode
> >
>
> It is; interestingly it's tcp6:
>
> bash-3.2$ whoami
> informix
> bash-3.2$ netstat -a | grep LISTEN
> tcp4 0 0 *.4242 *.* LISTEN
> tcp4 0 0 localhost.4243 *.* LISTEN
> tcp6 0 0 laird-nelsons-ma.dr_in *.* LISTEN
> tcp6 0 0 laird-nelsons-ma.ol_in *.* LISTEN
> [snip]
>
> Recall that $INFORMIXDIR/etc/sqlhosts.ol_informix1170 is being used:
>
> bash-3.2$ whoami
> informix
> bash-3.2$ env | sort | grep INFORMIX
> INFORMIXDIR=/Applications/IBM/informix
> INFORMIXSERVER=ol_informix1170
> INFORMIXSQLHOSTS=/Applications/IBM/informix/etc/sqlhosts.ol_informix1170>
> ....and that it says to use the ol_informix1170 service:
>
> bash-3.2$ cat etc/sqlhosts.ol_informix1170> ol_informix1170 onsoctcp Laird-Nelsons-MacBook-Pro.local ol_informix1170
> dr_informix1170 drsoctcp Laird-Nelsons-MacBook-Pro.local dr_informix1170>
> ....and that is of course present in /etc/services:
>
> ash-3.2$ grep ol_informix /etc/services> ol_informix1170 15222/tcp
>
> ....so if I'm stitching this pinball machine together correctly, that tells
> me that I should have a listener on Laird-Nelsons-MacBook-Pro.local using a
> TCP port of 15222.
>
> I would think therefore that provided that oninit processes are up:
>
> bash-3.2$ ps -ef | grep oninit
> 502 815 1 0 0:00.17 ?? 0:00.47 oninit -wv>
> 0 816 815 0 0:00.17 ?? 0:00.24 oninit -wv
>
> 0 817 816 0 0:00.08 ?? 0:00.09 oninit -wv
>
> 0 818 816 0 0:00.08 ?? 0:00.09 oninit -wv
>
> 0 819 816 0 0:00.08 ?? 0:00.10 oninit -wv
>
> 0 820 816 0 0:00.04 ?? 0:00.04 oninit -wv
>
> 0 821 816 0 0:00.07 ?? 0:00.08 oninit -wv
>
> 0 822 816 0 0:00.07 ?? 0:00.09 oninit -wv
>
> 0 823 816 0 0:00.34 ?? 0:00.51 oninit -wv
>
> 0 824 816 0 0:00.04 ?? 0:00.06 oninit -wv
>
> 0 825 816 0 0:00.04 ?? 0:00.06 oninit -wv
>
> 0 826 816 0 0:00.04 ?? 0:00.06 oninit -wv
>
> 0 827 816 0 0:00.04 ?? 0:00.06 oninit -wv
> 502 5163 5101 0 0:00.00 ttys000 0:00.00 grep oninit
>
> ....which they are as you can see above I should be able to telnet to
> Laird-Nelsons-MacBook-Pro.local, port 15222 which I can:
>
> bash-3.2$ telnet Laird-Nelsons-MacBook-Pro.local 15222
> Trying 192.168.1.102...
> telnet: connect to address 192.168.1.102: Connection refused
> Trying fe80::9227:e4ff:feed:59eb...
> Connected to laird-nelsons-macbook-pro.local.
> Escape character is '^]'.
> ^]
> telnet> quit
> Connection closed.
>
> Now, I lied a little bit. First I actually tried this:
>
> bash-3.2$ telnet localhost 15222
> Trying 127.0.0.1...
> telnet: connect to address 127.0.0.1: Connection refused
> Trying ::1...
> telnet: connect to address ::1: Connection refused
> Trying fe80::1...
> telnet: connect to address fe80::1: Connection refused
> telnet: Unable to connect to remote host
>
> ....but lo and behold that did not work.
>
> I looked at my Symantec Firewall that is running on my Mac (part of my
> cable provider's TOS) and it reports that there is a program named oninit
> listening on port 15222. However, the local IP address is notable for
> being in ip6 form, whereas almost all the other entries in the list are in
> ip4 form. I've attempted to attach a screenshot showing this; I have no
> earthly idea what might happen to it on the way to the forums/email
> gateway. The local IP address so listed is as follows:
>
> fe80::9227:e4ff:feed:59eb
>
> Port 15222 is open to all connections (says my firewall).
>
> Other entries in the list are notable for listing their local IP addresses
> as 0.0.0.0, which looks much more familiar to me.
>
> (oninit is also listed in this output as listening on the same ip6 host,
> port 9521.)
>
> Telnetting to any ip6 host so listed or fe80::1 doesn't work. Adding
> explicit allowance rules in my firewall for such addresses doesn't work.
>
> I had a brief momentary flash this morning where a connection did get
> through. Then after zero configuration changes on my part, it failed again
> about 2 minutes later. I've since restarted Informix several times over to
> no avail.
>
> - When it fails try to run:
> > onmode -P stop ol_informix1170> >
>
> This hung the first time I ran it. Then I went back and did a telnet to
> Laird-Nelsons-MacBook-Pro.local port 15222, got in, and when I cancelled
> out of that this job completed on its own.
>
> > onmode -P start ol_informix1170> >
>
> This ran fine.
>
> None of this had any effect; a JDBC URL of
>
>
>
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:1522/sysmaster:INFORMIXSERV
ER=ol_informix1170
> still doesn't connect because the connection is refused.
>
> However, now the message output is this at the end:
>
> 17:21:10 Listen thread shutdown SUCCESS
> 17:22:06 listener-thread: err = -25582: oserr = 4: errstr = : Network
> connection is broken.
> System error = 4.
> 17:23:56 Starting listen thread for sqlhosts server ol_informix1170
> 17:23:56 Listen thread init SUCCESS
> 17:24:30 listener-thread: err = -25582: oserr = 4: errstr = : Network
> connection is broken.
> System error = 4.
>
> Thank you so much for your help.
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>
> --f46d043c801c586e5f04bf78f071
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--00235452f64cfd55c604bf7929d7
On Mon, May 7, 2012 at 5:43 PM, Fernando Nunes <domusonline@gmail.com>wrote:
> The URL port (1522) is missing a "2". Was that a typo?
> In a previous email, you mentioned the successful URL with 15222.
>
Typo. To be really careful this time, here is the URL from my JDBC client
cut-and-pasted here:
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:15222/sysmaster:INFORMIXSER
VER=ol_informix1170
Another test:
>
> touch $INFORMIXDIR/etc/IFX_DISABLE_IPV6
>
Done
> and recycle the engine (onmode -ky;oninit)
>
That did the trick. Thanks.
Best,
Laird
>
--
http://about.me/lairdnelson
--f46d04428874c0691b04bf7959c3
Hmmm.... what does a ping to the hostname used in the URL show?
What is the JDBC driver version?
What is the OS version?
I have no way to further debug this. Apparently there is something wrong
with the usage of TCP/IP V6.
It can be Informix server, the client or the OS...
Regards.
On Mon, May 7, 2012 at 10:57 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> On Mon, May 7, 2012 at 5:43 PM, Fernando Nunes <domusonline@gmail.com
> >wrote:
>
> > The URL port (1522) is missing a "2". Was that a typo?
> > In a previous email, you mentioned the successful URL with 15222.
> >
>
> Typo. To be really careful this time, here is the URL from my JDBC client
> cut-and-pasted here:
>
>
>
>
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:15222/sysmaster:INFORMIXSER
VER=ol_informix1170
>
> Another test:
> >
> > touch $INFORMIXDIR/etc/IFX_DISABLE_IPV6
> >
>
> Done
>
> > and recycle the engine (onmode -ky;oninit)
> >
>
> That did the trick. Thanks.
>
> Best,
> Laird
>
> >
> --
> http://about.me/lairdnelson
>
> --f46d04428874c0691b04bf7959c3
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--20cf30207512ffeca804bf797bea
On Mon, May 7, 2012 at 6:06 PM, Fernando Nunes <domusonline@gmail.com>wrote: > Hmmm.... what does a ping to the hostname used in the URL show? > ash-3.2$ ping Laird-Nelsons-MacBook-Pro.local PING laird-nelsons-macbook-pro.local (192.168.1.102): 56 data bytes 64 bytes from 192.168.1.102: icmp_seq=0 ttl=64 time=0.093 ms 64 bytes from 192.168.1.102: icmp_seq=1 ttl=64 time=0.328 ms 64 bytes from 192.168.1.102: icmp_seq=2 ttl=64 time=0.148 ms ^C --- laird-nelsons-macbook-pro.local ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.093/0.190/0.328/0.100 ms > What is the JDBC driver version? > 3.70.JC4 > What is the OS version? > Snow Leopard (10.6.5) bash-3.2$ uname -a Darwin Laird-Nelsons-MacBook-Pro.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 > I have no way to further debug this. Apparently there is something wrong > with the usage of TCP/IP V6. > Thanks! Best, Laird -- http://about.me/lairdnelson --0016e6d7e4e77f5aaf04bf798d24
On Mon, May 7, 2012 at 6:11 PM, Laird Nelson <ljnelson@gmail.com> wrote: > Snow Leopard (10.6.5) > Sorry, meant 10.6.8; latest updates. Best, Laird -- http://about.me/lairdnelson --f46d044288743eed5904bf798ff8
Try putting the hard IPv6 address of the machine into the JDBC URL.
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, May 7, 2012 at 5:27 PM, Laird Nelson <ljnelson@gmail.com> wrote:
> On Mon, May 7, 2012 at 4:41 PM, Fernando Nunes <domusonline@gmail.com
> >wrote:
>
> > Either we're not looking at something obvious or something wrong is
> > happening....
> >
>
> I agree.
>
> > My suggestions:
> >
> > - Check with netstat if the IP/port is in "LISTEN" mode
> >
>
> It is; interestingly it's tcp6:
>
> bash-3.2$ whoami
> informix
> bash-3.2$ netstat -a | grep LISTEN
> tcp4 0 0 *.4242 *.* LISTEN
> tcp4 0 0 localhost.4243 *.* LISTEN
> tcp6 0 0 laird-nelsons-ma.dr_in *.* LISTEN
> tcp6 0 0 laird-nelsons-ma.ol_in *.* LISTEN
> [snip]
>
> Recall that $INFORMIXDIR/etc/sqlhosts.ol_informix1170 is being used:
>
> bash-3.2$ whoami
> informix
> bash-3.2$ env | sort | grep INFORMIX
> INFORMIXDIR=/Applications/IBM/informix
> INFORMIXSERVER=ol_informix1170
> INFORMIXSQLHOSTS=/Applications/IBM/informix/etc/sqlhosts.ol_informix1170>
> ....and that it says to use the ol_informix1170 service:
>
> bash-3.2$ cat etc/sqlhosts.ol_informix1170> ol_informix1170 onsoctcp Laird-Nelsons-MacBook-Pro.local ol_informix1170
> dr_informix1170 drsoctcp Laird-Nelsons-MacBook-Pro.local dr_informix1170>
> ....and that is of course present in /etc/services:
>
> ash-3.2$ grep ol_informix /etc/services> ol_informix1170 15222/tcp
>
> ....so if I'm stitching this pinball machine together correctly, that tells
> me that I should have a listener on Laird-Nelsons-MacBook-Pro.local using a
> TCP port of 15222.
>
> I would think therefore that provided that oninit processes are up:
>
> bash-3.2$ ps -ef | grep oninit
> 502 815 1 0 0:00.17 ?? 0:00.47 oninit -wv>
> 0 816 815 0 0:00.17 ?? 0:00.24 oninit -wv
>
> 0 817 816 0 0:00.08 ?? 0:00.09 oninit -wv
>
> 0 818 816 0 0:00.08 ?? 0:00.09 oninit -wv
>
> 0 819 816 0 0:00.08 ?? 0:00.10 oninit -wv
>
> 0 820 816 0 0:00.04 ?? 0:00.04 oninit -wv
>
> 0 821 816 0 0:00.07 ?? 0:00.08 oninit -wv
>
> 0 822 816 0 0:00.07 ?? 0:00.09 oninit -wv
>
> 0 823 816 0 0:00.34 ?? 0:00.51 oninit -wv
>
> 0 824 816 0 0:00.04 ?? 0:00.06 oninit -wv
>
> 0 825 816 0 0:00.04 ?? 0:00.06 oninit -wv
>
> 0 826 816 0 0:00.04 ?? 0:00.06 oninit -wv
>
> 0 827 816 0 0:00.04 ?? 0:00.06 oninit -wv
> 502 5163 5101 0 0:00.00 ttys000 0:00.00 grep oninit
>
> ....which they are as you can see above I should be able to telnet to
> Laird-Nelsons-MacBook-Pro.local, port 15222 which I can:
>
> bash-3.2$ telnet Laird-Nelsons-MacBook-Pro.local 15222
> Trying 192.168.1.102...
> telnet: connect to address 192.168.1.102: Connection refused
> Trying fe80::9227:e4ff:feed:59eb...
> Connected to laird-nelsons-macbook-pro.local.
> Escape character is '^]'.
> ^]
> telnet> quit
> Connection closed.
>
> Now, I lied a little bit. First I actually tried this:
>
> bash-3.2$ telnet localhost 15222
> Trying 127.0.0.1...
> telnet: connect to address 127.0.0.1: Connection refused
> Trying ::1...
> telnet: connect to address ::1: Connection refused
> Trying fe80::1...
> telnet: connect to address fe80::1: Connection refused
> telnet: Unable to connect to remote host
>
> ....but lo and behold that did not work.
>
> I looked at my Symantec Firewall that is running on my Mac (part of my
> cable provider's TOS) and it reports that there is a program named oninit
> listening on port 15222. However, the local IP address is notable for
> being in ip6 form, whereas almost all the other entries in the list are in
> ip4 form. I've attempted to attach a screenshot showing this; I have no
> earthly idea what might happen to it on the way to the forums/email
> gateway. The local IP address so listed is as follows:
>
> fe80::9227:e4ff:feed:59eb
>
> Port 15222 is open to all connections (says my firewall).
>
> Other entries in the list are notable for listing their local IP addresses
> as 0.0.0.0, which looks much more familiar to me.
>
> (oninit is also listed in this output as listening on the same ip6 host,
> port 9521.)
>
> Telnetting to any ip6 host so listed or fe80::1 doesn't work. Adding
> explicit allowance rules in my firewall for such addresses doesn't work.
>
> I had a brief momentary flash this morning where a connection did get
> through. Then after zero configuration changes on my part, it failed again
> about 2 minutes later. I've since restarted Informix several times over to
> no avail.
>
> - When it fails try to run:
> > onmode -P stop ol_informix1170> >
>
> This hung the first time I ran it. Then I went back and did a telnet to
> Laird-Nelsons-MacBook-Pro.local port 15222, got in, and when I cancelled
> out of that this job completed on its own.
>
> > onmode -P start ol_informix1170> >
>
> This ran fine.
>
> None of this had any effect; a JDBC URL of
>
>
>
jdbc:informix-sqli://Laird-Nelsons-MacBook-Pro.local:1522/sysmaster:INFORMIXSERV
ER=ol_informix1170
> still doesn't connect because the connection is refused.
>
> However, now the message output is this at the end:
>
> 17:21:10 Listen thread shutdown SUCCESS
> 17:22:06 listener-thread: err = -25582: oserr = 4: errstr = : Network
> connection is broken.
> System error = 4.
> 17:23:56 Starting listen thread for sqlhosts server ol_informix1170
> 17:23:56 Listen thread init SUCCESS
> 17:24:30 listener-thread: err = -25582: oserr = 4: errstr = : Network
> connection is broken.
> System error = 4.
>
> Thank you so much for your help.
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>
> --f46d043c801c586e5f04bf78f071
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--14dae9340e218a8e1a04bf79ccfc
Although I'm responding to Laird's original message, I've looked at many
(though not necessarily all) of the subsequent messages about the problem.
On Mon, May 7, 2012 at 8:59 AM, Laird Nelson <ljnelson@gmail.com> wrote:
> I have a fresh Informix 11.70 installation on Mac OSX.
>
> I can connect to the sysmaster database using dbaccess, so I know that in
> general I've got the system up and running. I haven't done anything other
> than simply start the database.
>
> I'm now attempting to hook my JDBC client up to it. I have experience
> building Informix JDBC URL strings, so I don't believe I am making a
> boneheaded error.
>
> I am getting connection refused errors.
>
> My URL is as follows:
>
>
> jdbc:informix-sqli://localhost:15222/sysmaster:INFORMIXSERVER=ol_informix1170
>
> I am connecting as user informix with the admin password I set up at
> installation time.
>
> Port 15222 is open to all computers on my network according to my firewall.
>
> I have not made any further modifications to /etc/services or
> $INFORMIX_HOME/etc/onconfig.ol_informix1170 or
> $INFORMIX_HOME/etc/sqlhosts.ol_informix1170.
>
> I would suspect that perhaps TCP connectivity is not enabled (after all,
> dbaccess works, but I'm guessing does not use TCP), but I see the following
> NETTYPE entries in my onconfig file:
>
> NETTYPE ipcshm,1,50,CPU
> NETTYPE onsoctcp,1,150,NET
> NETTYPE drsoctcp,1,150,NET>
> After doing all this research, I find that I'm out of gas. What next?
>
There are a couple of details missing. As has already been commented and
analyzed, one aspect of the problem is the sqlhosts file; one which I've
not seen so much discussion about is the DBSERVERNAME and DBSERVERALIASES
entries in the $ONCONFIG file.
I changed my MacBook Pro machine a while ago, and did a transfer rather
than a clean install of my Informix environment. Nevertheless, at some
point (memory is fuzzy now), I ran into a problem that I couldn't do a
default connection without username and password. I fudged around it for
... months. Now I've gone and cleaned it up (thanks, Laird, for driving me
in the right general direction).
So, what is my current setup? IDS 11.70.FC2 (yes, I've been lazy).
Machine is 'Isis' (capital letter I) so normally my server would be
'isis_17', for example; the old machine (still used by other members of the
family) was 'osiris'. Because things were transferred, my server name is
'osiris_17'.
My Informix-related environment is:
DBDATE=Y4MD-DBEDIT=vim
DYLD_LIBRARY_PATH=/usr/lib:/usr/informix/11.70.FC2/lib:/usr/informix/11.70.FC2/l
ib/esql
INFORMIXDIR=/usr/informix/11.70.FC2
INFORMIXSERVER=osiris_17
INFORMIXTERM=terminfoIXD=/usr/informix/11.70.FC2
LANG=en_US.UTF-8
LD_LIBRARY_PATH=/usr/lib:/usr/gnu/lib:/usr/gcc/v4.7.0/lib
ONCONFIG=onconfig.osiris_17
PATH=.:/Users/jleffler/bin:/usr/informix/11.70.FC2/bin:/usr/gcc/v4.7.0/bin:/usr/informix/11.70.FC2:/Users/jleffler/perl/v5.14.1/bin:/usr/gnu/bin:/usr/local/bin:
/usr/bin:/bin:/usr/sbin:/sbin
TERM=xterm-color
Clearly, this is not an out-of-the-box install; I've created myself an
INFORMIXDIR under /usr/informix with symlinks to the files in
/Applications/ibm/informix/IDS-11.70.FC2/ (so even under
/Applications/IBM/informix, I've used a version-specific sub-directory, so
I can still have IDS 11.70.FC1 installed, for example). However, this just
explains what you see in my environment; it works fine.
The relevant lines in $ONCONFIG file are:
SERVERNUM 17
DBSERVERNAME osiris_17
DBSERVERALIASES osiris_17_shm,osiris_17_tcp,osiris_17_str
NETTYPE ipcshm,1,50,CPU
NETTYPE ipcstr,1,50,CPU
NETTYPE soctcp,1,50,NET
The output from 'uname -a' is:
Darwin Isis 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST
2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64 i386 MacBookPro8,3 Darwin
The output from 'uname -n' is:
Isis
My sqlhosts file shows signs of confusion over time. It currently contains
this (except I've tagged the blocks with '# Block A' etc so that I can
discuss them):
# Block A
osiris_17 olsoctcp Isis.local 10170
osiris_17_tcp olsoctcp Isis.local 10171
osiris_17_shm olipcshm Isis.local osiris_17_shm
osiris_17_str olipcstr Isis.local osiris_17_str
# Block B
#osiris_17 olsoctcp Isis 10170
#osiris_17_tcp olsoctcp Isis 10171
#osiris_17_shm olipcshm Isis osiris_17_shm
#osiris_17_str olipcstr Isis osiris_17_str
# Block C
#osiris_17 olsoctcp localhost 10170
#osiris_17_tcp olsoctcp localhost 10171
#osiris_17_shm olipcshm localhost osiris_17_shm
#osiris_17_str olipcstr localhost osiris_17_str
# Block D
# osiris_17 - /usr/informix/11.70.FC2
#osiris_17 olsoctcp Osiris.local 10170
#osiris_17_tcp olsoctcp Osiris.local 10171
#osiris_17_shm olipcshm Osiris.local osiris_17_shm
#osiris_17_str olipcstr Osiris.local osiris_17_str
Up until I started investigating, Blocks A and B were not in the file,
Block C was uncommented and 'working' (but only up to a point), and Block D
was commented out. Block D was in use on my previous machine, Osiris, at
some point (and so was Block C, I think).
So, Block C 'worked' (and was in use for a number of months), but didn't
work very well. The administration via the command line was fine. But
simple connections to a database required a user name and password. Since
SQLCMD can use a file with database@server, user name and password
(SQLCMDPASSWORDS is the env var), I lazily edited that and enabled
connections which would automatically collect a username and password.
Checking things out just now, Block B allowed the server to come up.
However, although the shared memory and streams connections worked, the TCP
connections didn't (SQL -25595: Invalid message received during connection
attempt.).
When I switched to Block A in the sqlhosts file, all the server names allow
me to connect locally without a password, which is a distinct improvement.
Your machine name is quite long (26 characters if I counted correctly); you
don't want it to be much longer than that. IIRC, there's a limit of 31 or
32 on the host name, either imposed by Informix or perhaps even by the IETF.
I've not configured any DRDA protocol server alias (using the drsoctcp
protocol); I've not tried using the DRDA clients on Mac. Nor have I done
anything with JDBC, so your connection string info, Laird, may be useful
if/when I try.
--
Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
--e89a8f2348bf8a763c04bf7af221