I am crazy, trying to configure JDBC.
Posted in 2000
A user on NT tried to connect via Informix JDBC to IDS 7.31 on AIX and got IfxASFException / "error connecting to database" from the jlogin demo, unsure how sqlhosts, /etc/services and hosts should be set. Respondents pointed out that the named server (halcon_shm) is a shared-memory (olipcshm) entry, so its port is irrelevant and it can't be used remotely; only the olsoctcp alias works for JDBC. They also flagged two sqlhosts entries sharing the sqlturbo service and an alias (ceuscli) missing from DBSERVERALIASES, and suggested unique service names plus testing with dbaccess. The poster still could not connect remotely; 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, Networking & sqlhosts Configuration, Java & JDBC Development
Hi all, I have been two days looking for information about configuring JDBC in my NT Workstation for accesing to my IBM f50 in AIX, Version 4.3, Informix Dynamic Server Version 7.31.UC5. I installed the JDBC drivers and tested the demo applications and they doesn't work, but i don't know how it could be the files sqlhosts, services, hosts and others in my f50. I don't know where i have to look for, it will be fantastic if anyone could help me, because i don't like ODBC if i can use JDBC. Thank you very much in advance. -- Jorge Palanques Spain Sent via Deja.com http://www.deja.com/ Before you buy.
Jorge, can you post a small sample of code that does not work? What exceptions are you getting? Do you have setnet32 up and running to verify your connectivity? Cheers-- Charles jps1x2 <jps1x2@yahoo.com> wrote in article <8tuatm$4e6$1@nnrp1.deja.com>... > Hi all, > > I have been two days looking for information about configuring JDBC in > my NT Workstation for accesing to my IBM f50 in AIX, Version 4.3, > Informix Dynamic Server Version 7.31.UC5. > > I installed the JDBC drivers and tested the demo applications and they > doesn't work, but i don't know how it could be the files sqlhosts, > services, hosts and others in my f50. > > I don't know where i have to look for, it will be fantastic if anyone > could help me, because i don't like ODBC if i can use JDBC. > > Thank you very much in advance. > > -- > Jorge Palanques > Spain > > > Sent via Deja.com http://www.deja.com/ > Before you buy. >
Ok,
this is the sqlhosts file in the $INFORMIXDIR/etc/
ceuscli olsoctcp f50 sqlturbo
halcon olsoctcp f50 sqlturbo
halcon_shm olipcshm f50 srv_agent
the server is halcon_shm
this is a piece of /etc/services
isode-dua 17007/udp
srv_agent 1530/tcp
sqlturbo 1526/tcp
tunodbc200.ifx 5371/tcp
I am using Forte for Java 1.0. I try to run jlogin (downloaded from
informix), i put the hostname of the server "f50", the port 1530 or
1526, a good username and password, the server name "halcon_shm", and
the database "dbu".
When i click on Ping DB Server, if the port is 1526, it puts:
Connecting to server...
... connected.
Disconnecting from server...
... disconnected.
If the port is 1530 when i click Ping DB Server it puts:
Connecting to server...
Error ocurred while connecting to server:
com.informix.asf.IfxASFException.
If i click on Ping Database and the port is 1526, it puts:
Error ocurred while connecting to database: null
if i click on Ping Database and the port is 1530, it puts:
Error ocurred while connecting to database:
com.informix.asf.IfxASFException.
What is setnet32?
Thank you very much Charles.
--
Jorge Palanques
Spain
In article <01c045ab$7fda21e0$2f0a020a@pc0333>,
charles.johnson@news.accessllc.net wrote:
> Jorge, can you post a small sample of code that does not work?
>
> What exceptions are you getting?
>
> Do you have setnet32 up and running to verify your connectivity?
>
> Cheers--
> Charles
>
> jps1x2 <jps1x2@yahoo.com> wrote in article <8tuatm$4e6
$1@nnrp1.deja.com>...
> > Hi all,
> >
> > I have been two days looking for information about configuring JDBC
in
> > my NT Workstation for accesing to my IBM f50 in AIX, Version 4.3,
> > Informix Dynamic Server Version 7.31.UC5.
> >
> > I installed the JDBC drivers and tested the demo applications and
they
> > doesn't work, but i don't know how it could be the files sqlhosts,
> > services, hosts and others in my f50.
> >
> > I don't know where i have to look for, it will be fantastic if
anyone
> > could help me, because i don't like ODBC if i can use JDBC.
> >
> > Thank you very much in advance.
> >
> > --
> > Jorge Palanques
> > Spain
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
Sent via Deja.com http://www.deja.com/
Before you buy.
First, halcon_shm looks like a shared memory connection, how come it
listens to a tcp port ?
Second, do you have DBSERVERNAME and DBSERVERALIASES set properly in
onconfig ? Can you connect with dbaccess to halcon_shm ?
HIH,
Bogdan Neagu
jps1x2 wrote:
> Ok,
>
> this is the sqlhosts file in the $INFORMIXDIR/etc/
>
> ceuscli olsoctcp f50 sqlturbo
> halcon olsoctcp f50 sqlturbo
> halcon_shm olipcshm f50 srv_agent>
> the server is halcon_shm
>
> this is a piece of /etc/services
>
> isode-dua 17007/udp
> srv_agent 1530/tcp
> sqlturbo 1526/tcp
> tunodbc200.ifx 5371/tcp
>
> I am using Forte for Java 1.0. I try to run jlogin (downloaded from
> informix), i put the hostname of the server "f50", the port 1530 or
> 1526, a good username and password, the server name "halcon_shm", and
> the database "dbu".
>
> When i click on Ping DB Server, if the port is 1526, it puts:
>
> Connecting to server...
> ... connected.
> Disconnecting from server...
> ... disconnected.
>
> If the port is 1530 when i click Ping DB Server it puts:
>
> Connecting to server...
> Error ocurred while connecting to server:
> com.informix.asf.IfxASFException.
>
> If i click on Ping Database and the port is 1526, it puts:
>
> Error ocurred while connecting to database: null
>
> if i click on Ping Database and the port is 1530, it puts:
>
> Error ocurred while connecting to database:
> com.informix.asf.IfxASFException.
>
> What is setnet32?
>
> Thank you very much Charles.
Ok, i looked for onconfig and i found that:
# System Configuration
SERVERNUM 0 # Unique id corresponding to a OnLineinstance
DBSERVERNAME halcon # Name of default database server
DBSERVERALIASES halcon_shm # List of alternate dbservernames
#NETTYPE soctcp,2,25,NET
NETTYPE ipcshm,2,200,CPU
but i try putting halcon on server and, ports 1526 and 1530 and i have
the same response.
Is this possible that the port the server is listening is not 1526 or
1530?
Thank you very much.
--
Jorge Palanques
Spain
In article <3A030F6B.1DF4678@alcatel.com>,
Bogdan Neagu <bogdan.neagu@alcatel.com> wrote:
> First, halcon_shm looks like a shared memory connection, how come it
> listens to a tcp port ?
>
> Second, do you have DBSERVERNAME and DBSERVERALIASES set properly in
> onconfig ? Can you connect with dbaccess to halcon_shm ?
>
> HIH,
>
> Bogdan Neagu
>
> jps1x2 wrote:
>
> > Ok,
> >
> > this is the sqlhosts file in the $INFORMIXDIR/etc/
> >
> > ceuscli olsoctcp f50 sqlturbo
> > halcon olsoctcp f50 sqlturbo
> > halcon_shm olipcshm f50 srv_agent> >
> > the server is halcon_shm
> >
> > this is a piece of /etc/services
> >
> > isode-dua 17007/udp
> > srv_agent 1530/tcp
> > sqlturbo 1526/tcp
> > tunodbc200.ifx 5371/tcp
> >
> > I am using Forte for Java 1.0. I try to run jlogin (downloaded from
> > informix), i put the hostname of the server "f50", the port 1530 or
> > 1526, a good username and password, the server name "halcon_shm",
and
> > the database "dbu".
> >
> > When i click on Ping DB Server, if the port is 1526, it puts:
> >
> > Connecting to server...
> > ... connected.
> > Disconnecting from server...
> > ... disconnected.
> >
> > If the port is 1530 when i click Ping DB Server it puts:
> >
> > Connecting to server...
> > Error ocurred while connecting to server:
> > com.informix.asf.IfxASFException.
> >
> > If i click on Ping Database and the port is 1526, it puts:
> >
> > Error ocurred while connecting to database: null
> >
> > if i click on Ping Database and the port is 1530, it puts:
> >
> > Error ocurred while connecting to database:
> > com.informix.asf.IfxASFException.
> >
> > What is setnet32?
> >
> > Thank you very much Charles.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Hi all again,
I made "netstat -a" in my server and it shows these ports listening:
tcp4 0 0 f50.orasrv *.* LISTEN
tcp4 0 0 *.srv_agen *.* LISTEN
tcp4 0 0 *.smtp *.* LISTEN
tcp4 0 0 loopback.49213 *.* LISTEN
tcp4 0 0 *.writesrv *.* LISTEN
tcp4 0 0 *.32771 *.* LISTEN
tcp4 0 0 *.889 *.* LISTEN
tcp4 0 0 *.888 *.* LISTEN
tcp4 0 0 *.32770 *.* LISTEN
tcp4 0 0 *.shilp *.* LISTEN
tcp4 0 0 *.32769 *.* LISTEN
tcp4 0 0 *.sqlexec *.* LISTEN
tcp4 0 0 *.smux *.* LISTEN
tcp4 0 0 *.tunodbc2 *.* LISTEN
tcp4 0 0 *.time *.* LISTEN
tcp4 0 0 *.daytime *.* LISTEN
tcp4 0 0 *.chargen *.* LISTEN
tcp4 0 0 *.discard *.* LISTEN
tcp4 0 0 *.echo *.* LISTEN
tcp 0 0 *.exec *.* LISTEN
tcp4 0 0 *.klogin *.* LISTEN
tcp 0 0 *.login *.* LISTEN
tcp4 0 0 *.kshell *.* LISTEN
tcp 0 0 *.shell *.* LISTEN
tcp 0 0 *.telnet *.* LISTEN
tcp 0 0 *.ftp *.* LISTEN
tcp4 0 0 *.sunrpc *.* LISTEN
Please, could you help me configuring JDBC.
Thanks in advance.
--
Jorge Palanques
Spain
In article <8u0qq5$4pe$1@nnrp1.deja.com>,
jps1x2 <jps1x2@yahoo.com> wrote:
> Ok, i looked for onconfig and i found that:
>
> # System Configuration
> SERVERNUM 0 # Unique id corresponding to a OnLine> instance
> DBSERVERNAME halcon # Name of default database server
> DBSERVERALIASES halcon_shm # List of alternate dbservernames
> #NETTYPE soctcp,2,25,NET
> NETTYPE ipcshm,2,200,CPU>
> but i try putting halcon on server and, ports 1526 and 1530 and i have
> the same response.
>
> Is this possible that the port the server is listening is not 1526 or
> 1530?
>
> Thank you very much.
>
> --
> Jorge Palanques
> Spain
>
> In article <3A030F6B.1DF4678@alcatel.com>,
> Bogdan Neagu <bogdan.neagu@alcatel.com> wrote:
> > First, halcon_shm looks like a shared memory connection, how come it
> > listens to a tcp port ?
> >
> > Second, do you have DBSERVERNAME and DBSERVERALIASES set properly in
> > onconfig ? Can you connect with dbaccess to halcon_shm ?
> >
> > HIH,
> >
> > Bogdan Neagu
> >
> > jps1x2 wrote:
> >
> > > Ok,
> > >
> > > this is the sqlhosts file in the $INFORMIXDIR/etc/
> > >
> > > ceuscli olsoctcp f50 sqlturbo
> > > halcon olsoctcp f50 sqlturbo
> > > halcon_shm olipcshm f50 srv_agent> > >
> > > the server is halcon_shm
> > >
> > > this is a piece of /etc/services
> > >
> > > isode-dua 17007/udp
> > > srv_agent 1530/tcp
> > > sqlturbo 1526/tcp
> > > tunodbc200.ifx 5371/tcp
> > >
> > > I am using Forte for Java 1.0. I try to run jlogin (downloaded
from
> > > informix), i put the hostname of the server "f50", the port 1530
or
> > > 1526, a good username and password, the server name "halcon_shm",
> and
> > > the database "dbu".
> > >
> > > When i click on Ping DB Server, if the port is 1526, it puts:
> > >
> > > Connecting to server...
> > > ... connected.
> > > Disconnecting from server...
> > > ... disconnected.
> > >
> > > If the port is 1530 when i click Ping DB Server it puts:
> > >
> > > Connecting to server...
> > > Error ocurred while connecting to server:
> > > com.informix.asf.IfxASFException.
> > >
> > > If i click on Ping Database and the port is 1526, it puts:
> > >
> > > Error ocurred while connecting to database: null
> > >
> > > if i click on Ping Database and the port is 1530, it puts:
> > >
> > > Error ocurred while connecting to database:
> > > com.informix.asf.IfxASFException.
> > >
> > > What is setnet32?
> > >
> > > Thank you very much Charles.
> >
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Hi again.
My opinion (and I might be wrong) is that:
- halcon_shm uses shared memory, so the port does not matter.
- there are two listeners to the same port, halcon and ceuscli. I am not
sure if you can have that. And ceuscli is not in DBSERVERALIASES.
I would get rid of ceuscli (or change the port ) and change the service
name for halcon_shm from srv_agent to halcon_shm (a dummy one).
Can you connect from dbaccess ?
I hope things are similar in IDS and XPS (you are running XPS ?).
HTH
Bogdan
jps1x2 wrote:
> Ok, i looked for onconfig and i found that:
>
> # System Configuration
> SERVERNUM 0 # Unique id corresponding to a OnLine> instance
> DBSERVERNAME halcon # Name of default database server
> DBSERVERALIASES halcon_shm # List of alternate dbservernames
> #NETTYPE soctcp,2,25,NET
> NETTYPE ipcshm,2,200,CPU>
> but i try putting halcon on server and, ports 1526 and 1530 and i have
> the same response.
>
> Is this possible that the port the server is listening is not 1526 or
> 1530?
>
> Thank you very much.
>
> --
> Jorge Palanques
> Spain
>
> In article <3A030F6B.1DF4678@alcatel.com>,
> Bogdan Neagu <bogdan.neagu@alcatel.com> wrote:
> > First, halcon_shm looks like a shared memory connection, how come it
> > listens to a tcp port ?
> >
> > Second, do you have DBSERVERNAME and DBSERVERALIASES set properly in
> > onconfig ? Can you connect with dbaccess to halcon_shm ?
> >
> > HIH,
> >
> > Bogdan Neagu
> >
> > jps1x2 wrote:
> >
> > > Ok,
> > >
> > > this is the sqlhosts file in the $INFORMIXDIR/etc/
> > >
> > > ceuscli olsoctcp f50 sqlturbo
> > > halcon olsoctcp f50 sqlturbo
> > > halcon_shm olipcshm f50 srv_agent> > >
> > > the server is halcon_shm
> > >
> > > this is a piece of /etc/services
> > >
> > > isode-dua 17007/udp
> > > srv_agent 1530/tcp
> > > sqlturbo 1526/tcp
> > > tunodbc200.ifx 5371/tcp
> > >
> > > I am using Forte for Java 1.0. I try to run jlogin (downloaded from
> > > informix), i put the hostname of the server "f50", the port 1530 or
> > > 1526, a good username and password, the server name "halcon_shm",
> and
> > > the database "dbu".
> > >
> > > When i click on Ping DB Server, if the port is 1526, it puts:
> > >
> > > Connecting to server...
> > > ... connected.
> > > Disconnecting from server...
> > > ... disconnected.
> > >
> > > If the port is 1530 when i click Ping DB Server it puts:
> > >
> > > Connecting to server...
> > > Error ocurred while connecting to server:
> > > com.informix.asf.IfxASFException.
> > >
> > > If i click on Ping Database and the port is 1526, it puts:
> > >
> > > Error ocurred while connecting to database: null
> > >
> > > if i click on Ping Database and the port is 1530, it puts:
> > >
> > > Error ocurred while connecting to database:
> > > com.informix.asf.IfxASFException.
> > >
> > > What is setnet32?
> > >
> > > Thank you very much Charles.
> >
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Hi again,
I open dbaccess, Connection | Connect, and if i choose ceuscli, it
shows an error:
761: INFORMIXSERVER does not match either DBSERVERNAME orDBSERVERALIASES.
But if i choose halcon or halcon_shm, it works fine.
We have an ibm e30 too with the same database engine installed on it,
its sqlhosts is like follows:
<pre>
halcon olsoctcp e30risc sqlturbo
halcon_shm olipcshm e30risc srv_agent
halconf50 olsoctcp f50 sqlturbof50
halconf50_shm olipcshm f50 srv_agentf50
hpruebas olsoctcp e30risc sqltpru
hpruebas_shm olipcshm e30risc srv_agpru
</pre>
I go to its onconfig and it is like follows:
<pre>
# System Configuration
SERVERNUM 1
DBSERVERNAME hpruebas
DBSERVERALIASES hpruebas_shm
#NETTYPE soctcp,2,25,NET
NETTYPE ipcshm,2,200,CPU
</pre>
but if i try to connect from the e30 dbaccess to f50 server (halcon) it
shows that message:
908: Attempt to connect to database server (halcon) failed.No record locks available
connecting from e30 to f50 server (halcon_shm):
25588: The appl process cannot connect to Dynamic server halcon_shm.Nosuch file or directory
connecting from e30 to f50 server (halconf50):
908: Attempt to connect to database server (halconf50) failed.Not adata message
and connecting from e30 to f50 server (halconf50_shm):
25588: The appl process cannot connect to Dynamic server halconf50_shm.No such file or directory
Is this posible that the system doesn't allow to connect external hosts
to the server. Where could i find who is allowed to connect to the
server?
Thanks.
--
Jorge Palanques
Spain
In article <3A06B7A2.B20FAA9D@alcatel.com>,
Bogdan Neagu <bogdan.neagu@alcatel.com> wrote:
> Hi again.
>
> My opinion (and I might be wrong) is that:
>
> - halcon_shm uses shared memory, so the port does not matter.
> - there are two listeners to the same port, halcon and ceuscli. I am
not
> sure if you can have that. And ceuscli is not in DBSERVERALIASES.
>
> I would get rid of ceuscli (or change the port ) and change the
service
> name for halcon_shm from srv_agent to halcon_shm (a dummy one).
>
> Can you connect from dbaccess ?
>
> I hope things are similar in IDS and XPS (you are running XPS ?).
>
> HTH
>
> Bogdan
>
> jps1x2 wrote:
>
> > Ok, i looked for onconfig and i found that:
> >
> > # System Configuration
> > SERVERNUM 0 # Unique id corresponding to aOnLine
> > instance
> > DBSERVERNAME halcon # Name of default database server
> > DBSERVERALIASES halcon_shm # List of alternate dbservernames
> > #NETTYPE soctcp,2,25,NET
> > NETTYPE ipcshm,2,200,CPU> >
> > but i try putting halcon on server and, ports 1526 and 1530 and i
have
> > the same response.
> >
> > Is this possible that the port the server is listening is not 1526
or
> > 1530?
> >
> > Thank you very much.
> >
> > --
> > Jorge Palanques
> > Spain
> >
> > In article <3A030F6B.1DF4678@alcatel.com>,
> > Bogdan Neagu <bogdan.neagu@alcatel.com> wrote:
> > > First, halcon_shm looks like a shared memory connection, how come
it
> > > listens to a tcp port ?
> > >
> > > Second, do you have DBSERVERNAME and DBSERVERALIASES set properly
in
> > > onconfig ? Can you connect with dbaccess to halcon_shm ?
> > >
> > > HIH,
> > >
> > > Bogdan Neagu
> > >
> > > jps1x2 wrote:
> > >
> > > > Ok,
> > > >
> > > > this is the sqlhosts file in the $INFORMIXDIR/etc/
> > > >
> > > > ceuscli olsoctcp f50 sqlturbo
> > > > halcon olsoctcp f50 sqlturbo
> > > > halcon_shm olipcshm f50 srv_agent> > > >
> > > > the server is halcon_shm
> > > >
> > > > this is a piece of /etc/services
> > > >
> > > > isode-dua 17007/udp
> > > > srv_agent 1530/tcp
> > > > sqlturbo 1526/tcp
> > > > tunodbc200.ifx 5371/tcp
> > > >
> > > > I am using Forte for Java 1.0. I try to run jlogin (downloaded
from
> > > > informix), i put the hostname of the server "f50", the port
1530 or
> > > > 1526, a good username and password, the server
name "halcon_shm",
> > and
> > > > the database "dbu".
> > > >
> > > > When i click on Ping DB Server, if the port is 1526, it puts:
> > > >
> > > > Connecting to server...
> > > > ... connected.
> > > > Disconnecting from server...
> > > > ... disconnected.
> > > >
> > > > If the port is 1530 when i click Ping DB Server it puts:
> > > >
> > > > Connecting to server...
> > > > Error ocurred while connecting to server:
> > > > com.informix.asf.IfxASFException.
> > > >
> > > > If i click on Ping Database and the port is 1526, it puts:
> > > >
> > > > Error ocurred while connecting to database: null
> > > >
> > > > if i click on Ping Database and the port is 1530, it puts:
> > > >
> > > > Error ocurred while connecting to database:
> > > > com.informix.asf.IfxASFException.
> > > >
> > > > What is setnet32?
> > > >
> > > > Thank you very much Charles.
> > >
> > >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.