Java VisualVM comes with the JDK since JDK 6 update 7.
Common Java Problems:
OutOfMemory
...
http://java.sun.com/developer/technicalArticles/J2SE/monitoring/
http://blogs.sun.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole
Tag cloud
JBoss
(16)
Fedora
(5)
Linux
(4)
Red Hat
(4)
JON
(3)
command line
(3)
4.3
(2)
JEE
(2)
JVM
(2)
Java
(2)
KVM
(2)
Oracle
(2)
Portal
(2)
Weblogic
(2)
installation
(2)
vs
(2)
/boot partition
(1)
Add-ons
(1)
Apache
(1)
Bundles
(1)
Business model
(1)
Byteman
(1)
CLASSPATH
(1)
EAP
(1)
EPP
(1)
Eclipse
(1)
Failover
(1)
Gnome
(1)
JAVA_OPTS
(1)
JBDS
(1)
JBoss Tools
(1)
JBossON
(1)
JConsole
(1)
JDK
(1)
JMS
(1)
JVM options
(1)
KDE
(1)
MBean
(1)
Network
(1)
Open Source
(1)
RHQ
(1)
Red Hat subscription
(1)
Thunderbird
(1)
Troubleshooting
(1)
Virtulization
(1)
WS
(1)
Webservices
(1)
Wireshark
(1)
classloading
(1)
clustering
(1)
comparison
(1)
debug
(1)
deployment
(1)
disable SELinux
(1)
disksize
(1)
error
(1)
fun
(1)
jboss.org
(1)
log
(1)
log4j
(1)
lvm
(1)
messaging
(1)
multiple WARs
(1)
patent FOSS
(1)
performance tuning
(1)
provisionning
(1)
scripting
(1)
services
(1)
switch
(1)
troll
(1)
upgrade
(1)
video
(1)
war
(1)
webapp
(1)
yum
(1)
27 July 2010
26 July 2010
JConsole has greyed out tabs with JBoss (depending on JVM version)
I ran into a strange issue where I found myself with greyed out tabs (Overview, Memory, Threads, Classes, VM Summary) when I tried to connect a JConsole to JBoss. The only accessible tab was MBeans.
Thats how I started JConsole
$ which java
/usr/java/jdk1.6.0_06/bin/java
$ jconsole
(Choosing the PID of my JBoss JVM)
Environment:
JBoss EAP 4.3 (JVM Hotspot 1.6_06)
+ JConsole (JVM Hotspot 1.6_06)
My JBOSS config in/bin/run.conf :
# Enable the jconsole agent locally
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
# Enable the jconsole agent remotely on port 9008
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9008"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
# Install a wrapper around the JDK MBeanServer
JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
After accessing the stopping the JConsole in the terminal and restarting it in the same terminal it WORKED ! A miracle ?
Ctrl + C
Reply to and reference this post: http://community.jboss.org/message/168509
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5074001
Thats how I started JConsole
$ which java
/usr/java/jdk1.6.0_06/bin/java
$ jconsole
(Choosing the PID of my JBoss JVM)
Environment:
JBoss EAP 4.3 (JVM Hotspot 1.6_06)
+ JConsole (JVM Hotspot 1.6_06)
My JBOSS config in
# Enable the jconsole agent locally
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
# Enable the jconsole agent remotely on port 9008
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9008"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
# Install a wrapper around the JDK MBeanServer
JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
After accessing the stopping the JConsole in the terminal and restarting it in the same terminal it WORKED ! A miracle ?
Ctrl + C
$ jconsole
(Choosing my JBoss JVM)d
Reply to and reference this post: http://community.jboss.org/message/168509
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5074001
25 July 2010
22 July 2010
Howto install Red Hat Virtualisation KVM
Red Hat enlarged it's virtualization portfolio in 2008 by aquiring Qumranet.
The main product of the Israel based company is KVM (the Kernel-based Virtual Machine).
Ever since February 2007 KVM is part of the Linux kernel (2.6.20+).
Here a good reference on kvm:
http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization_Guide/
Howto install KVM on Fedora 13:
Official Red Hat support
sudo yum install virt-manager
sudo yum install libvirt
sudo yum install kvm
Check if you can start a virtual daemon
$ sudo service libvirtd start
error : qemudListenUnix:570 : Failed to bind socket to '@/home/jboss-as/.libvirt/libvirt-sock': Address already in use
Start screen:
Then choose 'Edit' -- 'Host details'
By default KVM stores the virtual machines within /var/lib/libvirt/images/*.img, if you want to change that goto the 'Storage' tab and choose the plus sign (Add pool). Choose the file system type 'dir' to store future virtual machines on your hard drive.
The solution
Another elegant solution is that you leave the defaults and you create a soft link on your machine
Add virtual machine
- Click first icon in toolbar "Create a new virtual machine"
- Choose name 2010_FED13_64_OracleDB10g
Install your operating system
If you have chosen Fedora 13 (for example) do not be scared of the messeges that tell you
"REINITIALIZING WILL CAUSE ALL DATA TO BE LOST"
It is only the data within the virtual machine file that was created. The scary message is subject of discussion of redhat support.
Starting Virtual machine
After having installed your OS (up to 3 hours) you'll have to restart your computer.
I ran into a freezed screen saying 'Booting from Hard Disk...' (here the Red Hat discussion)
At the beginning of the startup process you can hit Ctrl+B to enter the command line of the prebootloader gPXE.
Source: Wikipedia
http://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine
http://jwang3417.blogspot.com/2010/02/kvm-on-ubuntu-and-fedora.html
HOWTO: Resize a KVM Virtual Machine Image
http://itsignals.cascadia.com.au/?p=28
http://wiki.libvirt.org/page/Tips
The main product of the Israel based company is KVM (the Kernel-based Virtual Machine).
Ever since February 2007 KVM is part of the Linux kernel (2.6.20+).
Here a good reference on kvm:
http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization_Guide/
Howto install KVM on Fedora 13:
Official Red Hat support
sudo yum install virt-manager
sudo yum install libvirt
sudo yum install kvm
or
sudo yum groupinstall 'Virtualization'
Often you come from another virtualization envioronement (VMware or Virturalbox)
Check if you can start a virtual daemon
$ sudo service libvirtd start
error : qemudListenUnix:570 : Failed to bind socket to '@/home/jboss-as/.libvirt/libvirt-sock': Address already in use
This error occurs b/c another virutalization enviroment is blocking you
Run KVM
Either by GUI Alt + F2 or directly on command line 'virt-manager'
Image source |
Run KVM
Either by GUI Alt + F2 or directly on command line 'virt-manager'
Start screen:
Then choose 'Edit' -- 'Host details'
By default KVM stores the virtual machines within /var/lib/libvirt/images/*.img, if you want to change that goto the 'Storage' tab and choose the plus sign (Add pool). Choose the file system type 'dir' to store future virtual machines on your hard drive.
The solution
Another elegant solution is that you leave the defaults and you create a soft link on your machine
- VM - Image file can be found in directory /var/lib/libvirt/images/*.img
sudo rm -rf /var/lib/libvirt/images
sudo ln -s /data/virtual_machines /var/lib/libvirt/images - VM - Description file can be found in /etc/libvirt/qemu/*.xml
sudo cp -r /etc/libvirt/qemu /tmp/virtual_machines/qemu (first back it up)
sudo rm -rf /etc/libvirt/qemusudo ln -s /data/virtual_machines/qemu /etc/libvirt/qemu├── jon.xml
├── jon.log├── network│ ├── autostart│ │ ├── default.xml -> /etc/libvirt/qemu/networks/default.xml│ │ └── prive.xml -> /etc/libvirt/qemu/networks/prive.xml│ ├── default.xml│ └── prive.xml
avec
-rw------- 1 qemu qemu 4GB jon.img
- VM - Network file can be found in /var/lib/libvirt/network/default.xml
sudo cp -r /var/lib/libvirt/network /tmp/virtual_machines/network
sudo rm -rf /var/lib/libvirt/network
sudo ln -s /data/virtual_machines/network /var/lib/libvirt/network - VM - Logging file can be found in /var/log/libvirt/qemu/*.log
sudo rm -rf /var/log/libvirt/qemu/
ln -s /data/virtual_machines /var/log/libvirt/qemu - Move tmp folder
mkdir /data/virtual_machines
sudo cp -r /tmp/virtual_machines/* /data/virtual_machines
sudo rm -rf /tmp/virtual_machines
sudo cp /vm_backup/jon.xml /data/virtual_machines/jon.xml
sudo cp /vm_backup/jon.img /data/virtual_machines/jon.img
# check if your IP in prive.xml is correctly set 192.168.100. and change virbr0 to vm-kvm for example
sudo cp /data/virtual_machines3/networks/prive.xml /data/virtual_machines/qemu/networks/prive.xml
sudo cp /data/virtual_machines3/networks/prive.xml /data/virtual_machines/network/prive.xml
sudo ln -s ../prive.xml /data/virtual_machines/qemu/networks/prive.xml
chown qemu:qemu /data/virtual_machines/* - Restart libvirt
service libvirtd restart
Add virtual machine
- Click first icon in toolbar "Create a new virtual machine"
- Choose name 2010_FED13_64_OracleDB10g
Install your operating system
If you have chosen Fedora 13 (for example) do not be scared of the messeges that tell you
"REINITIALIZING WILL CAUSE ALL DATA TO BE LOST"
It is only the data within the virtual machine file that was created. The scary message is subject of discussion of redhat support.
Starting Virtual machine
After having installed your OS (up to 3 hours) you'll have to restart your computer.
I ran into a freezed screen saying 'Booting from Hard Disk...' (here the Red Hat discussion)
add this '-enable-kvm'
At the beginning of the startup process you can hit Ctrl+B to enter the command line of the prebootloader gPXE.
Follow-up: The problem was having hardware virtualization support turned off in the host's BIOS. (Doh!) Once I turned that on, not only was installing a guest about 10x faster, but it also booted properly afterward.
> Hi, > > I'm installing a Fedora 13 virtual host on a Fedora 13 system, like this: > > virt-install --ram 2048 --vcpus 4 --name test --os-type linux \ > --os-variant fedora13 --disk /var/lib/libvirt/images/test.img,size=10 \ > --cdrom /var/lib/libvirt/Fedora-13-x86_64-DVD.iso --vnc --noautoconsole > > I connect to the installer using virt-manager, and the install appears to > complete successfully. Then, I reboot the virtual machine and reconnect > with virt-manager. What I see is this: > > Starting SeaBios (version 0.5.1) > > gPXE (http://etherboot.org) - 00:04.0 C900 PCI2.10 PnP BBS PMM7FE0 10 C900 > > Booting from Hard Disk... > > If I connect to the VM's console using 'virsh console', there's no output > at all. I don't see anything in /var/log/messages or /var/log/libvirt that > looks like an error. > > So, I'm not sure what's going on here, as this is the first time I've done > anything with virtualization. Has my VM hung, or is this what's supposed to > happen? I was expecting that somewhere along the line that my VM would get > an IP address via DHCP so I could SSH to it, but don't see anything indicatin > g > that has happend, or what the IP address is if it has. Is something broken > here, or have I missed a crucial step? > Follow-up: The problem was having hardware virtualization support turned off in the host's BIOS. (Doh!) Once I turned that on, not only was installing a guest about 10x faster, but it also booted properly afterward.
https://www.redhat.com/archives/libvirt-users/2010-June/msg00087.html
Source: Wikipedia
http://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine
http://jwang3417.blogspot.com/2010/02/kvm-on-ubuntu-and-fedora.html
HOWTO: Resize a KVM Virtual Machine Image
http://itsignals.cascadia.com.au/?p=28
http://wiki.libvirt.org/page/Tips
21 July 2010
Clustering JBoss vs Clustering Weblogic
Summary:
This article describes two things
1. Howto set up a JBoss cluster with an Apache as load-balancer
2. Howto set up a Weblogic cluster with an Apache as load-balancer
Architecture schema:
1.
2.
Main post:
1.
- Install Apache
- Install JBoss jboss.org or redhat.com (find out the difference in an earlier post)
First
http://community.jboss.org/wiki/usingmodjk12withjboss
JBoss
Cluster
jboss
/jboss-5.1.0.GA/server/all/deploy/cluster
/jboss-eap-4.3/jboss-as/server/production/deploy/jboss-web-cluster.sar/
/jboss-eap-4.3/jboss-as/server/all/deploy/jboss-web-cluster.sar/
http://docs.jboss.org/jbossas/jboss4guide/r4/html/jbosscache.chapt.html
Howto configure JBoss with Apache using mod_jk
This article describes two things
1. Howto set up a JBoss cluster with an Apache as load-balancer
2. Howto set up a Weblogic cluster with an Apache as load-balancer
Architecture schema:
1.
2.
Main post:
1.
- Install Apache
- Install JBoss jboss.org or redhat.com (find out the difference in an earlier post)
First
http://community.jboss.org/wiki/usingmodjk12withjboss
JBoss
Cluster
jboss
/jboss-5.1.0.GA/server/all/deploy/cluster
/jboss-eap-4.3/jboss-as/server/production/deploy/jboss-web-cluster.sar/
/jboss-eap-4.3/jboss-as/server/all/deploy/jboss-web-cluster.sar/
http://docs.jboss.org/jbossas/jboss4guide/r4/html/jbosscache.chapt.html
Howto configure JBoss with Apache using mod_jk
20 July 2010
Howto migrate Oracle Weblogic to Red Hat JBoss
This post describes on a very technical level howto migrate Oracle Weblogic to Red Hat JBoss.
Situation :
Many decision takers in IT departments have not appreciated Oracle buying BEA in late 2008. Most bigger companies have Weblogic servers parks and see themselfs in a position where more and more of their IT infrastructure comes from Oracle.
To try to avoid paying monopoly prices decision takers start looking for alternatives application servers.
Step by step migration :
1. Using automatic tool to migrate weblogic.xml to jboss-web.xml
http://www.jboss.org/mass/MAT.html
Situation :
Many decision takers in IT departments have not appreciated Oracle buying BEA in late 2008. Most bigger companies have Weblogic servers parks and see themselfs in a position where more and more of their IT infrastructure comes from Oracle.
To try to avoid paying monopoly prices decision takers start looking for alternatives application servers.
Step by step migration :
1. Using automatic tool to migrate weblogic.xml to jboss-web.xml
http://www.jboss.org/mass/MAT.html
19 July 2010
Red Hat middleware VS Oracle middleware (products)
components | JBoss Enterprise SOA Platform 5.1 | Oracle SOA Suite 11gR1 (11.1.1.4.0) |
---|---|---|
Application server ------------ Main web console Command line tool Memory database supported DB JPA Framework Java Web Framework | EAP 5.1 including: Admin console(JON based) twiddle.sh HSQLDB all Hibernate JBoss Seam | Weblogic Server 11g including: Admin console WLST PointBase database all (but PostgreSQL) Toplink ADF |
BPEL engine supported DB | Riftsaw 2.1.5 Tech Preview (based on Apache ODE) PostgreSQL, MySQL, Oracle DB, SQLServer, HSQLDB, Derby | BPEL Process Manager 11 g Oracle DB, SQLServer |
ESB engine XML transformation | JBoss ESB 4.9 Smooks (XSLT 2.0, Java) | Mediator 11g (formerly known as OESB 10g) OSB 11g (Oracle Service Bus formerly known as ALSB) XSLT 1.0, XQuery, XPath 2.0, Java |
Rules (BRMS) Rule engine Rules Manager Proprietary language files Access to rules repository | JBoss Rules 5.1 (based on BRMS 5.1 / Drools 5.1) Drools Expert 5.1 () Drools Guvnor 5.1 .drl (.cdm, .scn) Webdav | Oracle Rules 11g Oracle Rule Engine Oracle Rule Author ? .rules Webdav, File |
Human Workflow Proprietary language | jBPM 3.2 jPDL | Oracle Human Workflow 11g ? |
Service Registry | juddi v3 | n/a (Oracle Governance Suite has to bought) |
Webservice managment | 5.0.1 : JBossWS -- JAX-WS (not quite equivalent) 5.1 : CXF WS-Security (not quite equivalent) | Oracle Web Services Manager 11g |
BAM (Business Activity Monitoring) | n/a | Oracle BAM 11g |
Supervision tool | JON 2.4.1 (JBoss Operations Network) | OEM 11 (Oracle Enterprise Manager) |
Developpement tool | JBDS 4 (JBoss Developer Studio) | JDeveloper 11g |
Integration of batch jobs (bulk data) | EDS-P 5.1.0 | Oracle Data Integrator 11g |
If you ask yourself why you need a login to download Red Hat products and not for Oracle, please refer to an earlier post about the different business models.
updated March 2011
updated March 2011
18 July 2010
Red Hat vs Oracle (Business Models)
Having worked for both Red Hat and Oracle around its middleware products, I will try to cover the differences between both companies.
This post covers the few questions that always come up when you first get in touch with Oracle or Red Hat.
Oracle:
Red Hat:
This post covers the few questions that always come up when you first get in touch with Oracle or Red Hat.
Oracle:
- Source code:
Closed (but Oracle products that are based on Java code are not obfuscated, decompilation is possible)
Open (Java)
- Main Revenues: License and support
- Software downloads (no liscense key is necessary; some software is free : JDeveloper, database Oracle XE)
Red Hat:
- Source code: Open (all code comes well selected from open source community projects like jboss.org, fedora.org, ...)
- Main Revenues: Subscriptions (that is the Red Hat name for : the right to download a supported version + support)
- Software downlods (you'll need to create a Red Hat login and get a subscription for the wanted software)
17 July 2010
Red Hat products VS open source community projects
Summary:
This article explains the business model of Red Hat.
Main post:
Red Hat is making money by selling subscriptions (i.e. support for it's products for a given time). All of Red Hat's products are open source and therefore the community behind each project/product is driving the innovation of the final product labeled with a red hat.
Red Hat covers the most important IT infrastructure areas:
Middleware: JBoss.org (community project) --> JBoss by Red Hat (product)
OS - Linux: Fedora (community project) --> RHEL (Red Hat Enterprise Linux)
Virtualization: Linux KVM --> RVEL (Red Hat Enterprise Virtualization)
Provisioning: Spacewalk (community project) --> RHN (Red Hat Network)
IDM - LDAP: 389 Directory Server --> RHDS (Red Hat Directory Server)
To make sure that the community is keeping up the innovation Red Hat invests money by hiring main developers within the communities.
Why should I take a Red Hat product, when the community project is for free?
- Getting a product from a community project you get the latest features and versions with community-based support (i.e. forums)
- Getting a product from Red Hat you get a stable & enterprise-ready version with subscription-based support ( i.e. 24/7 phone and online support, depending on the subscription you bought)
More on the subject you find in the Red Hat Whitepaper:
"Why subscribe to enterprise open source software? Top ten reasons to use JBoss Enterprise Middleware" www.jboss.com/pdf/jb-value-of-sub.pdf
This article explains the business model of Red Hat.
Main post:
Red Hat is making money by selling subscriptions (i.e. support for it's products for a given time). All of Red Hat's products are open source and therefore the community behind each project/product is driving the innovation of the final product labeled with a red hat.
Red Hat covers the most important IT infrastructure areas:
Middleware: JBoss.org (community project) --> JBoss by Red Hat (product)
OS - Linux: Fedora (community project) --> RHEL (Red Hat Enterprise Linux)
Virtualization: Linux KVM --> RVEL (Red Hat Enterprise Virtualization)
Provisioning: Spacewalk (community project) --> RHN (Red Hat Network)
IDM - LDAP: 389 Directory Server --> RHDS (Red Hat Directory Server)
To make sure that the community is keeping up the innovation Red Hat invests money by hiring main developers within the communities.
Why should I take a Red Hat product, when the community project is for free?
- Getting a product from a community project you get the latest features and versions with community-based support (i.e. forums)
- Getting a product from Red Hat you get a stable & enterprise-ready version with subscription-based support ( i.e. 24/7 phone and online support, depending on the subscription you bought)
More on the subject you find in the Red Hat Whitepaper:
"Why subscribe to enterprise open source software? Top ten reasons to use JBoss Enterprise Middleware" www.jboss.com/pdf/jb-value-of-sub.pdf
15 July 2010
GPL vs Open Source
What is the difference
GPL (General Public Liscense)
GPL (General Public Liscense)
13 July 2010
Yet another weblog ...
I have been thinking about a blog on technical related issues for a while now.
Sharing knowledge and preserving it is an essential idea that everyone has met at least once in a lifetime when looking at old childhood pictures that your parents took or losing them.
In my eyes a blog is a nifty way to keep your knowledge together and make it shareable.
I'll give it a try and will share some of my modest thoughts...
Roland
Sharing knowledge and preserving it is an essential idea that everyone has met at least once in a lifetime when looking at old childhood pictures that your parents took or losing them.
In my eyes a blog is a nifty way to keep your knowledge together and make it shareable.
I'll give it a try and will share some of my modest thoughts...
Roland
Subscribe to:
Posts (Atom)