Monday, 10 March 2014

WAS Interview Questions

1.WHAT IS TRACING?
Tracing is when you go through an entire program and record the value of variables and the output. You trace a program when you want to find out what actually went wrong
2.WHERE TO GIVE APPLICATION PRIORITY WHILE STARTING SERVER?
it will be under Enterprise applications ->app name -> startup behaviour ->Startup order   in the admin console
3.HOW TO MOVE CODE DEV ENVIRONMENT TO TESTING ENVIRONMENT?
I’m sure what they mean by code here. I think, incase of applications, export them from in DEC and deploy in TEST.
4.WHAT IS SSL?WHEN IT ENCRYPT & DECRYPT THE DATA?
SSL are digital signed certificates. user for meesage/communication integrity and confidentiality.  Generally encrypt at Sender side and decrypt at receiver side
5.WHAT IS INCIDENT MANAGEMENT?
It is part of ITIL process….. simple explanation is, when there is a problem in ur WAS environment, which procedure do you follow.
6.WHEN APPLICATION IS DOWN WHAT U WILL DO?
First look at the logs for errors. If you find the error, save the logs and start ur application. Then start trouble shoot.
If no error found, run a trace and look for FFDC etc..
7.I HAVE 16GB RAM,WHAT IS THE MINIMUM & MAXIMUM HEAPSIZE ?
No relation. Heap settings should be made depends on application
8.HOW TO OPEN ADMIN CONSOLE IN AIX/UNIX & WHAT IS THE DEFAULT FILE SYSTEM OF AIX?
admin console can be viewed from remote machine which has a browser, if not behind firewall.
9.WHAT IS FILE DESCRIPTORS IN AIX?
A file descriptor is a handle created by a process when a file is opened. There is a limit to the amount of file descriptors per process.If the file descriptor limit is exceeded for a process, you may see the following errors:”Too Many Open Files”
10.HOW TO RESOLVE PORT CONFLICTS IN PRODUCTION ENVIRONMENT?
check why there is port conflict
run updateports script in WAS

****************************

how do you create a cluster
go to servers -> clusters-> new ->give cluster_name->define first member->define other members->finish
how do you add a new cluster member
go to servers -> clusters->cluster_name ->cluster members ->new ->give name/node/others->apply->ok->save
one of the cluster member (jvm) is having issues. To troubleshoot the issue, you decided to take it out of the cluster. How do you do that?
Make its runtime weight to 0
In a complex environment, there are 10 machines. Machine A is having 8GB RAM and machine B having 2GB of RAM. The administrator decided to send twice as many request as machineB to machineA. How can he achive it?
give machineA twice the weight as machineB
After making some changes on a cluster, it is required to recycle/restart all the cluster JVMs. The lead admin told you to make sure that there should not be any downtime during this recycle. Which option do you use to achieve it?
Ripplestart
A large application which has 5web modules has been deployed on to a cluster. After some months, the developer asked you to update on of the 5web modules. How do you do it?
Rollout
can you change the cluster name, once it was created
No

****************************8888

. What is virtual host in websphere application server?
Virtual host is a configuration not a physical one.  A configuration that lets a single machine resemble multiple host machines. Each virtual host has a logical name and a list of one or more DNS host aliases by which it is known.  By default, we wull have a default_house and admin_host virtual hosts defined in websphere application server.
3. how do i connect my application to talk to a database?
To achive this , you need to create a JDBC provider and datasource. The JDBC provider object encapsulates the specific JDBC driver implementation class for access to the specific vendor database of your environment. The data source object supplies your application with connections for accessing the database. The best way to learn more about this task is login to administration console –> guided activities –> connecting to a database.
4. How can i make sure that my servers are available while restarting a cluster?
Use the option ripplestart … It first stops and then restarts each member of the cluster.
5. I’ve made some changes to my applicaiton’s web.xml , how and where should i update this file?
You can do this from the administration console. Go to enterprise applications –>select your application and click update. on the next panel, you’ll have option to update the entire application, a single module or even a single file or multiple files.
Select the single file option and specify the file’s path you like to update. Specify a relative path to the file that starts from the root of the war/ear file. So it looks something like this: app1.war/WEB-INF/web.xml
6. How do i minimize the downtime while i’m updating the applications?
Use rollout update option. This option sequentially updates an application on multiple cluster members across a cluster. After you update an application’s files or configuration, click Rollout Update to install the application’s updated files or configuration on all cluster members of a cluster on which the application is installed.
Rollout update will save the application configurations then stops the cluster members on a node then syncs the configuration and stat the clusters members on that node. Then it proceeds to the next node and does the same steps.
7. We are getting a ‘class not found’ and developers like to know, if that class is being loaded or not. how can i assist them troubleshoot the issue?
WebSphere administration console has a utility using which you can see what classes are loaded at what scope for an application. Go to Troubleshooting –>class loader viewer and select the module.
8. We have some issue with our application server and we tried killing it using kill-9 command, the process disappeared for few seconds but it is back again. We did not start the server but it started. What would be the reason?
Servers > Application Servers > server_name. Then, under Server Infrastructure, click Java and Process Management > Process Definition > process > Monitoring Policy. Here we have an option Automatic Restart, this Specifies whether the process should restart automatically if it fails. On distributed systems, the default is to restart the process automatically.
9. Is there a way i can start my server along with nodeagent ?
Servers > Application Servers > server_name. Then, under Server Infrastructure, click Java and Process Management > Process Definition > process > Monitoring Policy. Here we have an option Node Restart State which specifies the desired behavior of the servers after the node completely shuts down and restarts.
  • STOPPED – node agent does not start the server.
  • RUNNING – the node agent always starts the server.
  • PREVIOUS – the node agent starts the server only if the server was running when the node agent stopped.
Test connection failed issue:

Problem(Abstract)

Test Connection fails on data source which has newly created J2C Authentication Alias.

Cause

After configuring the data source, click the Test Connection button from Administrative Console gets the following error:

    The test connection operation failed for data source [datasource] on server nodeagent at node [node] with the following exception: java.lang.Exception: java.sql.SQLException: null userid not supported
    DSRA0010E: SQL State = null, Error Code = -99,999. View JVM logs for further details. 
This error often occurs after a new J2C authentication alias was created or an existing one was modified. The configuration change for the new authentication alias was not pushed out to the Java™ process in which the Test Connection was invoked on.

Resolving the problem

The problem can be easily solved by restarting the Java process (application server, node agent or deployment manager) for which the Test Connection is running based on the following:
    • In the IBM WebSphere Application Server Base environment, there is a single Java process running. The Administrative Console runs in this process, and Test Connection operation for the data source takes place in this process as well.
    • In the WebSphere Network Deployment environment, the Test Connection operation for data sources configured at the server or cluster scope is performed in the node agent of that server. The data source configured at the node or cell scope is performed in the node agent or deployment manager servers respectively.

Monday, 17 February 2014

LDAP Configaration.

Configuring LDAP on WebSphere Application Server
You can configure LDAP when IBM® Rational® Quality Manager is configured to run on WebSphere® Application Server.
About this task
To configure LDAP:
Procedure
1.    From the WebSphere Admin console, click Security > Secure administration, applications, and infrastructure. (On WebSphere Application Server 7.0.0.7, click Security > Global security.)
2.    Update the security settings as follows:
o    Enable administrative security: on
o    Enable application security: on
o    User account repository/Available realm definitions: standalone LDAP registry
o    In the User account repository section, click Configure, and supply the General Properties.
§  Primary administrative user name - Your user ID
§  Server user identity - Automatically generated server identity
§  Host - Name of the LDAP server
§  Port - Port of the LDAP server
§  Type of LDAP server - Custom
§  Search timeout - 120 seconds
§  Base distinguished name (DN) - The base distinguished name of the directory service
3.    Click Apply, and save the changes.
4.    In the Configuration section, click Test connection.
5.    In the Additional Properties section, click Advanced Lightweight Directory Access Protocol (LDAP).
6.    Specify the General Properties fields as follows:
o    User filter:
(&(emailaddress=%v)(objectclass=ePerson))
o    Group filter:
(&(cn=%v)(|(objectclass=groupOfNames)(objectclass=groupOfUniqueNames)))
o    User ID map:
 *:emailaddress
o    Group member ID map: (replace ibm with your own ID)
ibm-allGroups:member;ibm-allGroups:uniqueMember
o    Certificate map mode:
EXACT_DN
7.    Click Apply when done and save the changes.
8.    Click Apply and Save for each of the screens to confirm each setting.
Note: On the last page, make sure the Current realm definition is set to Standalone LDAP registry.
9.    Stop and restart the WebSphere Application Server.
10. After the WebSphere Application Server restarts, validate the changes by logging into the Admin Console.
11. To map user groups to the specific applications, click Applications > Enterprise Applications. (On WebSphere Application Server 7.0.0.7 and newer, click Applications > Application Types > WebSphere enterprise applications.)
12. In the Enterprise Applications list, select the jazz_war application and click Stop.
13. When the application stops, click the jazz_war application to open it for editing.
14. In the Detail properties section, click Security role to user/group mapping.
15. Select a specific group, such as JazzAdmins and JazzUsers, and click Look up groups. ( On WebSphere Application Server 7.0.0.7 and newer, click Map groups.)
These groups are associated with every Jazz™ implementation and must be mapped to a particular LDAP group that contains the authorized users. These groups must be set up on the LDAP server prior to performing this mapping.
16. Enter a search string to return your group names from the LDAP server. Click Search to run the query.
17. From the list of available groups returned, select the particular group and move it to the Selected column.
18. Click OK to map the LDAP groups to the Jazz groups.
19. Map the appropriate LDAP group for all Jazz groups:
o    JazzAdmins
o    JazzProjectAdmins
o    JazzDWAdmins
o    JazzUsers
o    JazzGuests
Note: Do not enable the All authenticated? option.
20. Save the changes, and restart the jazz_war application.
21. Log out of the Admin Console, and close the browser window.


Configuring WebSphere Application Server to use LDAP

To switch from an internal user registry to use an LDAP user registry, you must first update the WebSphere® Application Server security settings and configure WebSphere Application Server to use the LDAP user registry.
About this task
To configure WebSphere Application Server to use LDAP:
1.     Log in to the WebSphere Application Server Administrator console. The URL for the console takes the following form: http://[hostname:WSadminport]/IBM/console.
2.     Click Security > Global Security.
3.     Ensure that the Use domain-qualified user IDs option is not selected.
4.     In the User registries section, click the LDAP link.
5.     Enter the information for connecting to your LDAP server including the following fields. The server user ID and password must be valid for connecting to the LDAP server. If you provide a base distinguished name or bind distinguished name, the distinguished names must use LDAP syntax. For example, CN=John Doe,OU=Rochester,O=IBM,C=US.
Server user ID
Type the WebSphere Application Server username. You can either enter the complete distinguished name (DN) of the user or the short name of the user, as defined by the user filter in the Advanced LDAP settings panel.
Server user password
Type the WebSphere Application Server password.
Type
Select the type of LDAP server from the list. The type of LDAP server determines the default filters that are used by WebSphere Application Server.
Host
Enter the fully qualified host name of the LDAP server. You can enter either the IP address or the domain name system (DNS) name.
Port
Enter the LDAP server port number. The default value is 389.
Base distinguished name (DN)
Enter the base distinguished name (DN) of the directory service, which indicates the starting point for LDAP searches of the directory service. For example, for a user with a DN of cn=John Doe , ou=Rochester, o=IBM, c=US, specify the Base DN as any of the following options: ou=Rochester, o=IBM, c=US or o=IBM c=US or c=US. For authorization purposes, this field is case sensitive. This field is used to limit search scope.
Optional: Bind distinguished name (DN)
Enter the bind DN name. The Bind DN is required only if anonymous access to the LDAP server is not allowed.
Optional: Bind password
Enter the password that corresponds to the bind DN.
Reuse connection
Ensure that this option is selected. This option specifies that the server should reuse the LDAP connection. Clear this option only in rare situations where a router is used to send requests to multiple LDAP servers and when the router does not support affinity. Leave this option selected for all other situations.
Optional: SSL enabled
Select this option if you want to use Secure Sockets Layer communications with the LDAP server.
Optional: SSL configuration
Select the Secure Sockets Layer configuration to use for the LDAP connection. This configuration is used only when SSL is enabled for LDAP. The default is DefaultSSLSettings. To modify or create a new SSL configuration, click Security > SSL .
Note: The DN that you provide in this screen must be carefully typed and checked. It must match the default casing that the LDAP server uses.
6.     Click Apply.
7.     To modify advanced settings, such as which ID the user can use to authenticate, click Advanced Lightweight Directory Access Protocol (LDAP) user registry settings in the Additional Properties section. For more information, refer to publib.boulder.ibm.com/infocenter/wasinfo/v6r0/topic/com.ibm.websphere.base.doc/info/aes/ae/usec_advldap.html.
8.     Click OK and on the next page click the Save link.
9.     On the Global Security panel, select Lightweight Directory Access Protocol (LDAP) user registry from the Active User Registry field. Validation is only done when you click OK or Apply in the Global Security panel.
10.  Click Apply. After you click Apply, WebSphere Application Server attempts to authenticate the user against the LDAP registry. This authentication tests the information that you entered and, if any information is incorrect, the authentication fails. If the authentication fails, check the information in Step 5.
11.  Click the Save button to confirm your changes to your configuration. The registry changes take effect when you restart IBM® WebSphere Application Server later in the procedure.
What to do next
For additional instructions on configuring WebSphere Application Server to use LDAP, refer to Configuring WebSphere Application Server for LDAP.
  • Determining the LDAP distinguished name (DN)
    If you are configuring IBM Information Server to use an LDAP user registry, the full LDAP distinguished name (DN) of the suite administrator is required. If you cannot get the LDAP DN from your LDAP administrator, you might be able to use the following procedures to determine the LDAP DN.
Related tasks
Related reference

PDFThis topic is also in the IBM InfoSphere Information Server Administration Guide

Tuesday, 10 December 2013

JDBC creation through Wsadmin

Configuring new data sources using wsadmin

You can configure new data sources using the wsadmin scripting tool.

Before you begin

Before starting this task, the wsadmin tool must be running. See the topic Starting the wsadmin scripting client for more information.In WebSphere® Application Server, any JDBC driver properties that are required by your database vendor must be set as data source properties. Consult the article Data source minimum required settings, by vendor to see a list of these properties and setting options, ordered by JDBC provider type. Consult your database vendor documentation to learn about available optional data source properties. Script them as custom properties after you create the data source. In the Related links section of this article, click the "Configuring new data source custom properties using scripting" link for more information.
[z/OS] You can also learn about optional data source properties in the Application Programming Guide and Reference for Java for your version of DB2® for z/OS®, if you use one of the following JDBC providers:
  • DB2 for z/OS Local JDBC Provider (RRS) JDBC Provider (using the DB2 JDBC / SQLJ driver)
  • DB2 Universal JDBC Driver provider

About this task

There are two ways to perform this task; use either of the following wsadmin scripting objects:
  • AdminTask object
  • AdminConfig object
AdminConfig gives you more configuration control than the AdminTask object. When you create a data source using AdminTask, you supply universally required properties only, such as a JNDI name for the data source. (Consult the article JDBCProviderManagement command group for the AdminTask object for more information.) Other properties that are required by your JDBC driver are assigned default values by Application Server. You cannot use AdminTask commands to set or edit these properties; you must use AdminConfig commands.

Procedure

  • Using the AdminConfig object to configure a new data source:
    1. Identify the parent ID, which is the name and location of the JDBC provider that supports your data source.
      • Using Jacl:
        set newjdbc [$AdminConfig getid /Cell:mycell/Node:mynode/JDBCProvider:JDBC1/]
      • Using Jython:
        newjdbc = AdminConfig.getid('/Cell:mycell/Node:mynode/JDBCProvider:JDBC1/')
        print newjdbc
      Example output:
      JDBC1(cells/mycell/nodes/mynode|resources.xml#JDBCProvider_1)
    2. Obtain the required attributes.
      Fastpath: For supported JDBC drivers, you can also script data sources according to the same pre-configured templates that are used by the administrative console logic. Consult the article Creating configuration objects using the wsadmin scripting tool for details.
      • Using Jacl:
        $AdminConfig required DataSource
      • Using Jython:
        print AdminConfig.required('DataSource')
      Example output:
      Attribute   Type
      name    String
      Tip: If the database vendor-required properties (which are referenced in the article Data source minimum required settings, by vendor) are not displayed in the resulting list of required attributes, script these properties as data source custom properties after you create the data source.
    3. Set up the required attributes.
      • Using Jacl:
        set name [list name DS1]
        set dsAttrs [list $name]
      • Using Jython:
        name = ['name', 'DS1']
        dsAttrs = [name]
    4. Create the data source.
      • Using Jacl:
        set newds [$AdminConfig create DataSource $newjdbc $dsAttrs]
      • Using Jython:
        newds = AdminConfig.create('DataSource', newjdbc, dsAttrs)
        print newds
      Example output:
      DS1(cells/mycell/nodes/mynode|resources.xml#DataSource_1)
  • Using the AdminTask object to configure a new data source:
    • Using Jacl:
      $AdminTask createDatasource {-interactive}
    • Using Jython:
      AdminTask.createDatasource (['-interactive'])
  • Save the configuration changes. See the topic Saving configuration changes with the wsadmin tool for more information.
  • In a network deployment environment only, synchronize the node. See the topic Synchronizing nodes with the wsadmin tool for more information.