skhannit Archive

Starting a specific JBOSS server profile and a specific ip-address

 A. Starting a specific JBOSS server profile :

1. Navigate to the path …\jboss-eap-5.1\jboss-as\server

2. The server folder has different profile. Create a duplicate copy of the default folder and rename it to server1. We can  customize this profile and start it.

3. To start server1 , navigate to the path …\jboss-eap-5.1\jboss-as\bin\ and open the command prompt.

4. Enter the command  run -c server1 ( “-c” is used to choose the profile name)

im5

Once, the command is executed the server1 profile starts

im6

5. To check the console, go to http://localhost:8080/jmx-console

im7

6. Enter the Username and Password (I have used my credentials to log in, we will cover how to manage user credentials password later in this article). The JMX Agent View console is displayed:

im8

B. Starting a specific JBOSS server on a given IP-Address :

1. Repeat steps 1-3 in section A.

2. Enter the command  run -c server1 -b ip-address ( “-b” is used to run the server on the specific ip-address)

Installing JBoss EAP as a windows service

1. Copy …\jboss-ep-5.1\native\sbin to …\jboss-eap-5.1\jboss-as\bin

2.  Locate the cmd.exe file in the path  C:\Windows\System32\ and right click to Run as administrator.

im9

The following command prompt is displayed:

im10

3.  Navigate to the path  …\jboss-eap-5.1\jboss-as\bin\ in the command prompt and execute the command service.bat install

im11

The service JBEAP5SVC -SERVER1 has been created.

4. We can start and stop the service from the Task Manager.

im12

 

Managing Password in JBOSS EAP

1. Navigate to …\jboss-eap-5.1\jboss-as\server\server1\conf\props .

2.  Open the jmx-console-roles.properties file and add roles as required.  I added the role saky , which I use to  login to jmx-console. Refer the sample file

# A sample roles.properties file for use with the UsersRolesLoginModule

admin=JBossAdmin,HttpInvoker
saky=JBossAdmin,HttpInvoker

3. Similarly, Open the jmx-console-users.properties file and edit passwords for the users. 

# A sample users.properties file for use with the UsersRolesLoginModule
admin=admin
saky=saky

Important: jmx-console is mapped in login-config.xml  ( …\jboss-eap-5.1\jboss-as\server\server1\conf\ ).

<application-policy name=”jmx-console”>
<authentication>
<login-module code=”org.jboss.security.auth.spi.UsersRolesLoginModule”
flag=”required”>
<module-option name=”usersProperties”>props/jmx-console-users.properties</module-option>
<module-option name=”rolesProperties”>props/jmx-console-roles.properties</module-option>
</login-module>
</authentication>
</application-policy>

Note: Restart the server if any changes are made in any of these configuration settings

Starting the default JBOSS server

1. Navigate to the path …\jboss-eap-5.1\jboss-as\bin\ and open the command prompt.

2. Enter the command run.bat to start the JBOSS server

im1

Once, the command is executed the  default profile for  JBOSS server starts

im2

 

3. To check the console, go to http://localhost:8080/admin-console

im3

4. Enter the Username and Password (I have used Admin credentials to log in, we will cover how to Managing Password article). The JBOSS Admin console is displayed:

im4

NodeManager issues during oracle weblogic server environment setup

I/O error while reading domain directory: java.io.FileNotFoundException: Domain directory ‘D:\bea\wlserver_10.3\common\nodemanager’ invalid (domain salt file not found

We need to to nmEnroll and restart the nodemanager to fix this error.


weblogic.nodemanager.common.ConfigException: Native version is enabled but node manager native library could not be loaded

You need to set the LD_LIBRARY_PATH for Solaris/Linux and SHLIB_PATH for HP-UX

Solaris/Linux

LD_LIBRARY_PATH:$WL_HOME/server/lib/solaris:$WL_HOME/server/lib/solaris/ocixxx_x
HP-UX
SHLIB_PATH=$SHLIB_PATH:$WL_HOME/server/lib/hpux11:$WL_HOME/server/lib/hpux11/ocixxx_x

Fatal error in node manager server
java.lang.NullPointerException
at weblogic.nodemanager.server.ServerManager.getStartCallbacks(ServerManager.java:187)
at weblogic.nodemanager.server.AbstractServerManager.initialize(AbstractServerManager.java:97)
at weblogic.nodemanager.server.AbstractServerManager.(AbstractServerManager.java:63)

This is a bug on WLS and there is a patch available for this.
Please contact Oracle Customer Support.

common database related issues with Weblogic Server

<BEA-001112> <Test “SELECT 1 FROM DUAL” set up for pool “Test” failed with exception: “java.sql.SQLException: Io exception: Connection reset by peer: socket write error”.>

Network or the DBMS is killing the connection, you need to check with the Database Admin and the network Admin.

 

java.lang.ClassCastException: oracle.jdbc.driver.LogicalConnection incompatible with oracle.jdbc.OracleCo
nnection

Check if you’ve got multiple versions of the driver in your environment, server\lib, domain\lib or added in the server classpath in the startWeblogic.cmd. Keep only one driver in your environment.

ORA-28267: Invalid NameSpace value

This is fixed by Patch 13923804 – 11.2.0.2.7 Patch Set Update (11G database patch)

weblogic.common.ResourceException: IO Error: Connection reset atweblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnectionEnvFactory.java:512)

Try to set the initial capacity of the datasource to zero.

Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMERR start() failed on resource ‘Operational’: XAER_RMERR : A resource manager error has occured in the transaction branch

Issue can occur when you create tables using 10g client on 11g database. Recreate the tables with 11g client.

 

XAER_RMFAIL : Resource manager is unavailable

Keep your maximum and minimum connection as same.
Set this to true
Keep XA Connection Until Transaction Complete
Check with DBA on the number of process & sessions.


Error when getting datasource
weblogic.common.resourcepool.ResourceDeadException:
0:weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Locale not recognized

This is due to the locale configuration of the server.
You can start WLS with the following JVM Params and also make sure the client browser has the correct locale setting.

-Duser.language=
-Duser.country=
-Duser.timezone=

If it still doesnt solve the issue you can try to set the locale programmatically before getting connection.

Locale.setDefault(Locale.ENGLISH);
return DriverManager.getConnection(URL, username, password);

Caused by: java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAER_PROTO : Routine was invoked in an inproper context start() failed on resource ‘MSD_CONN_POOL’: XAER_PROTO : Routine was invoked in an inproper context
oracle.jdbc.xa.OracleXAException

This is a known issue and is fixed in 10.3.1
You can set Test Connection on Reserve to true.

java.sql.SQLException: Result set already closed

This is a coding isssue. Avoid calling a closed resultset.

EXCEPTION: (12021) Cannot obtain new connection.

Please make sure your ojdbc14.jar is there in the classpath.
weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool

Check application code if the connections, resultset and jdbc statements have been closed properly.

 

ExecuteThread: ‘0’ for queue: ‘weblogic.kernel.Default (self-tuning)'” RUNNABLE native
jrockit.net.SocketNativeIO.readBytesPinned(Native Method)
jrockit.net.SocketNativeIO.socketRead(SocketNativeIO.java:32)
java.net.SocketInputStream.socketRead0(SocketInputStream.java)
java.net.SocketInputStream.read(SocketInputStream.java:129)
weblogic.jdbc.sqlserver.SQLServerByteOrderedDataReader.makeMoreDataAvailable(Unknown Source)

This is a known issue with MS SQL Server and WLS 10.3 to 10.3.6. Please set the following connection properties.

SendStringParametersAsUnicode=false