Dev2Dev论坛

 找回密码
 注册
搜索
查看: 274|回复: 0

java.io.IOException: Permission denied while federating node with addNode [复制链接]

Rank: 1

robot 发表于 2011-3-29 23:30:04 |显示全部楼层

While federating a node to a deployment manager of IBM WebSphere Application Server V7 I run across the following issue:

[3/28/11 16:09:17:597 CEST] 00000000 AdminTool     A   ADMU0014I: Adding node was7Node01 configuration to cell: was7Cell01
[3/28/11 16:09:17:606 CEST] 00000000 NodeFederatio E   ADMU0011E: Error creating configuration in the cell repository java.io.IOException: Permission denied
        at java.io.File.checkAndCreate(File.java:1715)
        at java.io.File.createTempFile(File.java:1804)
        at java.io.File.createTempFile(File.java:1841)
        at com.ibm.ws.management.tools.NodeFederationUtility.doUploadConfigDocumentsToDMgr(NodeFederationUtility.java:1083)
        at com.ibm.ws.management.tools.NodeFederationUtility.doAllConfigUpdates(NodeFederationUtility.java:805)
        at com.ibm.ws.management.tools.NodeFederationUtility.doAddNode(NodeFederationUtility.java:743)
        at com.ibm.ws.management.tools.NodeFederationUtility.runTool(NodeFederationUtility.java:541)
        at com.ibm.ws.management.tools.AdminTool.executeUtility(AdminTool.java:269)
        at com.ibm.ws.management.tools.NodeFederationUtility.main(NodeFederationUtility.java:297)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:599)
        at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:213)
        at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:93)
        at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:74)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:599)
        at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
        at org.eclipse.core.launcher.Main.run(Main.java:981)
        at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:330)
        at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:108)

I must admit I couldn’t fix the issue right away even though the solution was indeed in the stack trace itself. The “Permission denied” part led me to think it was an issue with user credentials for addNode command yet the security was off (!)

The solution was to ensure that the /tmp directory (or the one pointed out by java.io.tmpdir) has the correct permissions. The directory is used by java.io.File.createTempFile() and it happened to not have right permissions for the non-root user I used. I can’t explain why the user didn’t have permission to write in /tmp directory, though, but once I run chmod 777 /tmp it begun working fine. Problem solved.


links:http://blog.japila.pl/2011/03/java-io-ioexception-permission-denied-while-federating-node-with-addnode/
您需要登录后才可以回帖 登录 | 注册

Archiver|Dev2Dev

GMT+8, 2012-5-21 12:24 , Processed in 1.026819 second(s), 11 queries .

Powered by Discuz! X2 Licensed

© 2001-2011 Comsenz Inc.

回顶部