我尝试在Docker Swarm模式下创建一个Apache Ignite。由于某种原因,该服务似乎没有拿起我的配置文件。我做错了什么想法?
我的docker撰写文件就像:
version: "3.3"
services:
ignite:
image: apacheignite/ignite
environment:
- "CONFIG_URI=file:///data/ignite/ignite.xml"
configs:
- source: ignite-config
target: /data/ignite/ignite.xml
#ports:
# - 8080:8080
deploy:
replicas: 1
configs:
ignite-config:
file: ./ignite.xml
ignite.xml看起来像
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<bean abstract="true" id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
<value>tasks.ignite</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
</beans>
我从点燃中获得的错误(通过泊坞窗服务日志)是:
Failed to start grid: Failed to find configuration in: file:/data/ignite/ignite.xml
答案 0 :(得分:1)
这里的主要问题是你在ignite.xml配置文件中的org.apache.ignite.configuration.IgniteConfiguration bean定义中有abstract =“true”