You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by kavitha <ka...@gmail.com> on 2017/03/20 05:12:05 UTC
Connection not established
Hi,
I tried to establish connection. But following error message displayed.
My Code:
class Program
{
static void Main(string[] args)
{
IIgnite ignite = Ignition.Start();
OdbcConnection con = new OdbcConnection("DRIVER={Apache
Ignite};ADDRESS= localhost:10800;CACHE=MyCache;");
con.Open();
}
}
Error:
An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred in
System.Data.dll
Additional information: ERROR [08001] Failed to establish connection with
the host.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Connection-not-established-tp11303.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Connection not established
Posted by Pavel Tupitsyn <pt...@apache.org>.
Hi,
Looks like you have mixed up Spring XML and .NET config XML.
Moreover, you don't provide any configuration file when starting Ignite
with Ignition.Start();
To work with ODBC from .NET, you have to configure ODBC in a Spring XML
file (NOT app.config) like this:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="odbcConfiguration">
<bean class="org.apache.ignite.configuration.OdbcConfiguration"/>
</property>
</bean></beans>
then provide path to that file Ignition.Start("my-file.xml");
On Tue, Mar 21, 2017 at 7:41 AM, kavitha <ka...@gmail.com> wrote:
> Hi,
>
> My Code in app.config file.
>
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <startup>
> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"
> />
> </startup>
> <bean id="ignite.cfg"
> class="org.apache.ignite.configuration.IgniteConfiguration">
>
> <property name="odbcConfiguration">
> <bean class="org.apache.ignite.configuration.OdbcConfiguration"/>
> </property>
>
> </bean>
> </configuration>
>
> packages.config file
>
> <?xml version="1.0" encoding="utf-8"?>
> <packages>
> <package id="Apache.Ignite" version="1.9.0" targetFramework="net45" />
> </packages>
>
> code in class file
>
> class Program
> {
> static void Main(string[] args)
> {
> IIgnite ignite = Ignition.Start();
> OdbcConnection con = new OdbcConnection("DRIVER={Apache
> Ignite};ADDRESS=localhost:10800;CACHE=MyCache");
> con.Open();
> con.Close();
> }
> }
>
> Still I got ERROR [08001] Failed to establish connection with
> the host.
>
> Please tell me how can I resolve this?
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Connection-not-established-tp11303p11331.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: Connection not established
Posted by kavitha <ka...@gmail.com>.
Hi,
My Code in app.config file.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="odbcConfiguration">
<bean class="org.apache.ignite.configuration.OdbcConfiguration"/>
</property>
</bean>
</configuration>
packages.config file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Apache.Ignite" version="1.9.0" targetFramework="net45" />
</packages>
code in class file
class Program
{
static void Main(string[] args)
{
IIgnite ignite = Ignition.Start();
OdbcConnection con = new OdbcConnection("DRIVER={Apache
Ignite};ADDRESS=localhost:10800;CACHE=MyCache");
con.Open();
con.Close();
}
}
Still I got ERROR [08001] Failed to establish connection with
the host.
Please tell me how can I resolve this?
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Connection-not-established-tp11303p11331.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Connection not established
Posted by Igor Sapego <is...@apache.org>.
This means exactly what it says - driver can't establish connection to the
node.
Most probably, you have not enabled OdbcProcessor for your node. You can
see documentation [1] to learn how to enable it.
[1] -
https://apacheignite.readme.io/docs/odbc-driver#section-cluster-configuration
On Mon, Mar 20, 2017 at 8:12 AM, kavitha <ka...@gmail.com> wrote:
> Hi,
>
> I tried to establish connection. But following error message displayed.
>
> My Code:
>
> class Program
> {
> static void Main(string[] args)
> {
> IIgnite ignite = Ignition.Start();
> OdbcConnection con = new OdbcConnection("DRIVER={Apache
> Ignite};ADDRESS= localhost:10800;CACHE=MyCache;");
> con.Open();
> }
> }
>
> Error:
> An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred
> in
> System.Data.dll
>
> Additional information: ERROR [08001] Failed to establish connection with
> the host.
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Connection-not-established-tp11303.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>