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)

21 October 2010

Clustering JBoss 5 (porting Weblogic dizzyworld example)

Summary:
If you are coming from the Weblogic world you might have done training and seen the dizzyworld example, i.e. the example environment of at least Weblo 9,10 and 11.
In this post I will try to show some

Main post:


Troubleshooting when starting multiple JBoss instances on one machine (one binded to localhost, the other to your_hostname)
WARN [NAKACK] 55200 discarded message from non-member 55200, my view is ...

20 October 2010

Software patents a threat for innovation?

Lately many IT companies have been suing competitors for using their patents. Furthermore patent trolls (companies with the business model of buying patents and suing companies -- congratulations!) have been accreting and have been attacking companies.


Here some references on that:
http://www.networkworld.com/community/node/66807
http://fosspatents.blogspot.com
http://www.slideshare.net/MissionFuture/jan-wildeboer-open-source-presentation
http://en.wikipedia.org/wiki/Free_and_open_source_software

12 October 2010

Howto write JBoss Java MBeans to expose to a JMX Client

Summary:
Sometime you will find yourself in the situation of wanting to monitor your application, but no monitoring capability is given. So you will have to write your own Java MBean that will expose information of your JBoss application to a JMX Client.

Main post:
Examples: jboss-eap-4.3_CP08/jboss-as/docs/examples/jmx/logging-monitor
From the JBoss SVN you can get sample MBean classes:
/svn_jboss_org/trunk/varia/src/main/java/org/jboss/jmx/examples/configuration/

Have your MBean interface extend the org.jboss.system.Service and org.jboss.system.ServiceMBean interface.
org.jboss.system.Service and org.jboss.system.ServiceMBean can be found in:  
jboss-eap-4.3_CP08/jboss-as/server/all/deploy/management/console-mgr.sar/web-console.war/applet.jar


  • Add the classes















  • You can see two MBean that are almost the same (up to the fact that one extends the org.jboss.system.ServiceMBean class)
    1. 
    Attributes: JndiName
    Operations: start / stop
    2. 
    Extents the class org.jboss.system.ServiceMBean -- you can see that this class gives you out of the 
    Attributes: Name / JndiName / StateString / State
    Operations: destroy / start / stop /create / jbossInternalLifecycle
    Notificaitons

    Explanation on standard Java MBean like RuntimeMXBean, ThreadMXBean, MemoryPoolMXBean, ... can be found here: http://download.oracle.com/javase/1.5.0/docs/guide/management/overview.html

    Jacorb to be found in:
    eap43CP08/jboss-as/server/all/lib/jacorb.jar
    org.jacorb.util.threadpool.ThreadPool.class (here we have to get the information on the thread pool counter.
    In class ThreadPool within method createNewThread() the following line:
    localThread.setName(this.namePrefix + this.threadCount++);


    Jacorb example:
    http://www.jpackage.org/browser/rpm.php?jppversion=6.0&id=7709

    Set up environment:
    jboss-log4j.xml

    11 October 2010

    Troubleshooting JBoss Portal 4.3

    Problems that might occure while working with JBoss Portal:

    - Admin link is not visible (between Dashboard and Logout)







    That occurs when the admin is not in upper case in the LDAP. See the example of two *.ldif files. One works, the other does not.
    Does not work:
    dn: cn=admin,ou=Roles,o=rbrackma,dc=redhat,dc=com
    objectClass: top
    objectClass: groupOfNames
    cn: admin
    description: Administrators
    member: uid=admin,ou=People,o=rbrackma,dc=redhat,dc=com


    Works:
    dn: cn=Admin,ou=Roles,o=rbrackma,dc=redhat,dc=com
    objectClass: top
    objectClass: groupOfNames
    cn: Admin
    description: Administrators
    member: uid=admin,ou=People,o=rbrackma,dc=redhat,dc=com












    In the EPP logs you might also find another error:


    - ERROR [LDAPUserProfileModuleImpl] No such attribute ('title') in entry: uid=admin,ou=People,o=example,dc=jboss,dc=com
    LDAP is looking for the attribute title, but does not find it within the RHDS LDAP. Does not cause any problem within the system, but is annoying.

    07 October 2010

    Howto setup LDAP with Red Hat EPP (JBoss Portal / GateIn)

    Description:
    When you first start with Red Hat's Enterprise Portal Platform you will be able to connect to the portal with admin/admin or user/user. The credentials will be checked against the default users within the portals in-memory database HSQL. Mostly you would want the credentials to be checked against your companies LDAP.
    This post will cover setting up an LDAP and configuring EPP4.3 to use it.
    - Install LDAP
    - Start LDAP services
    - Setup LDAP
    - Install EPP4.3
    - Setup EPP4.3 to use LDAP for credentials
    - Connect to the portal http://localhost:8080/portal

    Main post:
    Install LDAP
    Before starting be aware that the only supported LDAP servers are:
    Red Hat Directory Server, OpenDS and OpenLDAP.

    Within this post the open source LDAP server "Red Hat Directory Server" will be used.
    Installing it is pretty straight forward.
    First install the software :
    sudo yum install 389-ds
    sudo yum install fedora-idm-console

    Then configure the RHDS with this document:
    http://www.scribd.com/doc/20555511/Fedora-Directory-LDAP-Server-Setup-Configuration-on-Linux-HowTo-v1-0
    If the document is not available call the following command line and follow the install instructions which are pretty straight forward
    # setup-ds-admin.pl

    At the End you should remember:
    Directory Manager: cn=Directory Manager
    Password: your_password
    Admin port: 9830
    LDAP port: 389

    Start LDAP services

    sudo service dirsrv start
    sudo service dirsrv-admin start
    sudo service httpd start

    Setup LDAP

    Run the earlier installed LDAP browser fedora-idm-console (you can use any other LDAP browser)
    $ fedora-idm-console

    Choose the Directory Server (1) and choose Open (2).










    Then you just have to choose 'Import Databases' and import a *.ldif (save the following text into a test.ldif file). After that you should be able to browse you LDAP tree in the Directory tab...


    dn: o=your_host,dc=your_domain,dc=com
    objectclass: top
    objectclass: dcObject
    objectclass: organization
    o: your_host
    dc: your_host
    dn: ou=People,o=your_host,dc=your_domain,dc=com
    objectclass: top
    objectclass: organizationalUnit
    ou: People
    dn: uid=admin,ou=People,o=your_host,dc=your_domain,dc=com
    objectclass: top
    objectclass: inetOrgPerson
    objectclass: person
    uid: admin
    cn: Administrator
    sn: Duke
    userPassword: admin
    mail: admin@your_host.your_domain.com
    dn: uid=user,ou=People,o=your_host,dc=your_domain,dc=com
    objectclass: top
    objectclass: inetOrgPerson
    objectclass: person
    uid: user
    cn: User
    sn: Sample
    userPassword: user
    mail: user@your_host.your_domain.com
    dn: uid=jduke,ou=People,o=your_host,dc=your_domain,dc=com
    objectclass: top
    objectclass: inetOrgPerson
    objectclass: person
    uid: jduke
    cn: Java
    sn: Duke
    userPassword: theduke
    mail: jduke@your_host.your_domain.com
    dn: ou=Roles,o=your_host,dc=your_domain,dc=com
    objectclass: top
    objectclass: organizationalUnit
    ou: Roles
    dn: cn=Admin,ou=Roles,o=your_host,dc=your_domain,dc=com
    objectClass: top
    objectClass: groupOfNames
    cn: Admin
    description: Administrators
    member: uid=admin,ou=People,o=your_host,dc=your_domain,dc=com
    dn: cn=User,ou=Roles,o=your_host,dc=your_domain,dc=com
    objectClass: top
    objectClass: groupOfNames
    cn: User
    description: Users
    member: uid=admin,ou=People,o=your_host,dc=your_domain,dc=com
    member: uid=user,ou=People,o=your_host,dc=your_domain,dc=com
    member: uid=jduke,ou=People,o=your_host,dc=your_domain,dc=com


    Install EPP4.3
    The installation of EPP4.3 is extremly simple.
    First download the jboss-epp-4.3.GA_CP0X-src.zip here. You will need a Red Hat login and a valid subscription to download, if you don't know why: I covered it in an earlier post.
    Then extract the zip file into the directory jboss-epp-4.3. That's it.


    Setup EPP4.3 to use LDAP for credentials
    You will have to change the following files in red to make LDAP work.






















    1. Within jboss-epp-4.3/jboss-as/server/default/deploy/jboss-portal.sar/META-INF/jboss-service.xml
    change

          conf/identity/identity-config.xml
    to
          conf/identity/ldap_identity-config.xml

    2. Within jboss-epp-4.3/jboss-as/server/default/deploy/jboss-portal.sar/conf/identity/ldap_identity-config.xml
    adapt the value tags that are linked to the following tags:
    host
    port
    adminPassword
    userCtxDN
    roleCtxDN
    (the be sure to choose the right value for userCtxDN and roleCtxDN connect to your LDAP browser and check the values)


    3. Within jboss-epp-4.3/jboss-as/server/default/deploy/jboss-portal.sar/conf/identity/standardidentity-config.xml

    adapt the value tags that are linked to the 5 tags seen in the section above.

    4. Within jboss-epp-4.3/jboss-as/server/default/deploy/jboss-portal.sar/conf/login-config.xml
    comment (do not use)
    login-module code="org.jboss.portal.identity.auth.IdentityLoginModule"
    uncomment (use)
    login-module code="org.jboss.portal.identity.auth.SynchronizingLDAPExtLoginModule"
    and adapt the variable to your configuration.
    Connect to the portal
    Now you should be able to connect to the portal:
    http://localhost:8080/portal
    with the user admin and password admin.
    The default HSQL database users that come with the portal out of the box are admin and user. After migrating to LDAP they will only work if you have configured your portal properly. For example you have the possibility to authenticate users against LDAP + DB or only against LDAP. In this post users are only authenicated against LDAP! And 3 users available are the ones imported into the LDAP with the *.ldif file: admin, user, jduke.


    If you still have problems check out the section "Troubleshooting JBoss Portal"