|
From: Yasir K. <yas...@as...> - 2003-10-24 11:38:28
|
Hi, My problem "Unable to run start script on Solaris 8" is solved and I am = able to run the script successfully. The problem was that I edited the = script on Windows 2000 system and then copied it to the Solaris 8 = system. And due to the difference in 'new line' character in Windows and = Solaris the script is corrupted and is failed when run on Solaris. When = I edited the script on Solaris system, it started working fine. :-)=20 Now I have created the proper symbolic links according to documentation = to start my application automatically on Solaris reboot. Things starts = working fine on reboot but when GUI display code is executed the = application crashes, there might be the reason (that I can guess from = the error message) that X Window Server is not started at the time when = my application tried to display GUI. Now how can I fix my problem ... ? Following are the commands that I used to create symbolic links [tf is = the name of application and the script]. ln -s /usr/tf/tf /etc/init.d/tf ln -s /etc/init.d/tf /etc/rc0.d/K20tf ln -s /etc/init.d/tf /etc/rc1.d/K20tf ln -s /etc/init.d/tf /etc/rc2.d/S20tf ln -s /etc/init.d/tf /etc/rc3.d/S20tf I am copying here the wrapper and application logs to explain the = problem. =20 >>> I set the log level in wrapper.conf to DEBUG, following is the = output of wrapper.log DEBUG | wrapper | 2003/10/24 10:50:57 | Spawning intermediate = process... DEBUG | wrapper | 2003/10/24 10:50:57 | Spawning daemon process... STATUS | wrapper | 2003/10/24 10:50:58 | --> Wrapper Started as Daemon DEBUG | wrapperp | 2003/10/24 10:50:58 | server listening on port = 32000. DEBUG | wrapper | 2003/10/24 10:50:59 | Command[0] : jre/bin/java DEBUG | wrapper | 2003/10/24 10:50:59 | Command[1] : -Xms3m DEBUG | wrapper | 2003/10/24 10:50:59 | Command[2] : -Xmx64m DEBUG | wrapper | 2003/10/24 10:50:59 | Command[3] : = -Djava.library.path=3D./ DEBUG | wrapper | 2003/10/24 10:50:59 | Command[4] : -classpath DEBUG | wrapper | 2003/10/24 10:50:59 | Command[5] : = lib/core/wrapper.jar:lib/core/tf-core.jar DEBUG | wrapper | 2003/10/24 10:50:59 | Command[6] : = -Dwrapper.key=3D1sbpLhFMqukOnEU4 DEBUG | wrapper | 2003/10/24 10:50:59 | Command[7] : = -Dwrapper.port=3D32000 DEBUG | wrapper | 2003/10/24 10:50:59 | Command[8] : = -Dwrapper.debug=3DTRUE DEBUG | wrapper | 2003/10/24 10:50:59 | Command[9] : = -Dwrapper.service=3DTRUE DEBUG | wrapper | 2003/10/24 10:50:59 | Command[10] : = -Dwrapper.cpu.timeout=3D10 DEBUG | wrapper | 2003/10/24 10:50:59 | Command[11] : = -Dwrapper.jvmid=3D1 DEBUG | wrapper | 2003/10/24 10:50:59 | Command[12] : = org.tanukisoftware.wrapper.WrapperStartStopApp DEBUG | wrapper | 2003/10/24 10:50:59 | Command[13] : ASC_AdminModule DEBUG | wrapper | 2003/10/24 10:50:59 | Command[14] : 2 DEBUG | wrapper | 2003/10/24 10:50:59 | Command[15] : false DEBUG | wrapper | 2003/10/24 10:50:59 | Command[16] : 2 DEBUG | wrapper | 2003/10/24 10:50:59 | Command[17] : ASC_AdminModule DEBUG | wrapper | 2003/10/24 10:50:59 | Command[18] : false DEBUG | wrapper | 2003/10/24 10:50:59 | Command[19] : 1 DEBUG | wrapper | 2003/10/24 10:50:59 | Command[20] : stop STATUS | wrapper | 2003/10/24 10:50:59 | Launching a JVM... INFO | jvm 1 | 2003/10/24 10:51:05 | Wrapper Manager: JVM #1 INFO | jvm 1 | 2003/10/24 10:51:05 | Wrapper Manager: Registering = shutdown hook INFO | jvm 1 | 2003/10/24 10:51:05 | Wrapper Manager: Using wrapper INFO | jvm 1 | 2003/10/24 10:51:05 | Calling native initialization = method. INFO | jvm 1 | 2003/10/24 10:51:05 | Inside native WrapperManager = initialization method INFO | jvm 1 | 2003/10/24 10:51:05 | Java Version : 1.3.1_08-b03 = Java HotSpot(TM) Client VM INFO | jvm 1 | 2003/10/24 10:51:05 | Java VM Vendor : Sun = Microsystems Inc. INFO | jvm 1 | 2003/10/24 10:51:05 |=20 INFO | jvm 1 | 2003/10/24 10:51:06 | Wrapper (Version 3.0.5) INFO | jvm 1 | 2003/10/24 10:51:06 |=20 INFO | jvm 1 | 2003/10/24 10:51:06 | Open socket to wrapper... INFO | jvm 1 | 2003/10/24 10:51:06 | Opened Socket INFO | jvm 1 | 2003/10/24 10:51:06 | Send a packet KEY : = 1sbpLhFMqukOnEU4 INFO | jvm 1 | 2003/10/24 10:51:06 | = handleSocket(Socket[addr=3Dlocalhost/127.0.0.1,port=3D32000,localport=3D3= 2781]) DEBUG | wrapperp | 2003/10/24 10:51:06 | accepted a socket from = 127.0.0.1 on port 32781 DEBUG | wrapperp | 2003/10/24 10:51:06 | read a packet KEY : = 1sbpLhFMqukOnEU4 DEBUG | wrapper | 2003/10/24 10:51:06 | Got key from JVM: = 1sbpLhFMqukOnEU4 DEBUG | wrapperp | 2003/10/24 10:51:06 | send a packet LOW_LOG_LEVEL : = 1 DEBUG | wrapperp | 2003/10/24 10:51:06 | send a packet PING_TIMEOUT : = 30 DEBUG | wrapper | 2003/10/24 10:51:06 | Start Application. DEBUG | wrapperp | 2003/10/24 10:51:06 | send a packet START : start INFO | jvm 1 | 2003/10/24 10:51:06 | Received a packet = LOW_LOG_LEVEL : 1 INFO | jvm 1 | 2003/10/24 10:51:06 | Wrapper Manager: LowLogLevel = from Wrapper is 1 INFO | jvm 1 | 2003/10/24 10:51:06 | Received a packet PING_TIMEOUT = : 30 INFO | jvm 1 | 2003/10/24 10:51:06 | Wrapper Manager: PingTimeout = from Wrapper is 30000 INFO | jvm 1 | 2003/10/24 10:51:06 | Received a packet START : = start INFO | jvm 1 | 2003/10/24 10:51:06 | calling listener.start() INFO | jvm 1 | 2003/10/24 10:51:06 | WrapperStartStopApp: = start(args) INFO | jvm 1 | 2003/10/24 10:51:06 | WrapperStartStopApp: invoking = start main method DEBUG | wrapperp | 2003/10/24 10:51:08 | read a packet STOP : 1 DEBUG | wrapper | 2003/10/24 10:51:08 | JVM requested a shutdown. (1) DEBUG | wrapper | 2003/10/24 10:51:08 | wrapperStopProcess(1) called. DEBUG | wrapper | 2003/10/24 10:51:08 | Sending stop signal to JVM DEBUG | wrapperp | 2003/10/24 10:51:08 | send a packet STOP : NULL DEBUG | wrapperp | 2003/10/24 10:51:09 | read a packet STOPPED : 0 DEBUG | wrapper | 2003/10/24 10:51:09 | JVM signalled that it was = stopped. DEBUG | wrapperp | 2003/10/24 10:51:09 | socket read no code (closed?). DEBUG | wrapper | 2003/10/24 10:51:09 | JVM exited normally. STATUS | wrapper | 2003/10/24 10:51:10 | <-- Wrapper Stopped >>> Following is the output printed on System.out=20 WrapperStartStopApp: Encountered an error running start main: = java.lang.InternalError: Can't connect to X11 window server using ':0.0' = as the value of the DISPLAY variable. WrapperStartStopApp: start(args) end. Main Completed=3Dtrue, = exitCode=3D1 Send a packet STOP : 1 Thread, Wrapper-Connection, handling the shutdown process. Send a packet STOPPED : 0 Closing socket. calling System.exit(1) >>> following is the output printed on System.err java.lang.InternalError: Can't connect to X11 window server using ':0.0' = as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at = sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:54) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) at = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironm= ent.java:53) at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:52) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) at java.awt.Toolkit$2.run(Toolkit.java:507) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:498) at ASC_AdminModule.<init>(Unknown Source) at ASC_AdminModule.main(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at = org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.ja= va:126) at java.lang.Thread.run(Thread.java:479) Thanx & Best Regards, Yasir Khan |