Unable to install LogMX on Red Hat Enterprise Linux AS 4.6

For those who have trouble installing LogMX

Moderator: admin

Post Reply
ust
Posts: 6
Joined: Thu Dec 11, 2008 1:41 am

Unable to install LogMX on Red Hat Enterprise Linux AS 4.6

Post by ust »

Hello,

I hoped to install your demo and if successful purchase it. Unfortunately I've not been able to install it. I'm running Red Hat Enterprise Linux AS 4.6. AS means Application Server. The specifics are:


Summary: Red Hat Enterprise Linux AS (v. 4 for 32-bit x86)
Description: Red Hat Enterprise Linux AS (v. 4 for 32-bit x86)
Label: rhel-i386-as-4
Last Modified: 2008-12-05 09:14:46 EST
Channel Entitlement Name: Red Hat Enterprise Linux (core server)
Parent Channel: (none)
Architecture: IA-32
Packages: 6201

Please provide me with detailed instructions on how to install. In addition, I'm willing to agree to pay for the product now as long as you can show us how to install it!

We're not especially strong when it comes to Linux so detailed instructions would be very helpful and I'm sure it will help many other users install and purchase your product. The screenshots look great, just need help getting it to install!

I did run the Linux install program which executed but it failed to complete.

Best Regards,

UST
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Post by admin »

Hello,

Thank you for your interest in LogMX.
Here is how to install and run LogMX on Linux:

Code: Select all

unzip LogMX_v1.2.6.zip
cd LogMX_v1.2.6
chmod +x logmx.sh
./logmx.sh
If you get the message "./logmx.sh: line 22: java: command not found" for command "./logmx.sh", it means you don't have Java properly installed (needed to run LogMX): go to http://java.com and install Java. After the install, check that the "bin" directory of your Java installation is included in your PATH (you can use "echo $PATH" to check this). If it's not, add a line like this in your user profile file (.bash_profile for example), and open a new shell :

PATH=$PATH:/my/java/install/dir/bin

Please let me know if you still have problem installing and running LogMX

PS: didn't you receive my e-mail response a few days ago?
ust
Posts: 6
Joined: Thu Dec 11, 2008 1:41 am

Unable to install LogMX on Red Hat Enterprise Linux AS 4.6

Post by ust »

Thank you for the followup. I went ahead and followed your instructions but we're still unable to get LogMX to install properly...

Here is the terminal output, maybe it will help debug the source of the problem:

localuser@ust_ivr LogMX_v1.2.6]$ ./logmx.sh
Warning: -Xmx302m not understood. Ignoring.
Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: com.lightysoft.logmx.LogMX
at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.5.0.0)
at __gcj_personality_v0 (/usr/local/bin/LogMX_v1.2.6/LogMX_v1.2.6/java.version=1.4.2)
at __libc_start_main (/lib/tls/libc-2.3.4.so)
at _Jv_RegisterClasses (/usr/local/bin/LogMX_v1.2.6/LogMX_v1.2.6/java.version=1.4.2)
Caused by: java.lang.ClassNotFoundException: java.lang.StringBuilder not found in [file:./classes, file:./parsers/classes/, file:./managers/classes/, file:./jar/logmx.jar, file:./lib/xtlnf.jar, file:./lib/jsch.jar, file:./lib/activation.jar, file:./lib/mailapi.jar, file:./lib/smtp.jar, file:/usr/share/java/libgcj-3.4.6.jar, file:./, core:/]
at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.5.0.0)
at _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)
at _Jv_BytecodeVerifier.verify_instructions_0() (/usr/lib/libgcj.so.5.0.0)
at _Jv_VerifyMethod(_Jv_InterpMethod) (/usr/lib/libgcj.so.5.0.0)
at _Jv_PrepareClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
at _Jv_WaitForState(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0)
at java.lang.VMClassLoader.linkClass0(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
...9 more
[localuser@ust_ivr LogMX_v1.2.6]$

P.S. I tried unsuccessfully to locate the most recent java/bin directory with command "echo $PATH". And when it failed to show the bin location I
manually located it at "/usr/java/default/bin". This bin folder was created the same day I downloaded and installed the java runtimes. I put the path into logmx.sh.


PATH=$PATH:/usr/java/default/bin

Is this correct?

Can you tell me what is wrong based on anything in the above output? If you need to take a more in depth look at this server we can provide remote root access via SSH.

I appreciate your help and hopefully we can get LogMX working with Red Hat.

Thanks,

UST
Last edited by ust on Fri Dec 12, 2008 7:03 am, edited 1 time in total.
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Post by admin »

Hello,

Here are a few ideas:

* It seems you use an old version of Java : v1.4.2 (text "java.version=1.4.2" in your file "logmx.log.txt", and the class "java.lang.StringBuilder" which caused your "java.lang.ClassNotFoundException" didn't exist in Java 1.4.2
but appeared in Java v1.5). LogMX needs Java 1.5 (also known as "Java 5") or higher ("Java 1.6" or "Java 6")

=> If you are sure you installed Java 5 or 6, you should modify your file "logmx.sh" so that it uses this new Java version and not v1.4.2.

To get your default Java version, just type "java -version" and "which java" to get its location.

* From text "gnu.gcj" and "libgcj" in your "logmx.log.txt", it seems that you use GCJ (http://gcc.gnu.org/java) to run Java applications (I didn't know this Java Virtual Machine, but I recommend you using the Sun version of Java instead: http://java.com).

Please send me the output of:

Code: Select all

/usr/java/default/bin/java -version
Please let me know if you still have problems to start LogMX.
ust
Posts: 6
Joined: Thu Dec 11, 2008 1:41 am

Post by ust »

Here is terminal log.

COMMAND: /usr/java/default/bin/java -version (path used in logmx.sh)
---------------------------
[root@ust_ivr LogMX_v1.2.6]# /usr/java/default/bin/java -version
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Server VM (build 11.0-b16, mixed mode)
[root@ust_ivr LogMX_v1.2.6]#
--------------------------

COMMAND: java -version
--------------------------
[root@ust_ivr LogMX_v1.2.6]# java -version
java version "1.4.2"
gcj (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--------------------------

I think there is redhat level setting to update java current version (we are using redhat 4.6)
ust
Posts: 6
Joined: Thu Dec 11, 2008 1:41 am

GCJ (GCC) / jdkgcj

Post by ust »

Hello,

It's proven to be very difficult to install Java 1.6/Java 6. I downloaded and installed it but Linux still only knows about the old version on the system. It may be that GCJ is interfering...?

GCJ does not come with a JVM. It's rather confusing but is described well in the below link, I pasted some key content from the link just below it.

Below is some key content from the link:
http://www.lykkenborg.no/java/2005/06/i ... howto.html

Notice how they say once your remove jdkgcj (GCC)...that "commands should now work perfectly".

Is jdkgcj installed?
To find out if jdkgcj is installed, open a terminal window and type:

[user]$ java -version

If you read something similar to the following message, then jdkgcj has been installed on your computer, and you will no longer be able to compile and run Java programs normally. You should strongly consider removing it.

java version "1.3.1"
jdkgcj 0.2.3
(http://www.arklinux.org/projects/jdkgcj)
gcj (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying
conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

Uninstalling jdkgcj
Open a terminal window, log in as the super-user and type:

[root]# rpm -e jdkgcj

The jdkgcj package should now be removed, and if J2SE is installed correctly, all Java commands should now work perfectly.

If you think this can be the problem, I will Uninstall jdkgcj and give that a try. Also am going to make sure Linux is aware of the new path for 1.6.

I found a few links while trying to get this damn Java 1.6 to work with Red Hat:

http://java.com/en/download/help/download_options.xml
http://www.halley.cc/ed/linux/howto/java.html
http://www.lykkenborg.no/java/2005/06/i ... howto.html
http://nicklothian.com/blog/2008/12/07/ ... r-own-rpm/

Thanks,

UST
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Post by admin »

Hello,

Yes, I think you can definitely remove jdkgcj. From what I read in the links you give, it seems that jdkgcj is installed by default on RedHat because Sun's Java Virtual Machine is not open-source according to RedHat (moreover, I think now it's not the case anymore)

Xavier
ust
Posts: 6
Joined: Thu Dec 11, 2008 1:41 am

log4j pattern

Post by ust »

We finally were able to start logmx. But the manual file format builder does not work. Can you help us to create log4x pattern for follwing format?

Dec 17 12:12:47: $DEBUG|353|9999|Object|Object id: 537165824 Message.
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Post by admin »

Hello,

You can use for example this Log4j Pattern:

Code: Select all

%d{MMM dd HH:mm:ss}: $%p|%t|%L|%c|%m
But here are a few questions about this log format:
  • Is it normal that a "$" is just before the log level "DEBUG"?
  • What do "353", "9999", and "Object" refer to? In my Log4j pattern example, I used "Thread" (%t), "LineNumber" (%L), and "Emitter" (%c), respectively, but feel free to adapt this using the help file (blue "?" icon at the right of the Log4j pattern text field)
Xavier
ust
Posts: 6
Joined: Thu Dec 11, 2008 1:41 am

Solution to installing Java 1.6 or 1.X on RedHat Enterprise

Post by ust »

Since I finally found a solution to Linux not seeing Java 1.6 after installation I want to share this information.

There are many suggestions on the Internet and in this thread about how to get Java to work but I did not find any to be correct (at least for RedHat). Some suggest removing jdkgcj but this is not a good idea because it has many dependencies including Open Office. Also, it didn't install anyway when we tried: [root]# rpm -e jdkgcj

TROUBLESHOOTING:

After you follow Sun's instructions to install Java 1.6, it's actually installed at this point. Problem is when you issue a java -version command you'll see something like:

java version "1.3.1"
jdkgcj 0.2.3
(http://www.arklinux.org/projects/jdkgcj)
gcj (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying
conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

REAL PROBLEM IS:

So the net effect is the Java 1.6 is not seen by Linux. You'll notice though if you go into the Java 1.6 directory and issue the command java -version that it will report that Java 1.6 is installed. So obviously there is a path problem. So we started messing around with bash_profile.

SOLUTION:

I'm new to Linux and noticed there are multiple bash_profile files around. The below bash_profile content works for the file located at /root, not sure about other bash_profiles I suppose they are tied to other logins.

The bash_profile THAT WORKS for Linux to see Java 1.6 is:

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

#PATH=$PATH:$HOME/bin

JAVA_HOME=/usr/java/jdk1.6.0_11
PATH=/usr/java/jdk1.6.0_11/bin:$PATH

export PATH
unset USERNAME

I hope this helps some of you out there because it took me many, many hours of trial and error to figure this out...

One thing I can say is the effort was WELL WORTH IT because LogMX is an absolutely fantastic replacement for -tail. It can be used locally on Linux and it can also be used on Windows to view files on a Linux box using it's built in SFTP capability. For $29 it completely solved a problem we had where we needed to view log files on a Linux box. It nicely parses the log files and places the contents in columns making them easy to read. Since we spend many hours viewing log files, this program is a life saver and doesn't suffer from any weaknesses we saw with other log viewing or tail programs.

Thanks,

UST
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Post by admin »

Hello,

Thank you for your post, I'm sure it will help other Linux users.

I agree with your solution, and indeed, most of the time, each user has his/her own ".bash_profile" located in his/her home directory.

Thank you for your feedback :D

Xavier
Post Reply