ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » 'import pymqi' not found Linux

Post new topic  Reply to topic
 'import pymqi' not found Linux « View previous topic :: View next topic » 
Author Message
bobbee
PostPosted: Fri Jul 29, 2022 7:44 am    Post subject: 'import pymqi' not found Linux Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

I have an internal Linux box. Installed Python using root, Then I build/install pymqi. On this server I can run my script from 'mqm' and it works fine.

On my customers Linux box I did the same. I can run my script under root and it gets down into the code and fails on a 2035 trying to access the QMGR. FAIR!!

When I to run the script under 'mqm' I get 'import pymqi' not found. Why the difference. I did a setup.py looking at --help and --help-commands and I do not see options about accessibility.

Anyone have a suggestion?
Back to top
View user's profile Send private message Send e-mail AIM Address
fjb_saper
PostPosted: Sun Jul 31, 2022 1:04 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

check file ownership and accessibility of the pymodule.
you may have to do a chown mqm:users and chmod -R a+rx

Hope it helps
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bobbee
PostPosted: Mon Aug 01, 2022 2:55 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

Thanks, that was what it was. I thought opening up the modules was enough. I opened up everything under 'site-packages'. Once I opened up 'site-packages' it started working. Interesting once would compile a package such as this and it is only accessible by root. Thanks!
Back to top
View user's profile Send private message Send e-mail AIM Address
gbaddeley
PostPosted: Mon Aug 01, 2022 3:02 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2494
Location: Melbourne, Australia

Generally I try to avoid doing anything from root, unless it actually requires root privileges. Its too easy to blur the distinction between doing actions that you think don't require root, but actually bypass security controls etc. because you are root. Then some time later you try to replicate the actions from a non-privileged user and it doesn't have the same result, or fails.
_________________
Glenn
Back to top
View user's profile Send private message
EnigmaticCypher
PostPosted: Mon Aug 08, 2022 4:24 am    Post subject: Reply with quote

Newbie

Joined: 01 Jan 2022
Posts: 5

This ladies and gentlemen, is why you never install python packages at the OS level as root.

Do what you're supposed to do, and use virtual environments Compile a PyMQI wheel file for the platform you're targeting (x86 / ppc64le / ARM64 etc), and then install PyMQI into a venv with the wheel file.

Default MQ client installations set the relevant modules to have r+x to the world, so unless somebody explicitly messes with that (which they shouldn't be doing unless they know exactly what they're doing, because it causes problems like this) then everything just works.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » 'import pymqi' not found Linux
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.