Control tier install issue with Linux

36 views
Skip to first unread message

ramesh

unread,
May 3, 2011, 11:36:52 AM5/3/11
to ControlTier
Hi All,

I'm trying to move control tier server from windows to linux host
(ubuntu).
Used ControlTier (v.3.6) Zip installer and even after setting
java_home variable i ran into below issue.

Setup failed.
/home/ctier/pkgs/ControlTier/3.6.0/etc/xml/install.xml:1621: JAVA_HOME
does not appear to be a JDK. The server JSP compilation requires javac
executable and libaries. The JDK installation will contain javac in
the bin directory.


Thanks,
Ramesh

ramesh

unread,
May 3, 2011, 11:52:52 AM5/3/11
to ControlTier

JAVA_HOME Variable.

ctier@QAIFCT01:~/pkgs/ControlTier/3.6.0/etc/xml$ echo $JAVA_HOME
/home/ctier/pkgs/java-6-sun-1.6.0.24/

bin directory contains javac and rest other files accordingly.

chengkai liang

unread,
May 3, 2011, 12:14:54 PM5/3/11
to contr...@googlegroups.com
Did you actually use apt-get to install OpenJDK? Your JAVA_HOME should point to this,

/usr/lib/jvm/java-1.6.0-openjdk

If you use apt-get to install openjdk.


chengkai liang
ckm....@gmail.com

The Z shell is to unix what OS X is to the rest of the computing world.

> --
> You received this message because you are subscribed to the Google Groups "ControlTier" group.
> To post to this group, send email to contr...@googlegroups.com
> To unsubscribe from this group, send email to controltier...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/controltier?hl=en
> http://wiki.controltier.org

ramesh

unread,
May 3, 2011, 12:46:17 PM5/3/11
to ControlTier
Hi chengkai liang,

I used "sudo apt-get install sun-java6-jre" for java installation and
placed java-6-sun and java-6-sun-1.6.0.24/ directory in /home/ctier/
ControlTier/3.6.0/pkgs folder.

Thanks,
Ramesh

On May 3, 5:14 pm, chengkai liang <ckm.li...@gmail.com> wrote:
> Did you actually use apt-get to install OpenJDK? Your JAVA_HOME should point to this,
>
>         /usr/lib/jvm/java-1.6.0-openjdk
>
> If you use apt-get to install openjdk.
>
> chengkai liang
> ckm.li...@gmail.com

Moses Lei

unread,
May 3, 2011, 12:57:04 PM5/3/11
to contr...@googlegroups.com
JRE is not enough, you should get sun-java6-jdk.

Moses
--
Moses Lei
[ Professional Services | DTO Solutions, Inc. ]
[ mobile: 703.901.5969 | e-mail: ml...@dtosolutions.com | aim/gtalk: ml...@controltier.com | yahoo: moseslei | windows live (msn): ml...@dtosolutions.com ]



ramesh

unread,
May 3, 2011, 1:24:37 PM5/3/11
to ControlTier
Hi Moses,
I have both Sun JRE and JDK installed.

Thanks,
Ramesh

On May 3, 5:57 pm, Moses Lei <m...@dtosolutions.com> wrote:
> JRE is not enough, you should get sun-java6-jdk.
>
> Moses
> --
> Moses Lei
> [ Professional Services | DTO Solutions, Inc. ]
> [ mobile: 703.901.5969 | e-mail: m...@dtosolutions.com | aim/gtalk:
> m...@controltier.com | yahoo: moseslei | windows live (msn):
> m...@dtosolutions.com ]

Anthony Shortland

unread,
May 3, 2011, 2:26:49 PM5/3/11
to contr...@googlegroups.com
The installer is an Ant script:

Anthonys-MacBook-Pro-2:ControlTier-3.6.0 anthony$ grep -rl "JAVA_HOME does not appear to be a JDK" .
./etc/xml/install.xml

so you can dig into it to find the check that its doing:

1610         <!-- check java environment -->
1611         <echo level="verbose">Checking for java compiler executable ...</echo>
1612         <if>
1613           <equals arg1="${os.family}" arg2="windows"/>
1614           <then>
1615             <available file="${USER_ENV.JAVA_HOME}/bin/javac.exe" property="javac.exists"/>
1616           </then>
1617           <else>
1618             <available file="${USER_ENV.JAVA_HOME}/bin/javac" property="javac.exists"/>
1619           </else>
1620         </if>
1621         <fail unless="javac.exists">JAVA_HOME does not appear to be a JDK. The server JSP compilation requires javac executable and libaries. The JDK insta     llation will contain javac in the bin directory.</fail>
1622         <echo>JDK check succeeded.</echo>

The "USER_ENV.JAVA_HOME" property is set from the invoking environment ... so what's in "home/ctier/pkgs/java-6-sun-1.6.0.24" on your system?

Anthony.

ramesh

unread,
May 4, 2011, 7:52:17 AM5/4/11
to ControlTier
Issue resolved :

used sudo -E sh install.sh to preserve the environment (to retrieve
JAVA_HOME variable)and i was able to install ctl server and launch the
url.

Thanks
Ramesh

ramesh

unread,
May 4, 2011, 9:54:33 AM5/4/11
to ControlTier
I'm able to launch ctl centre through the url but getting call failed
error when invoking ctl command in terminal.

ctier@QAIFCT01:~/ctl/var/logs$ ctl
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /home/ctier/ctl/var/logs/command.log
(Permission denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:
289)
at
org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
at
org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:
215)
at
org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:
256)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:
132)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:
96)
at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:
654)
at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:
612)
at
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:
509)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:
415)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:
316)
at
org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:
324)
at
com.controltier.ctl.cli.AbstractCtlMain.parseArgs(AbstractCtlMain.java:
156)
at
com.controltier.ctl.cli.BaseCtlMain.parseArgs(BaseCtlMain.java:124)
at com.controltier.ctl.cli.CtlMain.parseArgs(CtlMain.java:173)
at
com.controltier.ctl.cli.AbstractCtlMain.run(AbstractCtlMain.java:240)
at com.controltier.ctl.cli.CtlMain.main(CtlMain.java:106)
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)
at launcher.CtlLauncher.main(CtlLauncher.java:34)
log4j:ERROR Either File or DatePattern options are not set for
appender [file].

Any idea on the same?

Thanks,
Ramesh

ramesh

unread,
May 4, 2011, 9:56:58 AM5/4/11
to ControlTier
Is it something to do with permission settings for ctier user after
installation?

Moses Lei

unread,
May 4, 2011, 2:08:12 PM5/4/11
to contr...@googlegroups.com
Ramesh-- are you installing ControlTier as root? This is generally not advisable, because ctlcenter exposes a command line interface as the running user.

Moses

--
Moses Lei
[ Professional Services | DTO Solutions, Inc. ]
[ mobile: 703.901.5969 | e-mail: ml...@dtosolutions.com | aim/gtalk: ml...@controltier.com | yahoo: moseslei | windows live (msn): ml...@dtosolutions.com ]

Anthony Shortland

unread,
May 4, 2011, 2:11:59 PM5/4/11
to contr...@googlegroups.com
What are the file permission on /home/ctier/ctl/var/logs/command.log? What user are you running ctl as? ctier?

Anthony.

ramesh

unread,
May 5, 2011, 6:17:51 AM5/5/11
to ControlTier
Hi Moses/Anthony,

I'm running ctl command as ctier user .Moreover i don't see any
files (command.log) under logs directory as well after installation.

ctier@QAIFCT01:~/ctl/var$ ls
logs tmp
ctier@QAIFCT01:~/ctl/var$ cd logs
ctier@QAIFCT01:~/ctl/var/logs$ ls
ctier@QAIFCT01:~/ctl/var/logs$ ls -al
total 8
drwxr-xr-x 2 root root 4096 2011-05-04 06:42 .
drwxr-xr-x 4 root root 4096 2011-05-04 06:42 ..
ctier@QAIFCT01:~/ctl/var/logs$

-----------------------------------------------
ctier@QAIFCT01:~/ctl/var/logs$ ctl
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /home/ctier/ctl/var/logs/command.log
(Permission denied)

-----------------------------------------------------

Thanks,
Ramesh

Anthony Shortland

unread,
May 5, 2011, 11:21:10 AM5/5/11
to contr...@googlegroups.com
The issue appears to be directory permissions ... no user other than root can write into the logs directory ... you should either run your commands as the root user or re-install as a designated non-root user.

Are you running on Redhat/CentOS Linux by any chance? If so, then installing the ControlTier RPM takes care of all these issues.

Anthony.

ramesh

unread,
May 5, 2011, 11:46:51 AM5/5/11
to ControlTier
ok. Thanks Anthony.Mine is ubuntu 10.0.4 host.

So only option as of now is to run ctl command as root user nor do i
need to reinstall as root.

Thanks
Ramesh
> ...
>
> read more »

Anthony Shortland

unread,
May 5, 2011, 11:53:53 AM5/5/11
to contr...@googlegroups.com
That's the easiest thing to do ... do you intend to install the ControlTier client as root too and use SSH public key authentication between the boxes as root?

The alternative is to re-install as a non-root account (e.g. "ctier"), setup ssh keys for that account, and then use sudo to manage access to root privilege. This is the conventional way that ControlTier is installed and managed.

Anthony.

ramesh

unread,
May 5, 2011, 11:56:27 AM5/5/11
to ControlTier
Let me reinstall as ctier user and update here.
> ...
>
> read more »

ramesh

unread,
May 5, 2011, 12:54:43 PM5/5/11
to ControlTier
Cool.Thanks .Able to install and configure via ctier user.Need to
generate ssh keys(ctier) for client authentication.


Thanks,
Ramesh
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages