You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by roar109 <ro...@gmail.com> on 2015/09/16 18:58:26 UTC
OverlappingFileLockException in nodes startup same time in Linux
I'm facing an issue with my box when I try to run 2 clients (diferent wars)
in jboss eap 6.3 in Linux.
Details:
- 1 Jboss as server node
- 1 Jboss with 2 wars, each war is a ignite as a client connecting to the
server node
- Ignite 1.3.0
- Jboss EAP 6.3
- Linux CentOS (both)
Steps to reproduce:
Run jboss standalone profile with 2 wars: the last war in running fails
I tried the same in windows but looks like there works.
Looking into the Ignite code looks like is creating a file in the tmp folder
and lock it when try to do some process:
File tmpDir = getUserSpecificTempDir();
File lockFile = new File(tmpDir, "igniteshmem.lock");
// Obtain lock on file to prevent concurrent extracts.
try (RandomAccessFile randomAccessFile = new
RandomAccessFile(lockFile, "rws");
*FileLock ignored = randomAccessFile.getChannel().lock()) {*
if (extractAndLoad(errs, tmpDir,
platformSpecificResourcePath()))
Complete StackTrace:
https://gist.github.com/roar109/6e982bd83baf3e1624af
The only workaround I see is deploying in sequential order but is not
something I would like to do.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/OverlappingFileLockException-in-nodes-startup-same-time-in-Linux-tp1415.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: OverlappingFileLockException in nodes startup same time in Linux
Posted by Sergi Vladykin <se...@gmail.com>.
Another option is to put Ignite in some common module for all the
applications that require Ignite. This way Ignite
classes must be loaded only once.
See https://docs.jboss.org/author/display/WFLY9/Class+Loading+in+WildFly
Sergi
2015-09-17 2:27 GMT+03:00 vkulichenko <va...@gmail.com>:
> roar109 wrote
> > If I understand your suggestion correctly is to make single Ignite
> > instance per jboss in this case to avoid this sync mechanism?
>
> This should help too. But it sounds like that in your case you can simply
> disable shared memory communication. To do this add the following in your
> configuration file:
>
> <property name="communicationSpi">
> <bean
> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
> <property name="sharedMemoryPort" value="-1"/>
> </bean>
> </property>
>
> -Val
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/OverlappingFileLockException-in-nodes-startup-same-time-in-Linux-tp1415p1428.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
Re: OverlappingFileLockException in nodes startup same time in
Linux
Posted by vkulichenko <va...@gmail.com>.
roar109 wrote
> If I understand your suggestion correctly is to make single Ignite
> instance per jboss in this case to avoid this sync mechanism?
This should help too. But it sounds like that in your case you can simply
disable shared memory communication. To do this add the following in your
configuration file:
<property name="communicationSpi">
<bean
class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
<property name="sharedMemoryPort" value="-1"/>
</bean>
</property>
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/OverlappingFileLockException-in-nodes-startup-same-time-in-Linux-tp1415p1428.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: OverlappingFileLockException in nodes startup same time in
Linux
Posted by roar109 <ro...@gmail.com>.
If I understand your suggestion correctly is to make single Ignite instance
per jboss in this case to avoid this sync mechanism?
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/OverlappingFileLockException-in-nodes-startup-same-time-in-Linux-tp1415p1420.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: OverlappingFileLockException in nodes startup same time in Linux
Posted by Sergi Vladykin <se...@gmail.com>.
It seems that jboss starts two instances of Ignite in the same jvm in
different classloaders in parallel.
This way synchronization on IpcSharedMemoryNativeLoader.class does not help
much.
The mutex must be changed to some JVM-wide singleton object or class
instead of Ignite class.
It must be easy to fix.
Sergi
2015-09-16 19:58 GMT+03:00 roar109 <ro...@gmail.com>:
> I'm facing an issue with my box when I try to run 2 clients (diferent wars)
> in jboss eap 6.3 in Linux.
>
> Details:
>
> - 1 Jboss as server node
> - 1 Jboss with 2 wars, each war is a ignite as a client connecting to the
> server node
> - Ignite 1.3.0
> - Jboss EAP 6.3
> - Linux CentOS (both)
>
> Steps to reproduce:
> Run jboss standalone profile with 2 wars: the last war in running fails
>
> I tried the same in windows but looks like there works.
>
> Looking into the Ignite code looks like is creating a file in the tmp
> folder
> and lock it when try to do some process:
>
> File tmpDir = getUserSpecificTempDir();
>
> File lockFile = new File(tmpDir, "igniteshmem.lock");
>
> // Obtain lock on file to prevent concurrent extracts.
> try (RandomAccessFile randomAccessFile = new
> RandomAccessFile(lockFile, "rws");
> *FileLock ignored = randomAccessFile.getChannel().lock()) {*
> if (extractAndLoad(errs, tmpDir,
> platformSpecificResourcePath()))
>
> Complete StackTrace:
> https://gist.github.com/roar109/6e982bd83baf3e1624af
>
> The only workaround I see is deploying in sequential order but is not
> something I would like to do.
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/OverlappingFileLockException-in-nodes-startup-same-time-in-Linux-tp1415.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>