2 Ekim 2014 Perşembe

java.lang.ClassCastException and org.omg.stub.javax.ejb._EJBHome_Stub in Websphere Application Server

Root Cause of the error :

The One EJB application throws below exception .

Caused by: java.lang.ClassCastException: org.omg.stub.javax.ejb._EJBHome_Stub incompatible with some.internal.class.of.an.app

        at pagecode.sso.faces.SSOsystems.lookUpSSOIsletimRemote(SSOsystems.java:52)
        at pagecode.sso.faces.SSOsystems.getSSOSistemList(SSOsystems.java:67)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:619)
        at javax.el.BeanELResolver.getValue(BeanELResolver.java:91)


A solution for us : 

Check whether the class callled some.internal.class.of.an.app is used by another apps in the environment or not .
If it is used and If it exists more than one directory . Check they are all same .

If one jar contains this class ,and if this jar exists more than one directory  ,  ensure that  the jar is same for all of them. InCompatibility may refer to version difference of jar , or same class is not actually same in different directory.  It may be updated in one place but it may not in another.

If this jar is used by many applications from different directories such as WEB-INF/lib. Then remove them from WEB-INF/lib and define shared library  for this jar in websphere environment and therefore put only one of them in order to  keep compatible.

For example ,

The following three applications uses same jar , For this ,  create shared library  or keep them same Otherwise , you may encounter the incompatibility error.

/opt/IBM/WebSphere/AppServer/profiles/Custom01/installedApps/myCell01/myapp1.ear/myWeb1.war/WEB-INF/lib/xyz.jar

/opt/IBM/WebSphere/AppServer/profiles/Custom01/installedApps/myCell01/myapp2.ear/myWeb2.war/WEB-INF/lib/xyz.jar

/opt/IBM/WebSphere/AppServer/profiles/Custom01/installedApps/myCell01/myapp3.ear/myWeb3.war/WEB-INF/lib/xyz.jar







24 Temmuz 2014 Perşembe

Changing the console session expiration WebSphere Application Server 8.5.5



/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/test1was855Cell01/applications/isclite.ear/deployments/isclite

In above directory , modify deployment.xml by setting  invalidationTimeout parameter to the value you want and  restart the Deployment Manager

Or  use scripts  below :

http://lnubla.wordpress.com/2014/03/12/changing-the-console-session-expiration/

http://www-01.ibm.com/support/knowledgecenter/SSAW57_7.0.0/com.ibm.websphere.nd.multiplatform.doc/info/ae/isc/cons_sessionto.html?lang=en

21 Temmuz 2014 Pazartesi

Sharing files and folders with NFS between Linux machines RHEL 6


10.150.3.70 ve 10.150.3.71 WAS test sunucuları



Her iki sunucuda da :

Yazılım kullanıcılarını tanımlamak için wasusers grubu oluşturuldu. groupadd wasusers
WAS yöneticisi için wasadmin kullanıcısı ve grubu zaten oluşturulmuştu.
/home dizininin altına wasadmin kullanıcısına ve grubuna bütün yetkiler verildi.
setfacl -R -m u:wasadmin:rwx /home
setfacl -R -m g:wasadmin:rwx /home
mkdir /home/nfsshare
chown -R wasadmin:wasadmin nfsshare/
setfacl -R -m g:wasusers:rwx nfsshare





http://www.tecmint.com/how-to-setup-nfs-server-in-linux/

NFS Server : 10.150.3.70
NFS Client : 10.150.3.71

Setting Up the NFS Server:

nfs paylaşımı için NFS server olarak kullanılacak makine de (10.150.3.70):
service nfs start
chkconfig nfs on

For sharing a directory with NFS, we need to make an entry in “/etc/exports” configuration file.
Here I’ll be creating a new directory named “nfsshare” in “/home” partition to share with client server, you can also share an already existing directory with NFS.

vi /etc/exports
/home/nfsshare   10.150.3.71(rw,sync,no_root_squash)

there is a directory in /home partition named “nfsshare” is being shared with client IP “10.150.3.71” with read and write (rw) privilege

service nfs stop
service nfs start



Setting Up the NFS Client :

After configuring the NFS server, we need to mount that shared directory or partition in the client server.
Now at the NFS client end, we need to mount that directory in our server to access it locally.
To do so, first we need to find out that shares available on the remote server or NFS Server.

[root@test2was855 /]# showmount -e 10.150.3.70
Export list for 10.150.3.70:
/home/nfsshare 10.150.3.71
[root@test2was855 /]#


To mount nfsshare ;

[root@test2was855 home]# mount -t nfs 10.150.3.70:/home/nfsshare /home/nfsshare
[root@test2was855 home]#

Verify nfsshare directory is mounted ;

[root@test2was855 nfsshare]# mount | grep nfs
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
10.150.3.70:/home/nfsshare on /home/nfsshare type nfs (rw,vers=4,addr=10.150.3.70,clientaddr=10.150.3.71)


The above mount command mounted the nfs shared directory on to nfs client temporarily,
to mount an NFS directory permanently on your system across the reboots, we need to make an entry in “/etc/fstab“.

vi /etc/fstab

Add the following new line as shown below.

10.150.3.70:/home/nfsshare /home/nfsshare  nfs defaults 0 0

If you want to unmount that shared directory from your server after you are done with the file sharing,
you can simply unmount that particular directory with “umount” command. See this example below.

[root@test2was855 nfsshare]# df -h -F nfs
Filesystem                  Size  Used Avail Use% Mounted on
10.150.3.70:/home/nfsshare   24G   14G  8.4G  63% /home/nfsshare
[root@test2was855 nfsshare]#

root@nfsclient ~]# umount /home/nfsshare

After umount check again :
[root@test2was855 nfsshare]# df -h -F nfs

9 Temmuz 2014 Çarşamba

Cloning Websphere Application Server ND Environment v8.5.5

http://www.experts-exchange.com/Software/Server_Software/Application_Servers/Java/Q_26252134.html

I have another simple way to clone the websphere env if you want to use same cellname and nodename.

1) installed same websphere version includin fixpack on new machine 

Note you have to  make sure to use same install path for example

if you have old machine install path c:/webspherev6.1/appserver

Then you need give same install path on new machine c:/webspherev6.1/appserver

2) create dmgr and nodeprofile on new machine

3) you need to stop the dmgr, nodeagent and all application server on old machine

4) You can tar/zip up the complete dmgr profile dir and node profile from old machine and untar/unzip on new machine under c:/webspherev6.1/appserver/profiles  and change the hostname entries in the websphere configuration and 

Use follow link for changing hostname ( chaper 2)  WebSphere Application Server V6.0 best practices for configuration changes

http://www-01.ibm.com/support/docview.wss?rs=&uid=swg27007419

5) one new dmgr is up and manually sync the node with dmgr using syncnode command.

from node bin syncnode newdmgrhostname dmgrsoapport -username user -password password


6)  once sync went fine start the nodeagent and make sure sync status shows correctly on dmgr console and then start all application server from dmgrconsole

8 Temmuz 2014 Salı

Start components as needed Websphere Application Server ND 8.5.5

Select this property if you want the server components started as they are needed by an application that is running on this server.When this property is selected, server components are dynamically started as they are needed. When this property is not selected, all of the server components are started during the server startup process. Therefore, selecting this option can improve startup time, and reduce the memory footprint of the server, because fewer components are started during the startup process.Starting components as they are needed is most effective if all of the applications, that are deployed on the server, are of the same type. For example, using this option works better if all of your applications are Web applications that use servlets, and JavaServer Pages (JSP). This option works less effectively if your applications use servlets, JSPs and Enterprise JavaBeans (EJB).


You can improve system performance if you configure some of your application servers, such that each of their components are dynamically started as they are needed, instead of letting all of these components automatically start when the server starts. Selecting this option can improve server startup time, and reduce the memory footprint. Starting components as they are needed is most effective if all of the applications that are deployed on the application server are of the same type. For example, using this option works better if all of your applications are web applications that use servlets, and JavaServer Pages (JSP). This option works less effectively if your applications use servlets, JSPs and Enterprise JavaBeans (EJB)

EJB , Servlets , JSF and JSP

A typical enterprise Java application may contain several Java classes of different types, such as EJBs, servlets, JavaServer Faces (JSF) classes, as well as static files such as JSPs and HTML files. EJBs run in the EJB container whereas web applications such as servlets and JSF managed beans run in the web container.

Parallel Start in Websphere Application Server ND 7/8/8.5

Select this field to start the server on multiple threads. This might shorten the startup time.
Specifies that you want the server components, services, and applications to start in parallel rather than sequentially.The default setting for this option is true, which indicates that when the server starts, the server components, services, and applications start on multiple threads. Setting this option to false specifies that when the server starts, the server components, services, and applications start on a single thread, which might lengthen start-up time.



The order in which the applications start depends on the weights that you assign to them. Applications that have the same weight start in parallel.To set the weight of an application, in the administrative console, click Applications > Application Types > WebSphere enterprise applications > application_name > Startup behavior, and then specify an appropriate value in the Startup order field. The more important an application is, the lower the startup order value should be. For example, you might specify a startup order value of 1 for your most important application, and a value of 2 for the next most important application. You might then specify a startup order of 3 for the next four applications because you want all four of those applications to start in parallel.
Start components as needed ;

Select this property if you want the server components started as they are needed by an application that is running on this server.
When this property is selected, server components are dynamically started as they are needed. When this property is not selected, all of the server components are started during the server startup process. Therefore, selecting this option can improve startup time, and reduce the memory footprint of the server, because fewer components are started during the startup process.
Starting components as they are needed is most effective if all of the applications, that are deployed on the server, are of the same type. For example, using this option works better if all of your applications are Web applications that use servlets, and JavaServer Pages (JSP). This option works less effectively if your applications use servlets, JSPs and Enterprise JavaBeans (EJB).

30 Haziran 2014 Pazartesi

How to start or stop an Enterprise application that is deployed into a cluster using wsadmin scripting tool



http://www-01.ibm.com/support/docview.wss?uid=swg21293401


Problem(Abstract)
It is not possible to start or stop the application from cluster scope directly when using the wsadmin scriping tool.
To start or stop the application running in a cluster, the user must run wsadmin scriping start or stop commands for all the cluster members separately.
Resolving the problem
Here is an example to start or stop an Enterprise application in a cluster setup using the wsadmin scripting tool:
Connect to Deployment Manager:
/profile_install_root/bin>wsadmin.sh/bat

Identify the application manager MBean for the server where the application resides, and assign it to the appManager variable.

wsadmin> set appManager [$AdminControl queryNames
cell=mycell,node=mynode,type=ApplicationManager,process=member1,*]

This command returns the application manager MBean (output):
Example:
WebSphere:name=ApplicationManager,process=member2,platform=dynamicproxy,node=vik
ram2Node08,version=6.1.0.13,type=ApplicationManager,mbeanIdentifier=ApplicationManager,cell=vikram2Cell02,spec=1.0

To start the application:
wsadmin> $AdminControl invoke $appManager startApplication AppName

To stop the application:
wsadmin> $AdminControl invoke $appManager stopApplication AppName

Repeat the above two steps for all cluster members in a cluster by specifying right nodename and member names.









Example: /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/wsadmin.sh -lang jacl
Example :   set appManager [$AdminControl queryNames cell=wastest852Cell01,node=wastest852Node01,type=ApplicationManager,process=malisrv01,*]
Example:

[wasadmin@wastest852 bin]$ ./wsadmin.sh -lang jacl
WASX7209I: Connected to process "dmgr" on node wastest852CellManager01 using SOAP connector;  The type of process is: DeploymentManager
WASX7029I: For help, enter: "$Help help"
wsadmin>set appManager [$AdminControl queryNames cell=wastest852Cell01,node=wastest852Node01,type=ApplicationManager,process=malisrv01,*]
WebSphere:name=ApplicationManager,process=malisrv01,platform=proxy,node=wastest852Node01,version=8.5.5.1,type=ApplicationManager,mbeanIdentifier=ApplicationManager,cell=wastest852Cell01,spec=1.0
wsadmin>$AdminControl invoke $appManager startApplication NYS
wsadmin>



10 Haziran 2014 Salı

webservices.unify.faults in WAS v8.5



Websphere Application Server Network Deployment v8'den itibaren bu özellik default olarak true geliyor.
Bu nedenle true olarak set edildiğinde 

 javax.xml.ws.soap.SOAPFaultException: Internal Error

hata böyleyken . 
False olarak set edildiğnde hatayla ilgili daha fazla ayrıntıya giriyor ;

javax.xml.ws.soap.SOAPFaultException: An internal error occurred during JAX-WS marshalling. An object of type .....


webservices.unify.faults ;
Use the webservices.unify.faults property to disable SOAP Fault unification for JAX-WS and JAX-RPC. By default, the web service runtime environments (both JAX-WS and JAX-RPC) unify all faults generated by the runtime environment to a single type of fault containing a faultcodeof Server and a faultstring of Internal Error. The faults do not contain any additional information identifying the actual cause of the fault. The unification of faults results in a more secure system, preventing detailed information regarding why inbound message processing failed from being returned to message senders.
The default value for this property is true, which causes faults to be unified. If your applications require fault details, then you can set this property to false to disable fault unification, allowing detailed information to be returned in faults. Note that regardless of the property setting, checked exceptions defined in the WSDL and thrown by a service provider method implementation are not unified. Additionally, detailed information regarding the cause of the fault are logged if trace is enabled, regardless of the setting of this property.
This property and the associated behavior is new in Version 8 of the product.


http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/xrun_jvm.html?lang=en

23 Mart 2014 Pazar

Disable user login to SSH on RHEL v6.3

1. Disable user login to SSH

Edit the configuration file ; /etc/ssh/sshd_config

To deny users called username1 username2 from logging in via SSH we add the following line to sshd_config file:

DenyUsers username1 username2

Restart the ssh daemon ;  service sshd restart

To allow only users from  logging in via SSH , we add the following line to sshd_config file:
This disables  ssh logins for all other users

AllowUsers username1 username2

Restart the ssh daemon:  service sshd restart


2. Disable SSH Root Login

vi /etc/ssh/sshd_config
find line #PermitRootLogin no
remove the # from the beginning of the parameter

Restart the ssh daemon:  service sshd restart


3. Disable user login to SSH

vi /etc/passwd
in order for a user to disable ssh login :
Add the line for that user in passwd file; sshd:/sbin/nologin

22 Mart 2014 Cumartesi

Moving WAS dmgr profile from one server to another

1. Backup your old WAS configurations , profiles and install_directory before any changes

2. Transfer the backup files from old server to new server ,  into the directory /opt/


3. In new server , for profiles , work in  /opt/IBM/WebSphere/AppServer/bin

For Dmgr01 profile ;

Run;

./manageprofiles.sh -restoreProfile -backupFile /opt/2.15Dmgr01profiles.zip


INSTCONFSUCCESS: Success: The profile was successfully restored.

Now the restoration of Dmgr01 profile completed successfully.


4. Don't start the WAS processes, only start the wsadmin with jython scripting

Go to directory /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin in new server and run;

./wsadmin.sh -conntype NONE -lang jython


WASX7357I: By request, this scripting client is not connected to any server process. Certain configuration and application operations will be available in local mode.
WASX7031I: For help, enter: "print Help.help()"
wsadmin>

Now , wsadmin is started


5. Run the script ; AdminTask.changeHostName ('[-interactive]')

<<<<<<
*Node Name (nodeName): Node Name of the Profile
*Host Name (hostName): New host name
System Name (systemName): (optional)
Regenerate Certificates (regenDefaultCert):(optional)
>>>>>


wsadmin>AdminTask.changeHostName ('[-interactive]')
Change Host Name

Change the host name of a node

*Node Name (nodeName): CellManager01                              
*Host Name (hostName): was2
System Name (systemName): was1
Regenerate Certificates (regenDefaultCert):

Change Host Name

F (Finish)
C (Cancel)

Select [F, C]: [F] F
WASX7278I: Generated command line: AdminTask.changeHostName('[-nodeName CellManager01 -hostName was2 -systemName was1 ]')
''
wsadmin>


6. Save the changes with AdminConfig.save()


wsadmin>AdminConfig.save()                              
''
wsadmin>

7. Start the Deployment manager and then open the admin console to see the changes you made.

18 Mart 2014 Salı

Create local and http yum repositories (rhel6.3)


Purpose: Creating http based yum repo so that other servers on the local network can communicate with that and extract RPMs from it


1. Copy the content of the rhel 6.3 dvd into hard drive of the server . (I copy all its content on to directory /opt/yumrepository/rhel63 )
   
    # find /opt/yumrepository/rhel63 -name *.rpm | wc -l

2. change the working directory to  /opt/yumrepository/rhel63/Packages   and install the following rpms

rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh createrepo-0.9.8-5.el6.noarch.rpm

3. To create the metadata we run createrepo . in the repo directory (/opt/yumrepository )

[root@yum1 yumrepository]# createrepo .
1341/3653 - rh63/Packages/libconfig-1.3.2-1.1.el6.i686.rpm                    
iso-8859-1 encoding on Ville Skyttä <ville.skytta@iki.fi> - 2.8.2-2

3653/3653 - rh63/Packages/gnome-media-libs-2.29.91-6.el6.i686.rpm            
Saving Primary metadata
Saving file lists metadata
Saving other metadata
[root@yum1 yumrepository]# ls
repodata  rh63
[root@yum1 yumrepository]#

4. Configure yum to communicate with the metadata

[root@yum1 repodata]# cd /etc/yum.repos.d/

   Create the repo ; rh63.repo

[root@yum1 yum.repos.d]# vi rh63.repo

and add the following content then save it

[rh63]
gpgcheck=1
name=rh63.repo
baseurl=file:///opt/yumrepository

5. The repository is GPG Signed (gpgcheck=1) , therefore install GPG key came with RHEL DVD

[root@yum1 rh63]# rpm --import /opt/yumrepository/rh63/RPM-GPG-KEY-redhat-release /opt/yumrepository/rh63/RPM-GPG-KEY-redhat-beta


6. Check it is working or not

[root@yum1 yum.repos.d]# yum list gcc.x86_64
Loaded plugins: product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Available Packages
gcc.x86_64                                                                                  4.4.6-4.el6                                                                                  rh63
[root@yum1 yum.repos.d]#

6. To create HTTP based YUM repository ; the repository server will serve via apache httpd , so install it

[root@yum1 rh63]# yum install httpd
[root@yum1 rh63]# chkconfig httpd on
[root@yum1 rh63]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for yum1
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                           [  OK  ]
[root@yum1 rh63]#

7. Configure Apache to serve data

[root@yum1 rh63]# cd /etc/httpd/conf.d/
[root@yum1 conf.d]# vi yumrepository.conf

Add the Alias

Alias /yumrepository/ "/opt/yumrepository/"


8.

[root@yum1 ~]# service httpd reload
Reloading httpd:
[root@yum1 ~]#

9.

[root@yum1 ~]# yum install lynx.x86_64

10. Check with lynx

[root@yum1 ~]# lynx http://localhost/yumrepository/repodata/repomd.xml


11. Disable file based repo using parameter enabled=0 in order to activate web based repo

[root@yum1 ~]# vi /etc/yum.repos.d/rh63.repo
[root@yum1 ~]# cat /etc/yum.repos.d/rh63.repo
[rh63]
enabled=0
gpgcheck=1
name=rh63.repo
baseurl=file:///opt/yumrepository
[root@yum1 ~]#

12. Create new HTTP repo

[root@yum1 ~]# vi /etc/yum.repos.d/rh63web.repo
add

[rh63web]
gpgcheck=1
name=rh63web.repo
baseurl=http://localhost/yumrepository/

[root@yum1 ~]# cat /etc/yum.repos.d/rh63web.repo
[rh63web]
gpgcheck=1
name=rh63web.repo
baseurl=http://localhost/yumrepository/

13.

[root@yum1 ~]# yum clean all
Loaded plugins: product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Cleaning repos: rh63web
Cleaning up Everything
[root@yum1 ~]#

14.

[root@yum1 ~]# yum repolist all
Loaded plugins: product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
rh63web                                                                                                                                                               | 1.3 kB     00:00  
rh63web/primary                                                                                                                                                       | 1.7 MB     00:00  
rh63web                                                                                                                                                                            3653/3653
repo id                                                             repo name                                                                                                  status
rh63                                                                rh63.repo                                                                                                  disabled
rh63web                                                             rh63web.repo                                                                                               enabled: 3,653
rhel-source                                                         Red Hat Enterprise Linux 6Server - x86_64 - Source                                                         disabled
rhel-source-beta                                                    Red Hat Enterprise Linux 6Server Beta - x86_64 - Source                                                    disabled
repolist: 3,653
[root@yum1 ~]#

15. Go to another machine on the local network and check

[root@was2 yum.repos.d]# cd /etc/yum.repos.d/

Create the repo ;

[root@was2 yum.repos.d]# vi rh63web.repo

change localhost with 192.168.2.17 which is the ip of the http based yum repository server

Add this content ;

[rh63web]
gpgcheck=1
name=rh63web.repo
baseurl=http://192.168.2.17/yumrepository/
enabled=1

16.

[root@was2 yum.repos.d]# yum list gcc*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
rh63web                                                                                                                                                               | 1.3 kB     00:00  
rh63web/primary                                                                                                                                                       | 1.7 MB     00:00  
rh63web                                                                                                                                                                            3653/3653
Available Packages
gcc.x86_64                                                                                     4.4.6-4.el6                                                                            rh63web
gcc-c++.x86_64                                                                                 4.4.6-4.el6                                                                            rh63web
gcc-gfortran.x86_64                                                                            4.4.6-4.el6                                                                            rh63web
gcc-gnat.x86_64                                                                                4.4.6-4.el6                                                                            rh63web
gcc-java.x86_64                                                                                4.4.6-4.el6                                                                            rh63web
gcc-objc.x86_64                                                                                4.4.6-4.el6                                                                            rh63web
gcc-objc++.x86_64                                                                              4.4.6-4.el6                                                                            rh63web
[root@was2 yum.repos.d]#















17 Mart 2014 Pazartesi

Configure and Enable Java SDK 7 on WAS 8.5

You can switch the java level by using the managesdk command. The executable for the managesdk command is located in the bin directory of your application server.
For example: /opt/IBM/WebSphere/AppServer/bin

Use this command to view the available Java products:
./managesdk.sh -listAvailable

Use this command to view the available Java products with detail information:
./managesdk.sh -listAvailable -verbose

Use this command to set the command default to the version 7.0 SDK:
./managesdk.sh -setCommandDefault -sdkname 1.7_64

Use this command to set the new profile default to version 7.0 SDK:
./managesdk.sh -setNewProfileDefault -sdkname 1.7_64

If profiles already exist, use this command to enable the profiles to use the version 7.0 SDK:
./managesdk.sh -enableProfileAll -sdkname 1.7_64 -enableServers


Note:
To change federated profiles in a Network Deployment installation, the deployment manager must be running. The managesdk command updates the master configuration repository.
After the command runs, a synchronization operation must occur before the new SDK can be used for federated profiles.

9 Mart 2014 Pazar

Local yum repository oluşturmak rhel6.4

1. Tüm rhel6.4 dvd içeriğini /opt/yumrepository dizinine kopyalarız.
2. /opt/yumrepository/Packages dizinine giderek sırayla aşağıdaki paketleri yükleriz

rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh createrepo-0.9.9-17.el6.noarch.rpm

3. /etc/yum.repos.d/ dizinine giderek localyum.repo dosyası oluşturulur , içine aşağıdaki içerik yazılır.

[localyum]
name=yumrepo
baseurl=file:///opt/yumrepository
gpgcheck=0
enabled=1

4. createrepo -v /opt/yumrepository
    yum clean all
    yum update

5. yum list gcc*

3 Şubat 2014 Pazartesi

CWPKI0022E SSL HANDSHAKE FAILURE and CWPKI0428I

[30.01.2014 08:58:25:923 EET] 000000b9 WSX509TrustMa E   CWPKI0022E: SSL HANDSHAKE FAILURE:  A signer with SubjectDN "....." was sent from target host:port "host_name:port_number".
The signer may need to be added to local trust store "/opt/IBM/WebSphere/AppServer/profiles/AppSrv02/config/cells/wastest851Cell01/trust.p12" located in SSL configuration alias "NodeDefaultSSLSettings"
loaded from SSL configuration file "security.xml".
The extended error message from the SSL handshake exception is: "PKIX path building failed: java.security.cert.CertPathBuilderException: PKIXCertPathBuilderImpl could not build a valid CertPath.; internal cause is:
        java.security.cert.CertPathValidatorException: The certificate issued by " ....Elektronik Sertifika Hizmet Sağlayıcısı..." is not trusted; internal cause is:
        java.security.cert.CertPathValidatorException: Certificate chaining error".
 
 
 
  CWPKI0428I: The signer might need to be added to the local trust store.
  You can use the Retrieve from port option in the administrative console to retrieve the certificate and resolve the problem.
  If you determine that the request is trusted, complete the following steps:
  1. Log into the administrative console.
  2. Expand Security and click SSL certificate and key management. Under Configuration settings, click Manage endpoint security configurations.
  3. Select the appropriate outbound configuration to get to the (cell):wastest851Cell01 management scope.
  4. Under Related Items, click Key stores and certificates and click the CellDefaultTrustStore key store.
  5. Under Additional Properties, click Signer certificates and  Retrieve From Port.
  6. In the Host field, enter hostname in the host name field, enter portnumber in the Port field, and hostname_cert or  in the Alias field.
  7. Click Retrieve Signer Information.
  8. Verify that the certificate information is for a certificate that you can trust.
  9. Click Apply and Save

If you can not import and install SSL certificates using script ikeyman.sh , use WAS admin console ,
While inserting a certificate from WAS admin console , connection may refused by proxy server.
"Making proxy out-of-service > insert SSL certificate using retrieve signer information in related scope > Open proxy again. " may work

http://www-01.ibm.com/support/docview.wss?uid=swg21650234
http://www-01.ibm.com/support/docview.wss?uid=swg21592616

20 Ocak 2014 Pazartesi

How to set a classpath in Websphere Application Server v8.5

When JSP files or Servlets import external java packages, the CLASSPATH must be set correctly in order for the WebSphere compiler to access the required classes.

There are several methods to set the CLASSPATH:
  • You can set the CLASSPATH in one of the batch files that WebSphere Application Server uses to initialize the environment variables. It is called setupCmdLine (.bat for Windows, .sh for Unix) and it is located in <WebSphere installation root>/AppServer/bin. Open this file and add the path to your jar files at the end of WAS_CLASSPATH line:
  • You can also copy the required classes and JAR files into one of the directories listed in the table below. By default, these directories are included in the CLASSPATH of the WebSphere Java compiler.

















http://www.globfx.com/support/swfchartgen/kb.php?id=0bd97e55-3f6f-4f1f-91db-c5222dccbcbf



16 Ocak 2014 Perşembe

Remove old kernels on RHEL v6.3

1. Keep at least two kernels for emegency cases to ensure your ass
2. Remove older kernels but consider step 1

you can remove kernels using rpm -e command








3. Install yum-utils package and apply
# package-cleanup --oldkernels --count=2  so that you can keep two  kernels.
























4. vi /etc/yum.conf and modify installonly_limit parameter to limit the number of installed kernels

15 Ocak 2014 Çarşamba

Update Kernel on RHEL v6.3



Download the latest rpms of kernel and kernel-firmware.
Don't use update option for kernel because if you encounter any problem during update process, you will not be able to have a chance to use former kernel. Therefore, to avoid such a problem, use install option. In this case , you can enable or disable one of the kernel installations using the grub.conf file.

1. rpm -ivh kernel-firmware-2.6.32-431.3.1.el6.noarch.rpm
2. rpm -ivh kernel-2.6.32-431.3.1.el6.x86_64.rpm
3. chech /etc/grub.conf
vi /etc/grub.conf
default=0 means first kernel from list is active
default=1 means second kernel from list is active
4. After you make the latest kernel active , you can reboot the system
5. init 6

6 Ocak 2014 Pazartesi

Delete files older than 3 days in Windows Server 2008 using PowerShell

1.Solution

#----- define parameters -----#

#----- get current date ----#
$Now = Get-Date
#----- define amount of days ----#
$Days = "3"
#----- define folder where files are located ----#
$TargetFolder = "C:\backup"
#----- define extension ----#
$Extension = "*.zip"
#----- define LastWriteTime parameter based on $Days ---#
$LastWrite = $Now.AddDays(-$Days)
#----- get files based on lastwrite filter and specified folder ---#
$Files = Get-Childitem $TargetFolder -Include $Extension -Recurse | Where {$_.LastWriteTime -le "$LastWrite"}
foreach ($File in $Files)
    {
    if ($File -ne $NULL)
        {
        write-host "Deleting File $File" -ForegroundColor "DarkRed"
        Remove-Item $File.FullName | out-null
        }
    else
        {
        Write-Host "No more files to delete!" -foregroundcolor "Green"
        }
    }

2. Solution

dir C:\backup -for -rec | ? {$_.LastWriteTime -le (Get-Date).AddDays(-3) -and !$_.PsIsContainer} | del -fo