Bug #5397
closed"./kepler.sh -runwf -nogui workflow.xml" doestn't work if the user is logged out on Mac
0%
Description
I has the same error with or without "-nocache" option. The error is the same when I tried on two iMacs where I'm admin on one iMac and normal user on another iMac. It works only if I login to iMac and run the same command from anther machine through ssh. I didn't try kepler 2.2 installer, but I bet the error will be the same.
The reason is probably a kepler window will be popped up and disappear when I run the command on local machine. But if the user is logged out, this window can not be popped up.
The error is from org.kepler.osx.KeplerOSXExtension.addOSExtensions class, so it should be only mac specific.
To reproduce the error:
1) ssh to another mac machine
2) check out kepler 2.2 branch
3) compile and create kepler.sh file.
4) rm -rf ~/.kepler/
5) run a sample workflow which do not have display related actors.
Error info:
workflow:kepler-branch-2.2 jianwu$ ./kepler.sh runwf -nogui /Users/jianwu/Kepler/repository/workflows/04-HelloWorld-NoGUI.xml Nested Exception ---
DEBUG: suiteName: kepler-2.2
JVM Memory = 5m 512m
setting dock icon to -Xdock:icon=/Users/jianwu/Kepler/repository/kepler/kepler-branch-2.2/common-2.2/resources/icons/kepler-dock-icon.png
Set environment variable: PATH = /sw/bin:/sw/sbin:/opt/subversion/bin:/Applications/MATLAB64/MATLAB_R2010a/MATLAB_R2010a.app/bin:/Users/jianwu/Projects/hadoop/hadoop-0.21.0/bin:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin:/Users/jianwu/tools/netCDF/bin:/Users/jianwu/tools/netCDF/include:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/jianwu/Projects/EC2-Client/ec2-api-tools-1.3-62308/bin:/usr/X11R6/bin:/Users/jianwu/Kepler/repository/kepler/kepler-branch-2.2/r-2.2/lib:/Users/jianwu/Kepler/repository/kepler/kepler-branch-2.2/common-2.2/lib/ptolemy/matlab:/Users/jianwu/Kepler/repository/kepler/kepler-branch-2.2/common-2.2/lib
Set environment variable: R_HOME = /Library/Frameworks/R.framework/Resources
[null] not loading property karHandler because it was added from an inactive module.
[null] not loading property karHandler because it was added from an inactive module.
[null] not loading property karHandler because it was added from an inactive module.
[null] Checking for patches...
[null] Found OS Extension file: /Users/jianwu/Kepler/repository/kepler/kepler-branch-2.2/apple-extensions-2.1/module-info/osextension.txt
[null] Wed May 11 11:25:35 workflow.sdsc.edu java33084 <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
[null] Exception in thread "main" java.lang.InternalError: Can't connect to window server - not enough permissions.
[null] at java.lang.ClassLoader$NativeLibrary.load(Native Method)
[null] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1823)
[null] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1720)
[null] at java.lang.Runtime.loadLibrary0(Runtime.java:823)
[null] at java.lang.System.loadLibrary(System.java:1045)
[null] at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
[null] at java.security.AccessController.doPrivileged(Native Method)
[null] at com.apple.eawt.Application.<clinit>(Application.java:38)
[null] at org.kepler.osx.KeplerOSXExtension.addOSExtensions(KeplerOSXExtension.java:46)
[null] at org.kepler.Kepler.main(Kepler.java:176)
Exception in thread "main" Java returned: 1
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:106)
at org.kepler.build.runner.Kepler.main(Kepler.java:92)
Caused by: Java returned: 1
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:106)
at org.kepler.build.runner.Kepler.run(Kepler.java:200)
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:102)
... 1 more
Caused by: Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.kepler.build.Run.runSuite(Run.java:309)
at org.kepler.build.Run.run(Run.java:213)
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:102)
... 3 more
--
Java returned: 1
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:106)
at org.kepler.build.runner.Kepler.run(Kepler.java:200)
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:102)
at org.kepler.build.runner.Kepler.main(Kepler.java:92)
Caused by: Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.kepler.build.Run.runSuite(Run.java:309)
at org.kepler.build.Run.run(Run.java:213)
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:102)
... 3 more
--- Nested Exception ---
Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.kepler.build.Run.runSuite(Run.java:309)
at org.kepler.build.Run.run(Run.java:213)
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:102)
at org.kepler.build.runner.Kepler.run(Kepler.java:200)
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:102)
at org.kepler.build.runner.Kepler.main(Kepler.java:92)
Updated by jianwu jianwu almost 12 years ago
I still see the similar error message at Kepler trunk. Re-opening...
./kepler.sh -runwf -nogui -nocache outreach/workflows/demos/getting-started/04-HelloWorld.xml
[null] Found OS Extension file: /Users/jianwu/Kepler/repository/kepler/kepler-trunk-svn-1.7/apple-extensions/module-info/osextension.txt
[null] Tue Nov 20 13:22:33 kepler.sdsc.edu java[76677] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
[null] Error adding OS X application listener:
[null] java.lang.InternalError: Can't connect to window server - not enough permissions.
[null] at java.lang.ClassLoader$NativeLibrary.load(Native Method)
[null] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1827)
[null] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1724)
[null] loading OS extensions for OS Mac OS X with class org.kepler.osx.KeplerOSXExtension
[null] at java.lang.Runtime.loadLibrary0(Runtime.java:823)
[null] at java.lang.System.loadLibrary(System.java:1045)
[null] at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
[null] at java.security.AccessController.doPrivileged(Native Method)
[null] at com.apple.eawt.Application.<clinit>(Application.java:41)
[null] at org.kepler.osx.KeplerOSXExtension.addOSExtensions(KeplerOSXExtension.java:50)
[null] at org.kepler.Kepler.main(Kepler.java:169)
[null] loading: ptolemy.moml.MoMLCommandLineApplication args: outreach/workflows/demos/getting-started/04-HelloWorld.xml
[null] invoking: ptolemy.moml.MoMLCommandLineApplication.main
[null] 50 ms. Memory: 271936K Free: 245909K (90%)
Updated by Daniel Crawl almost 12 years ago
KeplerOSXExtension prints the error message, but still executes the workflow. I updated the error message to be more informative.
Updated by jianwu jianwu almost 12 years ago
I did a little big further changes at version 31136. Now no exception stack trace will be displayed.
I still see a message like: Mon Nov 26 14:38:45 kepler.sdsc.edu java3269 <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged. But I don't think it is critical.
this message can be avoided by setting -Djava.awt.headless=true, such as ./kepler.sh -Djava.awt.headless=true -runwf -nogui -nocache outreach/workflows/demos/getting-started/04-HelloWorld.xml
more information about kCGErrorFailure can be found at:
http://stackoverflow.com/questions/11024555/elasticsearch-java-lang-internalerror-cant-connect-to-window-server