I need to find whether my Websphere servers are running on version 6 or version 8 currently? - websphere

I have got two versions installed in WebSphere Application Server ( version 6 and version 8 ). I need to find whether my Websphere servers are active on version 6 or version 8 currently from backend ( UNIX ) ?
Please don't suggest ps -ef | grep java, because it does not show the processes of servers in case the servers are not running. I want a solution that works irrespective of whether servers is running or not.

Both releases have bin/bersionInfo.sh (or .bat on Windows).

Is the issue here that you know where the separate v6 and v8 installations are on the file system, but you simply want to know which of them is active? If so, use the serverStatus.sh|bat script - call it against your WAS 6 server, then call it against your WAS 8 server, and you'll know which is active.
Alternately, you could use ps -ef|grep java and check the PID against the pid file in your server's logs directory.

Consult `/properties/version/profile.version. Since you seem to know the location of the profile on disk but not whether it will be running or not, this file will indicate what version of WAS it was created by. Profiles can only be owned by the version of WebSphere they were created by, so this should be the version the profile will run with when started.

Related

two greenplum installation on the same machine

I have an old version of greenplum and I would like to upgrade to version 5.0.0 since it has been released. https://github.com/greenplum-db/gpdb/releases/tag/5.0.0.
I have a huge machine, and I can not simply have an equivalent one. So I would like to know how can I run both version on the same machine. I have seen for example gpseginstall distribute binaries to the /usr/local/gpdb which is already there for the old version.
Regards
I have run multiple versions in parallel on a single node system.
You need to set your config file you use for the gpinitsystem for different segment/mirror directories, master port, starting port, etc..
You will also need two different OS profiles to source, so when you log as gpadmin you can source your 4.3 or 5.0 paths ($GPHOME, $MASTER_DATA_DIRECTORY) for gpstart, gpstop, psql, etc..
Hope this makes sense... I haven't tried it on a multi node system, but the setup should be the same
i.e.
GPDB 4.3
ARRAY_NAME="GPDB"
MACHINE_LIST_FILE=./hostsfile
SEG_PREFIX=seg
PORT_BASE=40000
declare -a DATA_DIRECTORY=(/gpsegment4 /gpsegment4 /gpsegment4 /gpsegment4)
MASTER_HOSTNAME=mdw
MASTER_DIRECTORY=/gpmaster4
MASTER_PORT=5432
TRUSTED_SHELL=ssh
CHECK_POINT_SEGMENTS=8
ENCODING=UNICODE
DATABASE_NAME=gpadmin
#MIRROR_PORT_BASE=50000
REPLICATION_PORT_BASE=41000
#MIRROR_REPLICATION_PORT_BASE=51000
#declare -a MIRROR_DATA_DIRECTORY=(/mirror4 /mirror4 /mirror4 /mirror4)
GPDB 5.0
ARRAY_NAME="GPDB"
MACHINE_LIST_FILE=./hostsfile
SEG_PREFIX=seg
PORT_BASE=60000
declare -a DATA_DIRECTORY=(/gpsegment5 /gpsegment5 /gpsegment5 /gpsegment5)
MASTER_HOSTNAME=mdw
MASTER_DIRECTORY=/gpmaster5
MASTER_PORT=7432
TRUSTED_SHELL=ssh
CHECK_POINT_SEGMENTS=8
ENCODING=UNICODE
DATABASE_NAME=gpadmin
#MIRROR_PORT_BASE=70000
REPLICATION_PORT_BASE=61000
#MIRROR_REPLICATION_PORT_BASE=71000
#declare -a MIRROR_DATA_DIRECTORY=(/mirror5 /mirror5 /mirror5 /mirror5)
I have seen where you can have different versions installed, then change the greenplum-db link to point to the one you want to run. That link is referenced when you enter gpstart. Not sure how you could have two different versions running at the same time on the same machine.
If your goal is to do upgrade dry runs and test on the new release, another alternative could be to deploy a Greenplum cluster using Microsoft Azure. This would deploy the latest version (5.0).
Sounds like you know how to build your own greenplum so you could delete that 5.0 install then install the version you are currently using, then practice the upgrade/migration as well as just kick the tires of 5.0.
You could also easily have side by side systems in Azure; one running your current release and the other running 5.0.
The smallest cluster you can deploy is 1 master and 1 segment which could be adequate depending on your requirements.
Hope this helps

How to get websphere application server installation directory using shell script

I have a WebSphere Application server (WAS) installed in the path /opt/IBM/WebSphere.
Is it possible to get the installation path using OS user wsadmin?
I need to get that installed directory path from shell script.
If you're in a profile directory (or always know where one is,) you could check variables.xml, which exists at /config/cells/(your_cell_name_here)/nodes/(node_name_here)/variables.xml for the value of WAS_INSTALL_ROOT. For example (not necessarily the cleanest):
INSTALLROOT=$(grep "symbolicName=\"WAS_INSTALL_ROOT\"" variables.xml | grep -o "value=\"[^\"]*" | cut -b8-)
There is also an installation registry, which is /opt/.ibm/.nif/.nifregistry for WAS before 8.0 and /opt/.ibm/.was.installlocations.registry for 8.0 and above, however these are created and edited by the installation wizard so they may not be 100% accurate to what's installed on the system. This developerWorks answer explains a little more about those files.

Issues with two author instances of AEM of different versions in local

We're upgrading to 6.1 from 5.6, I have 5.6 setup on port 4502, I changed the port on the jar for 6.1 from 4502 to 4512 and started up both at the same time. But seems like both http://localhost:4512/ and http://localhost:4502/ take me to AEM 6.1.
Are there other configs that need a change to have two versions up and running at the same time?
You can run multiple instances of AEM on your local computer. In fact, as an engineer you should definitely run at least one author instance and one publish instance on your local computer so that you can test your work in both environments before committing any code.
You can rename the jar to cq-author-4502.jar, cq-publish-4503.jar or replace your port number. By naming the file cq-author-4512.jar and running java -jar cq-author-4512.jar, the instance will start up on port 4512.
If you want to start your instance using the start script, you need to update that script in the /crx-quickstart/bin directory. If you're on Linux or Mac update the start file. If you're on Windows update the start.bat file. Follow the instructions and replace 4502 with 4512 and author with publish if necessary. The /crx-quickstart/bin directory will be available after you run the jar file the first time.
First of all there is no useful and logical reason to have two instances that does not comply with author|publish configuration.
But you can start a... e.g. test|author configuration:
Open ../crx-quickstart/bin/start.sh or .bat
Change CQ_PORT=4504
Change CQ_RUNMODE='test'
if [ -z "$CQ_PORT" ]; then
CQ_PORT=4504
fi
if [ -z "$CQ_RUNMODE" ]; then
CQ_RUNMODE='test'
fi
Open ../crx-quickstart/conf/sling.properties
Change author by test
sling.run.mode.install.options=test,publish|...
And start the instances in any order that you like.
It might only be a caching issue in your browser.
When 6.1 has been started on 4502 and then you have an other AEM/CQ version on that port (stop 6.1, start 5.6.1 or something like that), your browser will sometimes show the cached 6.1 login screen or at least some of the 6.1 images that are cached. Press SHIFT-Reload and all should be well.

How to have managed servers on different java JDK versions

I have multiple domains installed on a Windows Server 2008 R2 instance running WebLogic 12.1.2.
When I created the domains I set the runtime JDK to 1.7.
In each domain, I have an admin server (with no deployed applications) and 6-20 managed servers.
For the 2-10 managed servers that have a specific application deployed,
I want to change the JDK to 1.6.
How do I do this?
Note: we are trying to isolate a performance issue and want to know if the recent upgrade from 1.6 to 1.7 is causing issues. Once we know if it is, then we can try to find the code that 1.7 doesn't like. So we rebuilt (with 1.6) the one service application that has the issue and are re-running the (long running) tests to compare run times.
I tested this with Weblogic 12c today.
Update /u01/oracle/middleware/user_projects/domains/{DOMAIN_NAME}/bin/setDomainEnv.sh (Find setDomainEnv.sh under your {domain directory}/bin).
Change BEA_JAVA_HOME="" to BEA_JAVA_HOME="/u01/oracle/java/jdk1.8.0_51" (jdk1.8.0_51 is the new jdk home directory, your version may be different).
Update your managed server's "Server Start" configuration on the Weblogic admin console specifying the new Java Home:/u01/oracle/java/jdk1.8.0_51 and Java Vendor: Oracle.
Restart managed server.
ps -ef | grep {managed server name} from your *nix console to confirm the java version running your managed server.
Following these steps I could run other managed servers with the original jdk, while switching selected managed servers to run with jdk1.8.0_51.
Good luck!
I AM NOT SURE IF WLS 12.1.2 supports JDK1.6.
Go to your setDomainEnv.cmd file under DOMAIN_HOME/bin
BEA_JAVA_HOME="/path/to/jdk1.6"
export BEA_JAVA_HOME
SUN_JAVA_HOME="/path/to/jdk1.8"
export SUN_JAVA_HOME
if [ "${JAVA_VENDOR}" = "Oracle" ] ; then
JAVA_HOME="${BEA_JAVA_HOME}"
export JAVA_HOME
else
if [ "${JAVA_VENDOR}" = "Sun" ] ; then
JAVA_HOME="${SUN_JAVA_HOME}"
export JAVA_HOME
else
JAVA_VENDOR="Sun"
export JAVA_VENDOR
JAVA_HOME="${SUN_JAVA_HOME}"
export JAVA_HOME
fi
fi
Then go to your Admin Console, go to Managed_server > Configuration > Server Start
Set JAVA_HOME and JAVA_VENDOR as you defined in setDomainEnv.cmd
You may set as many JAVA_HOME as you want by defining JAVA_HOME and JAVA_VENDOR in setDomainEnv.cmd. I myself have 4 different JDKs configured to be used by the same domain.
You may check the current JDK version that the managed server is running on by using admin console:
Go to managed_server > Monitoring > General

Websphere MQ Client installation

I am working on a project where MQ client (Support PAC 7) is installed on one 64-bit Linux machine and it sends messages to server.
On client machine we are using 64-bit linux JDK 1.6.25
java -version
java version "1.6.0_25"
I have following environment variable set up
MQSERVER='my_channel/tcp/SRVD10995(1414)'
MQ_INSTALL_ROOT=/var/mqm/
MQ_JAVA_DATA_PATH=/var/mqm/
MQ_JAVA_INSTALL_PATH=/opt/mqm/java/
MQ_JAVA_LIB_PATH=/opt/mqm/java/lib64
LD_LIBRARY_PATH=/opt/mqm/java/lib64
CLASSPATH= /opt/mqm/java/lib/com.ibm.mq.jar:/opt/mqm/java/lib/com.ibm.mqjms.jar:/opt/mqm/samp/jms/samples:/opt/mqm/samp/wmqjava/samples
but when I run following command
dspmqver -p 6
For native libraries I am seeing following message:
Name: IBM WebSphere MQ
Version: 7.0.1.6
CMVC Level: k701-106-110721 mqjbnd=CC=2;RC=2495;AMQ8568: The native JNI library 'mqjbnd' was not found. [3=mqjbnd]::no mqjbnd in java.library.path
Build Type: Production
I am also getting same error message when I execute JMS code to connect to server. I do not have libmqjbnd.so is not in the /opt/mqm/java/lib64 folder, and not even in 32 bit folder.
I have couple of questions :
1) How do I fix this problem for client installation?
2) Does the library file (.so) need to be there in that directory ?
I will be thankful if anyone provides me answer to above questions, I have already invested many hours in this but no joy.
There's a Technote on this specific question here. Let us know if the solution presented there does not resolve your problem.
Update: I noticed a mismatch between your CLASSPATH which is pointing to the 32-bit libs and the other variables pointing to the 64-bit libs. WMQ provides scripts that set the variables for you as described in the Infocenter:
On a UNIX system, you can use the script setjmsenv (if you are using a 32-bit
JVM) or setjmsenv64 (if you are using a 64-bit JVM) to set the environment
variables. On AIX, these scripts are in the /usr/mqm/java/bin directory and,
on HP-UX, Linux, and Solaris, they are in the /opt/mqm/java/bin directory.
Many people source the scripts in their .profile. Have you tried running these? Remember that simply running the script...
/opt/mqm/java/bin/setjmsenv64
...does not result in the env vars being set in the current shell. The script must be sourced using the dot syntax as follows:
. /opt/mqm/java/bin/setjmsenv64
What results do you get after sourcing the appropriate setjmsenv or setjmsenv64 script?
Whether you need the libraries depends how you want to send messages to the server. WebSphere MQ allows you to choose between bindings mode and client mode. Bindings mode uses the libraries with some IPC while client mode is purely Java and TCP based.
If your programming language is Java then i would choose client mode.
This message occurs also when you forget to set properties for host, port, ...
This is in case of standalone MQ client.
MQEnvironment.hostname = "mqm.onZos.myCompany.com";
MQEnvironment.port = 1234;
MQEnvironment.channel = "SYSTEM.MYCH.NAME";

Resources