What to do in a PyMQI program that does an IBM MQ PUT to remotely connect via the MQSERVER environment variable? - pymqi

[pymqi] What to do in simple program that does an IBM MQ PUT to remotely connect via the MQSERVER environment variable?
.
Hello! I am able to find short samples that use PyMQI and the connect method has hardcoded the name of the queue manager, the server-connection channel and the host(port). However, I want to have a generic connect method and instead, pass the connection information by setting the MQSERVER environment variable.
.
Is there anything that needs to be configured or setup? I looked at the available documentation but I could not find references about how to do this.
.
My hope is that if the MQSERVER issue is resolved, then I would like to use the 2 environment variables for reading a CCDT file: MQCHLLIB and MQCHLTAB.
.
Thank you in advance!
I setup the MQSERVER variable to point to a remote queue manager. This works fine with a C-based example amqsputc.
But I experimented with different ways to specify the connect() method in my small pymqi program and I have captured the MQ client traces and I see that the MQSERVER is read, but the contents is ignored by the connect().

Related

RabbitMQ : How to set and use custom environment variable in RabbitMQ Advance config file

We have configured RabbitMQ server to communicate with LDAP server for authentication which is working as expected. But we are facing one challenge where we need to externalize one value from configuration to environment variable.
so below is the current configuration present in advance.config file
{other_bind, {"CN=Service_Account,OU=Service Accounts,DC=XYZ,DC=com",{string,"123456"}}},
and want to make it something like this
{other_bind, {"CN=Service_Account,OU=Service Accounts,DC=XYZ,DC=com",{string,"${RABBITMQ_SERVICE_ACCOUNT_PASSWORD}"}}},
so as a result we wanted to externalize our password to some environment variable and use the same in advance.config file.
I tried setting value in rabbitmq-env.conf file but no luck.
Also as per this article we can't set a custom environment variable in rabbitmq-env.conf file, is it right? and if yes then where we can set this value?
https://riptutorial.com/rabbitmq/example/14032/configuring-rabbitmq-on--nix-systems
No, this is not supported:
{other_bind, {"CN=Service_Account,OU=Service Accounts,DC=XYZ,DC=com",{string,"${RABBITMQ_SERVICE_ACCOUNT_PASSWORD}"}}},
One option is to generate the advanced.config from a template before RabbitMQ starts. If RabbitMQ starts via systemd in your environment, you can use the ExecStartPre hook to run a custom script or program.
To create a drop-in override for the RabbitMQ systemd unit (and add ExecStartPre), follow these instructions:
https://wiki.archlinux.org/title/systemd#Editing_provided_units
NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.

Using 'connmanctl config' to set static IP without wired connection

I am currently using 'connmanctl config' to set static and DHCP settings with a wired connection. I'm curious if anyone has been successful with applying settings with the wire unplugged?
I would typically use 'connmanctl services' for a list of services then perform a string.match(blah, "ethernet_%w+_cable") to use that wired service name. I have been able to find and apply that service name with the ethernet cable unplugged BUT now when using 'connmanctl config':
connmanctl config ethernet_f8dc7a04ea82_cable --ipv4 manual 192.168.91.108 255.255.255.0 192.168.91.1 --nameservers 8.8.8.8
I get this error:
Error ethernet_f8dc7a04ea82_cable: Method "SetProperty" with signature "sv" on interface "net.connman.Service" doesn't exist
As you can see I have the service applied to the command and this is the same service name as when the cable is plugged in. This feature would be nice for equipment that needs to be pre-programmed before reaching the customer. I have also researched this error but can't find it being an issue with others the same as it is with my situation. Have also read many blogs, articles, etc...on trying to achieve this with nothing that jumps out at me.
...Any ideas ?
I had to perform this action via back-end with the code that I am using to configure. Just an example...settings are applied to /var/lib/connman/ethernet_?????cable/settings. I created the adapter name with the MAC address because it does not exist until the network is detected, created the directory /ethernet?????_cable then created an empty settings file on the fly. When programming and saving the settings via the equipment I am using I just insert the settings manually. When a network cable is plugged in and detected the settings you have applied work wonderfully.

Dask-ssh with local scheduler?

I would like to use dask-ssh to automatically load up worker nodes on a set of remote IP addresses. However, I would like the worker nodes to connect to a local scheduler. From the docs page, I wasn't quite sure how to accomplish this.
My specific questions are as follows:
Is this supported by dask-ssh?
If so, do I provide my local IP address into dask-ssh? e.g.:
$ dask-ssh --scheduler <my.ip.addr.here> <other.ip.addresses.here>
As of 2019-01-30 this is not supported, but is definitely in-scope. It would be a nice contribution.

Redis DB with Jmeter Integration - Can not Connect

I have a question about connecting Redis DB to Jmeter, using jp#gc - Redis Data Set.
I created a test and want to see a value from Redis, the problem is that When I add the Redis DB component nothing happened, I press the Play button and nothing happened.
I think I am not configured the Redis as expected in jmeter.
I didnt create any variable just name a new variable called dsos.
I just want to pass the value from redis of dsos_13_173 to the parameter dsos
1. How can I see why the configuration not succeed?
2. What I am missing?
I am using jmeter 3.2, with plugin v0.2 and installed it from plug in manager, and the DB is remote I am using IP not localhost as in all examples
Regards
Redis Data Set config acts alike CSV Data Set Config, so given you want to use the data from Redis in i.e. HTTP Request sampler you just need to refer to it as ${dsos} where required.
You can also double check the associated JMeter Variable value using Debug Sampler
See JMeter’s Redis Data Set - An Introduction for comprehensive explanation, step-by-step instruction and example test plan.

Configuring SSL channel connectivity on MQ client machine

From Linux server with MQ client installed we are trying to set up connection to secured channel. I am ETL person and our MQ admin is struggling. Anyways I will explain what I tried (which obviously hasn't worked yet ) and anyone please let me know what else needs to be done to set up the connectivity.. Thanks :)
tmp/mqmutility/keyrepmodmq> ls
AMQCLCHL.TAB key.kdb key.rdb key.sth MODE_MODELTAP_DEV_keyStLst.txt
export MQSSLKEYR=/tmp/mqmutility/keyrepmodmq/key
export MQCHLLIB=/tmp/mqmutility/keyrepmodmq
export MQCHLTAB=AMQCLCHL.TAB
/opt/mqm/samp/bin> amqsputc <queue_name> <queue_manager_name>
Sample AMQSPUT0 start
MQCONN ended with reason code 2058
Note: I can connect to the same queue manager for a non-SSL channel.
Any help will be great and other approaches you follow for SSL channel connectivity from client machine will also be helpful.
When using a Client Channel Definition Table (CCDT) file - your AMQCLCHL.TAB file, a return code of 2058 usually means that the queue manager name the application tried to use - your 'queue_manager_name' - was not found in any of the channel entries in the CCDT file.
If you're using. MQ V8 you can very easily display the entries in your CCDT file and the queue manager names they are configured for using the following command:
runmqsc -n
DISPLAY CHANNEL(*) QMNAME
If none of the channels in your file have the queue manager name you are using when running the amqsputc sample then this is the cause of your 2058 reason code.
Hopefully it will be clear when you see the entries in the file listed out which queue manager name you should be using, but if not, update your question with some more details (like the contents of said file and the queue manager details) and we can help further.
You must ensure that you have a CLNTCONN channel defined which has the queue manager name you want to use in the QMNAME field, and that you have a matching named SVRCONN channel defined on the queue manager. Since you are using SSL, you must also ensure that these two channels are using the same SSLCIPH.
Please read Creating server-connection and client-connection definitions on the server and it's child topics.