MQ COMMAND dspmqver DO - ibm-mq

Any help or hint would be greatly appreciated it.
I am running IBM MQ on Solaris.
I tried to find IBM MQ command to find the version of mq but it gives me the following error:
code:
# pwd
/opt/mqm/bin
# dspmqver
AMQ8594: WebSphere MQ commands are no longer available in /usr/bin.
In order to run MQ commands you must manage your path configuration as
described in the WebSphere MQ product documentation. In particular review the
topic on "Choosing a primary installation".
# sudo dspmqver
Sorry, user root is not allowed to execute '/usr/bin/dspmqver' as root on ud1981esb31.

You have several issues with what you were attempting to do.
First, you did not put the path of /opt/mqm/bin/ in the $PATH environment variable, so when you attempted to run dspmqver command, it is picking up something (shell script I think) that the installer put in the /usr/bin/ directory.
Secondly, if you want to run a program from the current directory you need to prefix it with './' (it's a Unix/Linux thing).
i.e.
./dspmqver
Sorry, user root is not allowed to execute '/usr/bin/dspmqver' as root
on ud1981esb31.
Third, you should never ever start a queue manager or run other MQ commands as 'root'. It should be done under the 'mqm' account.

Related

Wsadmin connect to remote Profile, ADMA0043E exception

I am trying to install an application on websphere using wsadmin:
AdminApp.install('D:\work\my.ear',['-cluster', 'Vivaldi', '-MapWebModToVH', [['.*', '.*', 'default_host']]])
and get en error: ADMA0043E: /ibm/WebSphere/AppServer/profiles/AppSrv02/config/temp/upload/my5776587604736184411.ear does not exist for installation
Websphere is running as user1, wsadmin script from user2
it is possible to install the application via wsadmin from another user?
Thanks!
User2 doesn't have write permissions to /ibm/WebSphere/AppServer/profiles/AppSrv02/config/wstemp.
You'll need to allow user2 to write to this directory and subdirectories.
Additionally, the script may fail because user2 doesn't have permissions to the OSGI configuration. If so, you'll need to set a system property for wsadmin:
/ibm/WebSphere/AppServer/profiles/AppSrv02/bin/wsadmin.sh -lang jython -javaoption "-Dosgi.configuration.area=/home/user2/.eclipse" ...
It should be noted that IBM assumes that wsadmin.sh will always be run as the installation user, in this case user1. The official, supported way to do what you want is to install an "adminstrative client" as user2 either on this server on on another server. (and then specify the host and soap port) This will avoid the permissions issues.
Does the AdminApp.install comman work if you run WebSphere and install the app?

How to get MQ CLI commands to run against a single MQ installation?

I have a 2 installations of MQ on my machine. Installation1 and Installation2. I have not set the default installation using setmqinst but when i run the dspmq command i get a list of queue managers from both the installations.I have qualified the dspmq command with the full path. i.e. /opt/mqm/bin/dspmq, even with this the list contains all the queue managers from both the installations.
How do I run these commands only against only one of the installations? Is it by setting and changing the default installation using setmqinst?
The dspmq command is documented in the IBM MQ Knowledge center dspmq page.
If you add -o installation to the dspmq command it with show the installation name along with the queue manager name, but will always show all queue mangers on the server.
You can grep the installation name to limit the output to one of the two installations, for example:
Installation1: dspmq -o installation|grep Installation1
Installation2: dspmq -o installation|grep Installation2
To run commands against a specific installation, it is best to first set up the environment for that installation by using the setmqenv command:
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.ref.adm.doc/q083560_.htm
But even after that, dspmq will show all QMs on that server I think.

install weblogic on console mode without xming

I'm trying to install weblogic server on Centos 7 with following instruction of oracle about console mode. Everything will be fine till weblogic file 's extracting on my computer. I get this message about
display enviroment variable failed
I google it and found xming as solution. But is there any solution to install weblogic without xming.
You need to do a silent install as mentioned. You can find the documentation here.
Basically, you need two files:
A response file
Here, you will set some parameters like ORACLE_HOME, proxy information if needed and installation type, etc.
An oraInst.loc file
In this file, you need to do the following(from documentation):
Replace oui_inventory_directory with the full path to the directory where you want the installer to create the inventory directory. Then, replace oui_install_group with the name of the group whose members have write permissions to this directory.
After doing all of this, you can run the command as follows;
java -jar distribution_name.jar -silent -responseFile file [-options] [()*]
I uploaded my own oraInst.loc and response files here for demonstration. I strongly suggest you to read the documentation though. Good luck.

RabbitMQ fails on Error: unable to connect to node rabbit#TPAJ05421843: nodedown

On a Windows 7 Enterprise machine, I made a fresh install of Erlang 17.4 and RabbitMQ 3.4.3 x64. The installation was successful and uneventful.
I have not yet tried to create my first queue or exchange, but I already see trouble. This problem is similar to another SO post, but that other post appears to involve clustering, which I don't have. Furthermore, that other poster can circumvent his issue by restarting the RabbitMQ service; that approach does not work for me.
My "nodedown" problem is evident at the RabbitMQ command prompt:
C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.4.3\sbin>rabbitmqctl status
Status of node rabbit#TPAJ05421843 ...
Error: unable to connect to node rabbit#TPAJ05421843: nodedown
DIAGNOSTICS
attempted to contact: [rabbit#TPAJ05421843]
rabbit#TPAJ05421843:
* connected to epmd (port 4369) on TPAJ05421843
* epmd reports: node 'rabbit' not running at all
other nodes on TPAJ05421843: ['RabbitMQ']
* suggestion: start the node
current node details:
- node name: 'rabbitmqctl-19884#TPAJ05421843'
- home dir: H:\
- cookie hash: PD4QQCYrf0TME9vIko3Xuw==
Based on the above, I chose to check the status of the node explicitly named 'RabbitMQ'. I get this:
C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.4.3\sbin>rabbitmqctl -n RabbitMQ status
Status of node 'RabbitMQ#TPAJ05421843' ...
Error: unable to connect to node 'RabbitMQ#TPAJ05421843': nodedown
DIAGNOSTICS
attempted to contact: ['RabbitMQ#TPAJ05421843']
RabbitMQ#TPAJ05421843:
* connected to epmd (port 4369) on TPAJ05421843
* epmd reports node 'RabbitMQ' running on port 59301
* TCP connection succeeded but Erlang distribution failed
* suggestion: hostname mismatch?
* suggestion: is the cookie set correctly?
current node details:
- node name: 'rabbitmqctl-23076#TPAJ05421843'
- home dir: H:\
- cookie hash: PD4QQCYrf0TME9vIko3Xuw==
Ok, this is barely better since at least it acknowledges 'RabbitMQ' running on port 59301. But what the heck could it mean that "Erlang distribution failed"?
When I try to research this topic, I found articles saying "be sure you have matched cookies." Based on that I found this article, which claims the "cookie mismatch" does not pertain to me, because I have not created (nor intend to create) a RabbitMQ cluster.
What should I do?
I had this same problem today. There were no cookie or firewall problems and windows reported that the service was running successfully. This is what finally fixed it:
Run RabbitMQ sbin command prompt as administrator.
Run "rabbitmq-service remove"
Run "rabbitmq-service install"
For some reason the service set up by the installer did not configure several registry entries. Running this set them correctly and allowed the service to run.
One thing I noticed was that before I did this, there was no description of the service in the Windows Services view. After installing with the rabbitmq-service command, the description was visible. This might be a quick indicator if you are having the same problem.
As #eddyP commented, I had two different Erlang cookie files:
A server cookie file, located at $env:WINDIR\system32\config\systemprofile\.erlang.cookie (prior to Erlang 20.2 it was located at $env:WINDIR\.erlang.cookie).
A client cookie file, located at $env:USERPROFILE\.erlang.cookie.
Copying the server cookie file over the client one, so that both files were the same, fixed the problem for me.
For further details, see "How Nodes (and CLI tools) Authenticate to Each Other: the Erlang Cookie".
From RabbitMQ Command Prompt sbin (run as administrator) execute this command:
rabbitmq-server restart
In Windown, For some reason delete all folder in c:\Users\xxx\AppData\Roaming\RabbitMQ\db\ (xxx is your username)
then flow #Jerdev answer and
start rabbitmq net start rabbitmq
check rabbitmq service rabbitmqctl status
The same question on the RabbitMQ mailing list: https://groups.google.com/forum/#!topic/rabbitmq-users/0s1ExFhl4hM.
The Erlang cookie is used by rabbitmqctl as well as server nodes, so it may need being taken care of (placed in the correct location).
See "Installing as a non-administrator user leaves .erlang.cookie in the wrong place" on Windows quirks.
I resolve my problem doing this in Windows 10.
Execute RabbitMQ Command Prompt (sbin dir) as administrator.
Execute "rabbitmq-service remove" in (RabbitMQ Command Prompt).
Execute %AppData% in Run Dialog Box of Windows.
Delete all files in RabbitMQ folder.
Execute "rabbitmq-service install" in (RabbitMQ Command Prompt).
Execute "rabbitmqctl start_app" in (RabbitMQ Command Prompt).
If you come here looking for a linux answer for the same error message, try
sudo service rabbitmq-server start
(which is not a blocking command)
Just do the following:
Uninstall rabbitmq and erlang.
delete the rabbitmq folder existing in your appdata (if you dont
know the appdata location, just type echo %AppData% in the command
prompt)
Then install erlang first and then rabbitmq.
After installing, enable the management plugin using below command:
rabbitmq-plugins enable rabbitmq_management
For me the cookies didnt match, like the other comments but the locations was in a different path for those having the same issue as me C:\Windows\System32\config\systemprofile
That is happening because rabbit MQ is not being installed correctly on Windows (and this error is misleading!). So to solve it do the following:
type "cmd" in Cortana search or in "Run" for older version of Windows
right click on in and choose "Run as Administrator"
go to rabbit's sbin folder (cd "C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.4\sbin")
run: rabbitmq-service remove
run: rabbitmq-service install
now you can run
6. rabbitmq-plugins enable rabbitmq_management
7. rabbitmq-service start
8. and, finally, run: start http://localhost:15672
9. log on as user "guest" with password: "guest" and that's it. Happy Rabbiting!
I missed restarting my WINDOWS OS and then deleting the old version of ERLANG (which I uninstalled before restarting).
Somehow the fresh installation of Rabbit was referring to the old (un-installed version) and all the mismatch was happening. Clue was the 'services' referred Rabbit from the old ERLANG version.
This is how I resolved the error in my Windows 8 system:
Check for a syntax error in the rabbitmq.config file placed in the AppData folder for Windows.
How to check if there is any syntax error?
You can run rabbitmq-server restart from sbin folder in:
Program Files/RabbitMQ/rabbitmq_server_x.x/sbin/.
Replace the content of the rabbitmq.config with rabbitmq.config.example.
You may find the rabbitmq.config.example in:
Program Files/RabbitMQ/rabbitmq_server_x.x/etc/
Warning, you will lose the configuration you have saved previously with rabbitmq.
After changing the files, just hit
rabbitmq-server restart
in the sbin folder mentioned above.

Ending and deleting a queue manager by force

Currently I have a queue manager that no matter I do just fails to go away. I am trying to end it and delete it. This is in one of our development servers. Not sure what happened, our server went through host name changes. Currently when I do dspmq, I get:
QMNAME(QM_MIT) STATUS(Status not available)
endmqm says:
AMQ8146: WebSphere MQ queue manager not available.
dltmqm says:
AMQ8041: The queue manager cannot be restarted or deleted because processes,
that were previously connected, are still running.
AMQ7018: The queue manager operation cannot be completed.
I googled and found that listener needs to be killed, which I did. I am running WebSphere MQ v7.1 on Linux.
What else can I do?
Do a ps-ef | grep qmgrname to find any remaining processes that were running as part of the QMgr or that were attached to the QMgr.
Next, do a /opt/mqm/bin/amqiclen -x -F -m qmgrname to get rid of any shared memory segments. The command will fail if you do not provide a fully-qualified path name and try to run it from your $PATH or a relative path.
See WebSphere MQ utility amqiclen usage and description for more details.

Resources