You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Denis Magda <dm...@gridgain.com> on 2016/05/04 12:40:56 UTC

Re: Azure App Service compatible?

Hi,

Seems that in your case the multicast IP finder is used (default one) and
most likely the multicast is disable in your network environment.

I would suggest you using the static IP finder that allows to predefine a
list of all Ignite nodes that must form a cluster [1].

In addition if you need to bind a node to a specific network interface you
can set IgniteConfiguration.setLocalHost(...) to a specific address like
setLocalHost("98.12.34.12").

[1]
https://apacheignite.readme.io/docs/cluster-config#static-ip-based-discovery

--
Denis



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Azure-App-Service-compatible-tp4743p4765.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Azure App Service compatible?

Posted by azureappserviceuser <ak...@k2geospatial.com>.
The TcpDiscoverySharedFsIpFinder with localHost 127.0.0.1 did the trick! 
Also works correctly when scaling out (multiple instances).  Thanks Denis!   
(Sorry for long reply delay, was certain I had posted this a while back!)



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Azure-App-Service-compatible-tp4743p7609.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Azure App Service compatible?

Posted by Denis Magda <dm...@gridgain.com>.
Just doubled checked and figured out that it won’t be possible to use TcpDiscoveryCloudIpFinder on Azure cloud.
The IP finder relies on Compute Service functionality from JClouds but unfortunately Azure is not in “ComputeService” list of supported providers [1].

It means that a special IP finder has to be created for Azure cloud. I’ve create a ticket [2]. Probably someone shows interest in it in the nearest time and will implement.

In the meanwhile, the error you’re facing with is not related to IP finder. Was it reproduced when you used the static IP finder? Will it disappear if you set IgniteConfiguration.setLocalHost(…) explicitly to some network address?

Finally, you mentioned that there is a shared file system that will be accessible by all the nodes. In such a case you can give a try to shared file system IP finder [3] (sorry documentation on readme.io <http://readme.io/> is missing). 

If the shared file system IP finder won’t work for you as well then give a try to JDBC IP Finder [4].

[1] http://jclouds.apache.org/reference/providers/ <http://jclouds.apache.org/reference/providers/>
[2] https://issues.apache.org/jira/browse/IGNITE-3173 <https://issues.apache.org/jira/browse/IGNITE-3173>
[3] https://github.com/apache/ignite/blob/2cfe0cb5a0d84caede8b528b0a515ab4ba92bbc6/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinder.java
[4] https://apacheignite.readme.io/docs/cluster-config#jdbc-based-discovery <https://apacheignite.readme.io/docs/cluster-config#jdbc-based-discovery>

—
Denis
 
> On May 18, 2016, at 4:48 PM, azureappserviceuser <ak...@k2geospatial.com> wrote:
> 
> Managed to get it working using your first technique.  (Thanks!)  Issue is,
> one of the selling points of app service is scaling; you deploy webapps, and
> can automatically scale them to multiple instances.  Azure automatically
> load balances and all you have to maintain is a single deployment.  So using
> the above configuration, first/single instance works, but scaling does not
> work, as all scaled instance share the same file system and so a single
> configuration file yet different IPs... 
> 
> So unless I'm missing something, the JClouds option seems the only valid
> choice for App Service, scaling and Ignite.  But I can't seem to get it
> working...  After resolving some class/jar issues, still getting some
> binding issues... It doesn't seem to be related to TcpDiscoveryCloudIpFinder
> or AzureBlob, just some plain network errors:
> - "Failed to resolve local host to addresses: 0.0.0.0/0.0.0.0"
> - "No network addresses found (is networking enabled?)." 
> 
> Shouldn't using the TcpDiscoveryCloudIpFinder/JCloud bypass all of those?  I
> think JClouds might never have been tested in App Service...  
> 
> =================================================================
> 			  <property name="discoverySpi">
> 			    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
> 			      <property name="ipFinder">
> 			        <bean
> class="org.apache.ignite.spi.discovery.tcp.ipfinder.cloud.TcpDiscoveryCloudIpFinder">
> 			          <property name="provider" value="azureblob"/>
> 			          <property name="identity" value="xxx"/>
> 			          <property name="credential" value="xyz"/>
> 			        </bean>
> 			      </property>
> 			    </bean>
> 			  </property>
> 
> 18-May-2016 12:38:50.392 SEVERE [localhost-startStop-1]
> org.apache.catalina.core.StandardContext.listenerStart Exception sending
> context initialized event to listener instance of class
> com.k2.rls.j2ee.ContextListener
> class org.apache.ignite.IgniteException: Failed to start manager:
> GridManagerAdapter [enabled=true,
> name=org.apache.ignite.internal.managers.communication.GridIoManager]
> 	at
> org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:882)
> 	at org.apache.ignite.Ignition.start(Ignition.java:349)
> 	at com.k2.rls.IgniteService.start(IgniteService.java:18)
> 	at
> com.k2.rls.j2ee.ContextListener.contextInitialized(ContextListener.java:13)
> 	at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
> 	at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> 	at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
> 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
> 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
> 	at
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1101)
> 	at
> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1786)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start
> manager: GridManagerAdapter [enabled=true,
> name=org.apache.ignite.internal.managers.communication.GridIoManager]
> 	at
> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
> 	at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:859)
> 	at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1618)
> 	at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1485)
> 	at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:965)
> 	at
> org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:892)
> 	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:784)
> 	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:705)
> 	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:576)
> 	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:546)
> 	at org.apache.ignite.Ignition.start(Ignition.java:346)
> 	... 15 more
> Caused by: class org.apache.ignite.IgniteCheckedException: Failed to get SPI
> attributes.
> 	at
> org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:233)
> 	at
> org.apache.ignite.internal.managers.communication.GridIoManager.start(GridIoManager.java:236)
> 	at
> org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1500)
> 	... 25 more
> Caused by: class org.apache.ignite.spi.IgniteSpiException: Failed to resolve
> local host to addresses: 0.0.0.0/0.0.0.0
> 	at
> org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.getNodeAttributes(TcpCommunicationSpi.java:1452)
> 	at
> org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:216)
> 	... 27 more
> Caused by: class org.apache.ignite.IgniteCheckedException: No network
> addresses found (is networking enabled?).
> 	at
> org.apache.ignite.internal.util.IgniteUtils.resolveLocalAddresses(IgniteUtils.java:1834)
> 	at
> org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.getNodeAttributes(TcpCommunicationSpi.java:1439)
> 	... 28 more
> 
> 
> 
> 
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Azure-App-Service-compatible-tp4743p5020.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Azure App Service compatible?

Posted by azureappserviceuser <ak...@k2geospatial.com>.
Managed to get it working using your first technique.  (Thanks!)  Issue is,
one of the selling points of app service is scaling; you deploy webapps, and
can automatically scale them to multiple instances.  Azure automatically
load balances and all you have to maintain is a single deployment.  So using
the above configuration, first/single instance works, but scaling does not
work, as all scaled instance share the same file system and so a single
configuration file yet different IPs... 

So unless I'm missing something, the JClouds option seems the only valid
choice for App Service, scaling and Ignite.  But I can't seem to get it
working...  After resolving some class/jar issues, still getting some
binding issues... It doesn't seem to be related to TcpDiscoveryCloudIpFinder
or AzureBlob, just some plain network errors:
- "Failed to resolve local host to addresses: 0.0.0.0/0.0.0.0"
- "No network addresses found (is networking enabled?)." 

Shouldn't using the TcpDiscoveryCloudIpFinder/JCloud bypass all of those?  I
think JClouds might never have been tested in App Service...  

=================================================================
			  <property name="discoverySpi">
			    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
			      <property name="ipFinder">
			        <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.cloud.TcpDiscoveryCloudIpFinder">
			          <property name="provider" value="azureblob"/>
			          <property name="identity" value="xxx"/>
			          <property name="credential" value="xyz"/>
			        </bean>
			      </property>
			    </bean>
			  </property>

18-May-2016 12:38:50.392 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.listenerStart Exception sending
context initialized event to listener instance of class
com.k2.rls.j2ee.ContextListener
 class org.apache.ignite.IgniteException: Failed to start manager:
GridManagerAdapter [enabled=true,
name=org.apache.ignite.internal.managers.communication.GridIoManager]
	at
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:882)
	at org.apache.ignite.Ignition.start(Ignition.java:349)
	at com.k2.rls.IgniteService.start(IgniteService.java:18)
	at
com.k2.rls.j2ee.ContextListener.contextInitialized(ContextListener.java:13)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1101)
	at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1786)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start
manager: GridManagerAdapter [enabled=true,
name=org.apache.ignite.internal.managers.communication.GridIoManager]
	at
org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
	at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:859)
	at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1618)
	at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1485)
	at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:965)
	at
org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:892)
	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:784)
	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:705)
	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:576)
	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:546)
	at org.apache.ignite.Ignition.start(Ignition.java:346)
	... 15 more
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to get SPI
attributes.
	at
org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:233)
	at
org.apache.ignite.internal.managers.communication.GridIoManager.start(GridIoManager.java:236)
	at
org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1500)
	... 25 more
Caused by: class org.apache.ignite.spi.IgniteSpiException: Failed to resolve
local host to addresses: 0.0.0.0/0.0.0.0
	at
org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.getNodeAttributes(TcpCommunicationSpi.java:1452)
	at
org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:216)
	... 27 more
Caused by: class org.apache.ignite.IgniteCheckedException: No network
addresses found (is networking enabled?).
	at
org.apache.ignite.internal.util.IgniteUtils.resolveLocalAddresses(IgniteUtils.java:1834)
	at
org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.getNodeAttributes(TcpCommunicationSpi.java:1439)
	... 28 more




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Azure-App-Service-compatible-tp4743p5020.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Azure App Service compatible?

Posted by Denis Magda <dm...@gridgain.com>.
Try to bind every node to a specific network interface. Let's say that you
have two machines in Azure one of which has address 100.78.18.18 while the
other 100.78.18.19.

Then in the configuration of machine A set the following parameter
IgniteConfiguration.setLocalHost(100.78.18.18) while on machine B -
IgniteConfiguration.setLocalHost(100.78.18.19). You can easily transform
this into Spring xml format. After that each node that is started on a
particular machine will bind to a corresponding interface.

Next step is to list all this interfaces in TcpDiscoveryVmIpFinder in the
configurations on every machine.

<property name="addresses">
   <list>
       <value>100.78.18.19:47500...47510</value>
       <value>100.78.18.18:47500...47510</value>
  </list>
</property>

After that everything should work fine. However double check that each
machine can ping each other and that the following ports are opened
47500-47510, 47100-47200.

One more solution is to use JClouds IP finder that support Azure [1]. You
can give it a try.

[1] https://apacheignite.readme.io/docs/generic-cloud-configuration

Finally, you're still unregistered on the user list and we don't receive
messages from you. Please properly subscribe to the user list (this way we
will not have to manually approve your emails). All you need to do is send
an email to ì user-subscribe@ignite.apache.orgî and follow simple
instructions in the reply.

--
Denis



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Azure-App-Service-compatible-tp4743p4824.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.