解决错误:日志已与具有多个实例的 atomikos 一起使用
Posted
技术标签:
【中文标题】解决错误:日志已与具有多个实例的 atomikos 一起使用【英文标题】:solve error : log already in use with atomikos with multiple instances 【发布时间】:2012-08-31 14:31:18 【问题描述】:我只在使用 atomikos 的实时服务器上遇到问题,在我的本地服务器上它运行良好。
我在服务器上遇到的问题是
init() 中的错误:日志已在使用中?
完整的异常堆栈跟踪
java.lang.RuntimeException: Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:205)
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:265)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:405)
at com.atomikos.icatch.jta.UserTransactionImp.checkSetup(UserTransactionImp.java:100)
at com.atomikos.icatch.jta.UserTransactionImp.begin(UserTransactionImp.java:115)
at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:32)
at com.dbhl.app.presentation.action.CreateUnitTypeAction.execute(CreateUnitTypeAction.java:128)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
com.atomikos.icatch.SysException: Error in init(): Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:333)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:405)
at com.atomikos.icatch.jta.UserTransactionImp.checkSetup(UserTransactionImp.java:100)
at com.atomikos.icatch.jta.UserTransactionImp.begin(UserTransactionImp.java:115)
at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:32)
at com.dbhl.app.presentation.action.CreateUnitTypeAction.execute(CreateUnitTypeAction.java:128)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:205)
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:265)
... 31 more
Nested exception is:
java.lang.RuntimeException: Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:205)
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:265)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:405)
at com.atomikos.icatch.jta.UserTransactionImp.checkSetup(UserTransactionImp.java:100)
at com.atomikos.icatch.jta.UserTransactionImp.begin(UserTransactionImp.java:115)
at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:32)
at com.dbhl.app.presentation.action.CreateUnitTypeAction.execute(CreateUnitTypeAction.java:128)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
ERROR: the specified log seems to be in use already. Make sure that no other instance is running, or kill any pending process if needed.
java.lang.RuntimeException: Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:205)
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:265)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:405)
at com.atomikos.icatch.jta.UserTransactionImp.checkSetup(UserTransactionImp.java:100)
at com.atomikos.icatch.jta.UserTransactionImp.rollback(UserTransactionImp.java:140)
at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:80)
at com.dbhl.app.presentation.action.CreateUnitTypeAction.execute(CreateUnitTypeAction.java:128)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
com.atomikos.icatch.SysException: Error in init(): Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:333)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:405)
at com.atomikos.icatch.jta.UserTransactionImp.checkSetup(UserTransactionImp.java:100)
at com.atomikos.icatch.jta.UserTransactionImp.rollback(UserTransactionImp.java:140)
at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:80)
at com.dbhl.app.presentation.action.CreateUnitTypeAction.execute(CreateUnitTypeAction.java:128)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Log already in use?
at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:205)
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:265)
... 31 more
Nested exception is:
当我从 here 谷歌搜索常见解决方案时
Are these instances running in a single machine? .. like, are those running in an app server, where it is pointed to a single CARBON_HOME? .. if so, the "transaction.properties" file have to be removed from /repository/lib and should be put into each WARs classpath location. And each "transaction.properties" file has to be edited to change the log file location. This error comes when more that one instance is trying to access the same transaction log file of Atomikos, or there's also a chance that the earlier JVM shutdown was not done properly and the lock file wasn't released. In that case, you simply have to remove the log file at /repository/data/tmlog.lck file and restart the server.
我遵循这个建议。 从 tomcat/common/lib 中删除属性文件到我的战争类路径。 相应地更改了上述目录。 我还检查了 tmlog 文件,但它在服务器上不存在。
但没有任何效果。错误仍然发生。
如果你在 atomikos 页面看到here
The lock file in question is created to protect the transaction logs against accidental duplicate startups. Otherwise, the logs could get corrupted when two instances of the same transaction manager are recovering on the same data. Normally, it suffices to follow the hints and then delete the lock file manually if needed.
它只是说明遵循提示,但提示在哪里??
请帮我重新解决。
atomikos 是开源的,
我检查了源代码,发现下面几行抛出异常
if ( enableRecovery )
//ISSUE 10077: don't complain about lock file if no logging
try
lockfilestream_ = new FileOutputStream ( lockfile_ );
lock_ = lockfilestream_.getChannel().tryLock();
lockfile_.deleteOnExit();
catch ( OverlappingFileLockException failedToGetLock )
//happens on windows
lock_ = null;
catch ( IOException failedToGetLock )
//happens on windows
lock_ = null;
if ( lock_ == null )
System.err.println ( "ERROR: the specified log seems to be "
+ "in use already. Make sure that no other instance is "
+ "running, or kill any pending process if needed." );
throw new RuntimeException ( "Log already in use?" );
我已经在 jta.properties 中将调试设置为 false com.atomikos.icatch.enable_logging=false 并重新启动我的服务器,但仍然是同样的错误。
Guy Padron 回答后更新
@Guy 请原谅,感谢您的回答。我知道您是 AtomIkos,我经常收到你的邮件。问题是对于你的 您在代码中硬编码默认属性的免费开源版本 ,因此,如果任何用户绑定从属性文件中设置它,则不是 压倒一切。就我而言,问题是什么,创建了日志文件 在当前目录中由 atomikos 通过其默认属性和 因此在本地环境上没有问题,但无论何时上传 到共享主机,其中创建的是服务器内部的文件或目录 bin 文件夹是不允许的,因此出现上述错误,所以我调试 代码,根据我的需要修改它并在2012年8月获得成功。 当我检查你的代码时,我发现你的代码出错了 在我描述的情况下也有例外,而且有很多 点代码可以改进。
谢谢 米希尔·帕雷赫
【问题讨论】:
【参考方案1】:当您部署了多个项目(使用 Atomikos)时,由于同时写入 atomikos 的日志文件会出现此问题(错误消息:'Log already in use')。 p>
要解决这个问题你必须自定义日志文件名,设置属性 'com.atomikos.icatch.log_base_name' 在 atomikos 配置中如下所示:
<bean id="atomikosUserTransactionService" class="com.atomikos.icatch.config.UserTransactionServiceImp"
init-method="init" destroy-method="shutdownForce">
<constructor-arg>
<props>
<prop key="com.atomikos.icatch.service">com.atomikos.icatch.standalone.UserTransactionServiceFactory</prop>
<prop key="com.atomikos.icatch.log_base_name">your_project_name_log</prop>
<prop key="com.atomikos.icatch.output_dir">../standalone/log/</prop>
<prop key="com.atomikos.icatch.log_base_dir">../standalone/log/</prop>
</props>
</constructor-arg>
</bean>
PS:请注意,我更改了属性 'com.atomikos.icatch.output_dir' 和 'com.atomikos.icatch.log_base_dir' 只是为了保留事情有条理,在 JBoss 日志文件的同一目录中创建 atomikos 的日志文件。
【讨论】:
【参考方案2】:必须删除一个锁定文件才能再次启动您的容器。它的名字是 tmlog.lck。在 Apache 7 中,它位于 APACHE_HOME/bin/
祝你好运。
【讨论】:
感谢您的回答。实际上我自己解决了它,解决方案与指定的不同,当我有时间时,我会在这里写下完整的描述。【参考方案3】:这是一个权限问题。我在jta.properties
中添加了这两行。(确认目录存在)。
com.atomikos.icatch.output_dir = /data/logs/XXX/
com.atomikos.icatch.log_base_dir = /data/logs/XXX/
【讨论】:
【参考方案4】:在我们的例子中,原因完全不同:
我们将 tomcat8 实例配置为包含所有需要的 Atomikos .jar。 这主要是这里描述的: Atomikos Tomcat 7 Configuration
在我们的 Spring 应用程序配置中,我们需要定义 J2eeTransactionManager(由于“事务暂停不可用”问题已经描述了 here):
@Bean
public TransactionManager atomikosTransactionManager()
return new J2eeTransactionManager();
@Bean
public PlatformTransactionManager txManager() throws Throwable
JtaTransactionManager jtaTransactionManager = new JtaTransactionManager();
jtaTransactionManager.setAllowCustomIsolationLevels(true);
jtaTransactionManager.setTransactionManager(atomikosTransactionManager());
UserTransaction ut = userTransaction();
jtaTransactionManager.setUserTransaction(ut);
return jtaTransactionManager;
因此,您需要在应用程序中引用 pom.xml,但此引用必须具有“已提供”范围:
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-jta</artifactId>
<version>3.9.3</version>
<scope>provided</scope>
</dependency>
在我们的例子中,我们省略了范围,因此 tomcat 和我们的应用程序创建了它自己的事务管理器实例,这导致了“日志已在使用”错误消息。
因此,删除 .lock 文件在这里也有帮助。删除锁文件后,应用程序特定的事务管理器可以获得锁并且运行良好;但是在tomcat重启后,你会再次收到同样的错误信息。
由于我在其他地方找不到这个原因,也许这对其他人有帮助......
【讨论】:
【参考方案5】:您确定在您的生产服务器上没有运行任何其他可以锁定 atomikos 事务日志的 JVM 吗?
【讨论】:
我有这个计划 dailyrazor.com/java-jsp-hosting/private-tomcat-hosting 并且我有剃刀探险。它是多实例,所以我认为应该有多个 JVM。那么在这种情况下我该怎么办?? 我刚收到支持部门的回复尊敬的客户,您的私有 Tomcat 是单实例。那我现在该怎么办?【参考方案6】:可能有点晚了,但如果您有多个使用相同日志的事务管理器实例 (JVM),通常会发生这种情况。尽量不要那样做:-)
HTH
【讨论】:
【参考方案7】:我也遇到了同样的错误,但情况不同。 Atomikos 创建了一个不同的 java 进程,在我的例子中,java 进程在 unix 框中无限循环运行,尽管我停止了 tomcat 容器。
所以我发现java进程使用下面的命令。
ps -ef | grep java | grep -v grep
并使用此命令杀死
kill -9 pid
再次启动tomcat,运行正常。
【讨论】:
不确定您的意思 - 但 Atomikos 不会创建单独的 Java 进程。它嵌入在应用程序的 JVM 中运行。【参考方案8】:<bean id="atomikosUserTransactionService" class="com.atomikos.icatch.config.UserTransactionServiceImp"
init-method="init" destroy-method="shutdownForce">
<constructor-arg>
<props>
<prop key="com.atomikos.icatch.service">com.atomikos.icatch.standalone.UserTransactionServiceFactory</prop>
<prop key="com.atomikos.icatch.log_base_name">your_project_name_log</prop>
<prop key="com.atomikos.icatch.output_dir">../standalone/log/</prop>
<prop key="com.atomikos.icatch.log_base_dir">../standalone/log/</prop>
</props>
</constructor-arg>
这对我有用,但我不明白 your_project_name_log 在此代码中的作用。
【讨论】:
以上是关于解决错误:日志已与具有多个实例的 atomikos 一起使用的主要内容,如果未能解决你的问题,请参考以下文章
ActiveMQ JMS XA Atomikos - 事务未启动错误
同时创建多个具有私有 IP 的 Google Cloud SQL 实例时如何解决“发生未知错误”?