I have a queue 'SYSTEM.MANAGED.DURABLE.ABCD***109' getting messages all the time and no one to consume it.
I tried to get its subscription but got the following result ,
dis sub(*) where (DEST LK 'SYSTEM.MANAGED.DURABLE.ABCD***109')
AMQ8096: IBM MQ subscription inquired.
SUBID(414D5120******************44A0109)
SUB(false)
DEST(SYSTEM.MANAGED.DURABLE.ABCD***44A0108)
then i tried to view the subscription via the subscription id listed,
dis sbstatus(*) where ( SUBID EQ '414D5120***44A0109')
AMQ8099: IBM MQ subscription status inquired.
SUB(false)
SUBID(414D5120***44A0109)
I don't have a subscription named "false" . I'm unable to clear or delete this queue as it is opened. I'm unable to view the open connection as well.
dis conn(*) where (objname eq 'SYSTEM.MANAGED.DURABLE.ABCD***44A0108')
AMQ8461: Connection identifier not found.
I need to cleanup & delete this queue to avoid disk space issue.
You can remove SUB objects with only the SUBID, try to remove it with this command:
DELETE SUB SUBID('414D5120***44A0109')
Note that the command is not specifying the SUB name, just the SUB keyword.
Before you delete it, if you are interested in seeing what the sub name actually is, you may want to try running the following command to dump the subscriptions:
amqldmpa -m <QueueManager> -c T -f /var/mqm/errors/amqldmpa_topic.out
Inside of the file /var/mqm/errors/amqldmpa_topic.out search for the SUBID in question and look for text similar to this:
Subscriber entry
{
SubId ( 414D5120***44A0109)
SubNameString ( SUBNAME_HERE )
TopicString ( TOPIC/STRING/HERE )
<more lines of information go here>
}
What does it show for the SubNameString field? Note that in the 8.0.0.6 version I ran this against it seems to pad each field with a leading and trailing space with the exception of SubId which did not have a trailing space.
Related
I'm running the below command in CMD for SSIS:
ISDeploymentWizard.exe /Silent /ModelType:Project /SourcePath:"C:\TEST\Integration Services.ispac" /DestinationServer:"TEST03,1111" /DestinationPath:"/TEST/DEVOPS"
and it finished successfully but with no indication to the command line. I can only check with SSMS to make sure it was really deployed. any idea why?
Solid observation here #areilma - the /silent option eliminates all status info. I had always assumed that flag controlled whether the gui was displayed or not.
If I run this command
isdeploymentwizard.exe /Silent /ModelType:Project /SourcePath:".\SO_66497856.ispac" /DestinationServer:".\dev2017" /DestinationPath:"/SSISDB/BatchSizeTester/SO_66497856"
My package is deployed to my local machine at the path specified. Removing the /silent option causes the GUI to open up with the prepopulated values.
isdeploymentwizard.exe /ModelType:Project /SourcePath:".\SO_66497856.ispac" /DestinationServer:".\dev2017" /DestinationPath:"/SSISDB/BatchSizeTester/SO_66497856"
When the former command runs, nothing is printed to the command prompt. So that's happy path deployment, maybe if something is "wrong", I'd get an error message on the command line. And this is where things got "interesting".
I altered my destination path to a folder that doesn't exist. I know the tool doesn't create a path if it doesn't exist and when I ran it, I didn't get an error back on the command line. What I did get, was a pop up windowed error of
TITLE: SQL Server Integration Services
The path does not exist. The folder 'cBatchSizeTester' was not found in catalog 'SSISDB'. (Microsoft.SqlServer.IntegrationServices.Wizard.Common)
BUTTONS:
OK
So the /silent option removes the gui to allow us to have an automated deploy but if a bad value is passed, we return to having a gui... I then repeated with a bad server name, which led to a second observation. The second I hit enter, the command line returned ready for the next command. 15 seconds later however,
TITLE: SQL Server Integration Services
Failed to connect to server .\dev2017a. (Microsoft.SqlServer.ConnectionInfo)
ADDITIONAL INFORMATION:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
Well now, that tells me that the actual deployment is an independent spawned process. So it won't return any data back to the command line, in any case.
Since I assume we're looking at this from a CI/CD perspective, what can we do? We could fire off a sqlcmd afterwards looking for an entry in the SSISDB catalog views to see what happened. Something like this
SELECT TOP 1 O.end_time, SV.StatusValue, F.name AS FolderName, P.name AS ProjectName FROM catalog.operations AS O
CROSS APPLY
(
SELECT
CASE O.status
WHEN 1 THEN 'Created'
WHEN 2 THEN 'Running'
WHEN 3 THEN 'Canceled'
WHEN 4 THEN 'Failed'
WHEN 5 THEN 'Pending'
WHEN 6 THEN 'Ended unexpectedly'
WHEN 7 THEN 'Succeeded'
WHEN 8 THEN 'Stopping'
WHEN 9 THEN 'Completed'
END AS StatusValue
)SV
INNER JOIN catalog.object_versions AS OV ON OV.object_id = O.object_id
INNER JOIN catalog.projects AS P ON P.object_version_lsn = OV.object_version_lsn
INNER JOIN catalog.folders AS F ON F.folder_id = P.folder_id
/*
INNER JOIN
catalog.packages AS PKG
ON PKG.project_id = P.project_id
*/
WHERE O.operation_type = 101 /*deploy project*/
AND P.name = 'SO_66497856' /*project name*/
AND F.name = 'BatchSizeTester'
ORDER BY o.created_time DESC
Perhaps a filter against end_time of within the past 10 seconds would be appropriate and if we have a result and the status is Succeeded we got a deploy. No result means it failed. I presume something similar happens when the gui runs and despite all this testing, I'm not interested in firing up a trace to fully round out this answer and see what happens behind the scenes.
If you want to negate the value of the prebuilt tool, the other option would be to use the ManagedObjectModel/PowerShell approach to deploy as you can get info from there. The other deployment option is with the TSQL Commands. The second link in my documentation section outlines what that would look like
Paltry documentation I could find
I could find no documentation as to the command line switches for isdeploymentwizard.exe
Deploy an SSIS project from the command prompt with ISDeploymentWizard.exe
Deploy Integration Services (SSIS) Projects and Packages
From #arielma's deleted answer, they found a more succinct answer saying "not possible"
I was executing two mqsc commands on IBM MQ v8 to find out the number of connections made by App1 on queue manager QMGR and found a discrepancy between the output values on one of the attribute called CONNAME
echo 'dis chs('APP1.SVRCONN.CHL')'| runmqsc QMGR | grep CONNAME
This time I got 14 IP's as CONNAME
echo 'dis qs(APP1.QUEUE) type(handle) All where(CHANNEL eq 'APP1.SVRCONN.CHL')'| runmqsc QMGR | grep CONNAME
When I checked the number of handles on the only App1 queue connected by App1 channel I got only 7 IP's as CONNAME
So there are 7 handles on the App1 queue but there are 14 connections by the App1 channel on queue manager. How can I relate these two values? Is this multi-threaded connections on each queue handles and if so how can I find a relationship between them?
The DIS CHS command will show you how many channel instances are running which is really how many TCP sessions there are established between your client and the queue manager.
MQ v7.0.1 and higher supports shared conversations within each channel. Each time the app makes a connection to the queue manager this can be another conversation in the same channel instance. The client and the server can set a maximum number of shared connections. On the queue manager's SVRCONN the attribute is SHARECNV, on the client it could be in a CCDT or programatically. When the channel starts up the client and server will negotiate to the lowest value between them. On a DIS CHS you can add MAXSHCNV to see what the running channel instances negotiated the maximum to and CURSHCNV to see how many conversations are running in each channel instance.
The DIS QS command with TYPE(HANDLE) will only show you connections where the application has a handle open to that queue at the point in time you ran the command.
An application can connect to the queue manager without having a queue open, or it may open and close the queue, if you don't catch it with the queue open you won't see a handle.
A more accurate command to show what the channel is doing is DIS CONN which will show all connections, each connection represents a conversation, so the number of connections should match the number total of CURSHCNV from all channel instances.
The following command will show you all connections running through a channel with the name specified.
echo "DIS CONN(*) TYPE(ALL) WHERE(CHANNEL EQ APP1.SVRCONN.CHL)"|runmqsc QMGR
The output may look like this:
AMQ8276: Display Connection details.
CONN(ABABABABABABABAB)
EXTCONN(ABABABABABABABABABABABABABABABAB)
TYPE(*)
PID(99998) TID(998)
APPLDESC(WebSphere MQ Channel) APPLTAG(App1)
APPLTYPE(USER) ASTATE(NONE)
CHANNEL(APP1.SVRCONN.CHL) CLIENTID( )
CONNAME(10.10.10.10)
CONNOPTS(MQCNO_HANDLE_SHARE_BLOCK,MQCNO_SHARED_BINDING)
USERID(appuser) UOWLOG( )
UOWSTDA( ) UOWSTTI( )
UOWLOGDA( ) UOWLOGTI( )
URTYPE(QMGR)
EXTURID(XA_FORMATID[] XA_GTRID[] XA_BQUAL[])
QMURID(0.0) UOWSTATE(NONE)
AMQ8276: Display Connection details.
CONN(BABABABABABABABA)
EXTCONN(BABABABABABABABABABABABABABABABA)
TYPE(*)
PID(99999) TID(999)
APPLDESC(WebSphere MQ Channel) APPLTAG(App1)
APPLTYPE(USER) ASTATE(STARTED)
CHANNEL(APP1.SVRCONN.CHL) CLIENTID( )
CONNAME(10.10.10.10)
CONNOPTS(MQCNO_HANDLE_SHARE_BLOCK,MQCNO_SHARED_BINDING)
USERID(appuser) UOWLOG( )
UOWSTDA(2018-05-21) UOWSTTI(10.11.27)
UOWLOGDA( ) UOWLOGTI( )
URTYPE(QMGR)
EXTURID(XA_FORMATID[] XA_GTRID[] XA_BQUAL[])
QMURID(0.99999) UOWSTATE(ACTIVE)
OBJNAME(APP1.QUEUE) OBJTYPE(QUEUE)
ASTATE(ACTIVE) HSTATE(INACTIVE)
OPENOPTS(MQOO_INPUT_SHARED,MQOO_BROWSE,MQOO_INQUIRE,MQOO_SAVE_ALL_CONTEXT,MQOO_FAIL_IF_QUIESCING)
READA(NO)
In the above output CONN(ABABABABABABABAB) only has a connection to the queue manager and no objects open while CONN(BABABABABABABABA) had a connection to the queue manager and has the queue APP1.QUEUE open.
If you were to add to the above command |grep 'APP1.QUEUE' the count should match the number of handles from the DIS QS command.
You may have a app that browses the queue on one connection to look for messages and then dispatches to other threads to actually process the messages. In your case 7 channel instances may have the queue open for BROWSE and the other 7 would be waiting to open the queue for INPUT to read a message off.
Below is a command I use on Linux that will spit out a CSV format of the DIS CONN command along with each object that is open.
echo "DIS CONN(*) TYPE(ALL) WHERE(CHANNEL EQ CHL_NAME)"|runmqsc QMGR|grep -o '^\w\+:\|\w\+[(][^)]\+[)]' | awk -F '[()]' -v OFS='","' 'function printValues() { if ("CONN" in p) { print p["CONN"], p["CHANNEL"], p["APPLTAG"], p["USERID"], p["CONNAME"], p["OBJNAME"], p["OBJTYPE"], p["OPENOPTS"] } } /^\w+:/ { if (x !~ /YES/) {printValues()}; x = "NO"; delete p; next } { p[$1] = $2 } { if ("OPENOPTS" in p) { printValues() ; delete p["OPENOPTS"]; x = "YES"} } END { if (x !~ /YES/) {printValues()} }'|sed -e 's/^/"/g' -e 's/$/"/g'
The fields in the CSV output are:
"CONN","CHANNEL","APPLTAG","USERID","CONNAME","OBJNAME","OBJTYPE","OPENOPTS"
Objects can be the QMGR itself, a QUEUE, TOPIC, etc. The CONN id will be repeated in lines of the output if the same CONN has multiple objects open. If the CONN has no objects open you will see a single entry with no objects listed at the end of the line, if at least one object is open there will not be a line representing no objects:
I want to filter some logs from clients and push them to kafka, however, it didn't work, log config file:
module(load="omkafka")
module(load="imtcp" streamdriver.mode="1" streamdriver.authmode="anon")
input(type="imtcp" port="10514")
if $msg contains 'topic-*' then action(type="omkafka" topic="topic" broker=["10.3.1.9:9092", "10.3.1.8:9092", "10.3.1.7:9092", "10.3.1.6:9092"])
when I remove the if...then... clause, it works.
I want to load files in the file system to a WebSphere MQ Queue. There are couple of support pacs - Q Program and MO03: WebSphere MQ Queue Load / Unload Utility
that come close but they mandate the files to be in a specific format. I have the messages which are XML files and want a quick way to load them to a queue. The number of files run into a few hundred so looking for an utility to do this job instead of having to write an application to achieve this.
I could not locate some general purpose application to achieve this. So looking for some help here
Thanks
Why do you believe that the Q program requires a specific file format? According to the README.TXT file, the following options are available:
-f<filename>
Input file.
Each line of the file will be put to output queue as a different
message.
See "Z/OS FILE NAME FORMAT EXAMPLES" for specific z/OS details.
-F[+]<filename>
Input/output file.
Entire file will be put to the output queue as a single message.
If '+' is specified the dataset attributes will be retained if
the output dataset exists - z/OS only.
See "Z/OS FILE NAME FORMAT EXAMPLES" for specific z/OS details.
So if you specify -F (without the +) all lines in the the XML file are loaded into a single message. You can also specify the message options using the -a parameter:
-a<Opts> Sets message attributes when put to the output queue
n - forces non-persistence
p - forces persistence
q - uses queue default persistence
d - put a datagram message type
r - put a reply message type
R - put a request message type
t - put a report message type
x - don't treat lines starting with '#' as special
Although the Q program will interpret files by default, note that the -ax option above tells it to ignore lines with # which it would ordinarily interpret as commands. This allows you to load XML files or source code with comments or even binary files such as a PDF or JPG.
Was there a specific limitation in Q that you are unable to work with? If so, it would be helpful to know what that is so we might point you to something that would better fit your purpose.
UPDATE
Responding to Spyro's comments, Q is not limited to 1000 characters. Here's an example where the README file from the Q distribution is written to a single message and read back.
D:\WMQ\MA01>q -m JMSDEMO -OSYSTEM.DEFAULT.LOCAL.QUEUE -FREADME
MQSeries Q Program by Paul Clarke [ V6.0.0 Build:May 1 2012 ]
Connecting ...connected to 'JMSDEMO'.
D:\WMQ\MA01>echo dis q(SYSTEM.DEFAULT.LOCAL.QUEUE) curdepth | runmqsc JMSDEMO
5724-H72 (C) Copyright IBM Corp. 1994, 2011. ALL RIGHTS RESERVED.
Starting MQSC for queue manager JMSDEMO.
1 : dis q(SYSTEM.DEFAULT.LOCAL.QUEUE) curdepth
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.LOCAL.QUEUE) TYPE(QLOCAL)
CURDEPTH(1)
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
D:\WMQ\MA01>q -m JMSDEMO -dl -iSYSTEM.DEFAULT.LOCAL.QUEUE
MQSeries Q Program by Paul Clarke [ V6.0.0 Build:May 1 2012 ]
Connecting ...connected to 'JMSDEMO'.
MQGET 24309 bytes
============================================================================
Message Descriptor (MQMD)
Report :00000000
Message Type :8 (Datagram)
Format :'MQSTR '
Priority :0
Persistence :0 (Not Persistent)
Message Id :A M Q J M S D E M O . . . R . * .
414D51204A4D5344454D4F20202020201DDEA052200B2A02
'AMQ JMSDEMO ...R .*.'
ReplyToQ :' '
ReplyToQMgr :'JMSDEMO '
----------------------------------------------------------------------
| |
| |
| DESCRIPTIVE NAME WebSphere MQ Q Program |
| |
------- 8><-------------------------------------------------------------
REMAINDER OF MSG OUTPUT OMITTED FOR BREVITY. PRINT-OUT RESUMES...
------- 8><-------------------------------------------------------------
No more messages.
D:\WMQ\MA01>
Note the header lines where the message was printed. The -dl option tells Q to print the message length which, in this case, was 24309 bytes. I downloaded the current version to perform this test so this is accurate as of 7 December 2013.
If you are looking for loading the file to queue.. Its easy to work with RFHUtil s/w or application.
In RFHUtil you can easily load the file to MQ and clear the Queue, purge ect...
Many more options are provided .
I am trying to add an attribute to a custom objectclass in OpenDJ, but am getting a reference error. I have checked the schema and can't see any reason why I shouldn't be able to add. Here is what I am trying to add:
dn: o=#!aaaa.bbbb.cccc.dddd!0001!eeee.ffff,o=myorg
objectClass: top
objectClass: myOrganization
managerGroup: inum=#!aaaa.bbbb.cccc.dddd!0001!eeee.ffff!0003!5555,ou=groups,o=#!aaaa.bbbb.cccc.dddd!0001!eeee.ffff,o=myorg
o=#!aaaa.bbbb.cccc.dddd!0001!eeee.ffff
When I try add it, I get the following (with long inums replaced with ... for simplicty of this quote):
The DN "inum=...,ou=groups,o=...,o=myorg" could not be parsed due to the following reason: No attribute type with name or OID "inum" exists in the schema.
However, I can add an inum attribute to the the object (e.g. if I create the object without a managerGroup attribute, so inum is a known attribute. Here's the LDIF (in config/schema/101-myorg.ldif):
attributeTypes: ( 1.3.6.1.4.1.48710.1.3.117 NAME 'inum'
DESC 'XRI i-number'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
X-ORIGIN 'internal attribute' )
objectClasses: ( 1.3.6.1.4.1.48710.1.4.4 NAME 'myOrganization'
SUP ( top )
STRUCTURAL
MUST ( objectclass )
MAY ( c $ county $ description $ ... $ inum $ managerGroup $ ... $ o $ ... )
I am able to add an entry with objectClass myOrganization and a managerGroup set to ou=groups....,o=myorg which adds fine. If I modify the entry to include an inum in the value, I get the error.
I have another install (that was run by a 3rd party installer script) which works fine with adding the entry, and I have compared the full schema across both installs, but cannot see any differences in the 2 installs. Yet behaviour changes. Is there anything I am overlooking? How can I resolve this to add the entry?
I wonder if this could be an issue with schema order, I had an issue in the past where I had added an attribute to an objectclass in one of the original schema files (say 01-config.ldif) but the attribute was defined in 99-user.ldif, I saw an error on startup saying the attribute did not exist, all because it needed to be loaded first.