- This topic has 4 replies, 3 voices, and was last updated 13 years, 5 months ago by
raj82raj.
-
AuthorPosts
-
Greg SoulsbyMemberWhen I put my app onto the ISP box it ran fine for some time, maybe a couple of weeks. Then java hung. The ISP says they monitor for app going down but when Java hangs they cant identify. Restarting fixed but then it happened again a few more weeks later. Log follows. I dont like the look of
“Property ‘transactionTimeout’ threw exception; nested exception is com.atomikos.icatch.SysException: Error in init(): Couldn’t get lock for /./tm.out”
although I cant possibly say why as I have no idea what it means.
Can you suggest some path of investigation?
2011-08-30 13:32:17,677 INFO [main] SessionFactoryImpl – building session factory
2011-08-30 13:32:17,686 WARN [main] ConfigurationFactory – No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/xxxxxxx/ehcache-1.2.3.jar!/ehcache-failsafe.xml
2011-08-30 13:32:17,998 INFO [main] SessionFactoryObjectFactory – Not binding factory to JNDI, no JNDI name configured
No properties path set – looking for transactions.properties in classpath…
transactions.properties not found – looking for jta.properties in classpath…
Using init file: /xxxxxx/webapps/C013/WEB-INF/classes/jta.properties
/atomikos-sw-tmp/ could not be created – using default
java.io.IOException: Couldn’t get lock for /./tm.out
at java.util.logging.FileHandler.openFiles(FileHandler.java:372)
at java.util.logging.FileHandler.<init>(FileHandler.java:270)
at com.atomikos.diagnostics.RotatingFileConsole.<init>(RotatingFileConsole.java:72)
at com.atomikos.icatch.standalone.UserTransactionServiceImp.createDefault(UserTransactionServiceImp.java:160)
at com.atomikos.icatch.standalone.UserTransactionServiceImp.init(UserTransactionServiceImp.java:281)
at com.atomikos.icatch.config.UserTransactionServiceImp.init(UserTransactionServiceImp.java:389)
at com.atomikos.icatch.jta.UserTransactionManager.checkSetup(UserTransactionManager.java:63)
at com.atomikos.icatch.jta.UserTransactionManager.setTransactionTimeout(UserTransactionManager.java:208)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
snip….2011-08-30 13:32:18,782 INFO [main] SessionFactoryImpl – closing
2011-08-30 13:32:18,784 ERROR [main] ContextLoader – Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘atomikosTransactionManager’ defined in class path resource [xxxx-generated-dao-context.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property ‘transactionTimeout’ threw exception; nested exception is com.atomikos.icatch.SysException: Error in init(): Couldn’t get lock for /./tm.out
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1344)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:562)
snip…
Glen IhrigMemberHi P0rridge ,
This is just a guess, but tm.out is the Atomikos log file. Mine is located in /atomikos-sw-tmp.
The atomikos-sw-tmp folder is flagged 755 and the (several) tm.out, tm.out.x files are flagged 644. Folder and file are owned by ‘admin’ on my system, but this is Mac OS X, so that may not match your ISP.
Consider:
1. Examine the permissions (flags) on this folder and file, change as appropriate.
2. Examine the most recent content of tm.out for further hints.
3. Delete tm.out.* and atomikos-sw-tmp. The system should recreate them (confirm that it does). If they are locked by some dead process, you will learn about this when attempting to delete the file. If locked, you will likely need to kill that process to correct the problem.Best,
-Glen
Greg SoulsbyMemberThanks Glen, that helps a lot.
I see now I am getting message in console when the app is run
/atomikos-sw-tmp/ could not be created – using default
I have searched my implementation and cant find a /atomikos-sw-tmp/
I search the atomikos site and google but cant find a where we are talking about here – the Tomcat root? My apps root? I see tm.out is in tomcat bin – is it there?
Greg
Glen IhrigMemberOn my system, the /atomikos-sw-tmp folder is on the root of the drive. The log message indicating that it could not be created explains why you can’t find it.
If your application is running on a shared server, this is very likely to be why you are unable to create files or folders in the root of the drive. You may need to check with your ISP on that.
Alternatively, the path Atomikos uses in determining where to put this folder is contained within your app, in resources/jta.properties.
The relevant lines are:
com.atomikos.icatch.output_dir=/atomikos-sw-tmp/ com.atomikos.icatch.log_base_dir=/atomikos-sw-tmp/
Assuming that your application is running in a Linux or Unix environment, I would try moving the folder to /temp by changing those lines as follows:
com.atomikos.icatch.output_dir=/temp/atomikos-sw-tmp/ com.atomikos.icatch.log_base_dir=/temp/atomikos-sw-tmp/
I’m not an expert here, and I have not tried this out. I doubt it would be any worse from an operational perspective, and from examining my tm.out file I don’t see any security risk that might arise from placing the file in /temp.
Let me know if this eliminates the log error you’re seeing.
Best,
-Glen
raj82rajMemberHi,
I think, the solution provided by “gihrig ” should work.I too faced similar issue on Linux environment. I placed atomikos files in to the tomcat log file folder and it worked well.
Good Luck !!
Regards,
Raj -
AuthorPosts