My company has multiple servers that were setup to be identical. After using dev32 for several weeks, which
stopped functioning. I go to dev35 and get similar behavior -- works for several weeks then one day it stops. dev36 is ok for now, but following this pattern I'll eventually run out of systems to use.
Any thoughts on what could be causing this behavior?
dev32 ~> which python3
python3: Command not found.
dev35 ~> which python3
python3: Command not found.
dev36 ~> which python3
/bin/python3
dev32 ~> ls -al /bin/python*
lrwxrwxrwx. 1 root root 9 Jan 17 10:18 /bin/python3 -> python3.6
-rwxr-x---. 2 root root 11328 Nov 16 2020 /bin/python3.6
-rwxr-x---. 2 root root 11328 Nov 16 2020 /bin/python3.6m
dev32 ~> echo $PATH
.:/bin:/sbin:/usr/bin:/usr/bin/X11:/usr/bsd:/usr/sbin:/home/<username>/bin:/usr/local/bin:/usr/local/etc:/usr/local/sbin:/etc:/usr/etc:/usr/gnu/bin
dev35 ~> ls -al /bin/python3*
lrwxrwxrwx. 1 root root 9 Jan 17 10:11 /bin/python3 -> python3.6
-rwxr-x---. 2 root root 11328 Nov 16 2020 /bin/python3.6
-rwxr-x---. 2 root root 11328 Nov 16 2020 /bin/python3.6m
dev35 ~> echo $PATH
.:/bin:/sbin:/usr/bin:/usr/bin/X11:/usr/bsd:/usr/sbin:/home/<username>/bin:/usr/local/bin:/usr/local/etc:/usr/local/sbin:/etc:/usr/etc:/usr/gnu/bin
dev36 ~> ls -al /bin/python*
lrwxrwxrwx. 1 root root 9 Jan 17 10:18 /bin/python3 -> python3.6
-rwxr-x---. 3 root root 11328 Nov 16 2020 /bin/python3.6
-rwxr-x---. 2 root root 11328 Nov 16 2020 /bin/python3.6m
dev36 ~> echo $PATH
.:/bin:/sbin:/usr/bin:/usr/bin/X11:/usr/bsd:/usr/sbin:/home/<username>/bin:/usr/local/bin:/usr/local/etc:/usr/local/sbin:/etc:/usr/etc:/usr/gnu/bin
Even after cd /bin
, which
cannot find python3
Other knowns:
- All servers are CentOS 7.9, uname -a matches
- Ran
rpm -qa | sort > $HOSTNAME.txt
on each server and compared. results are identical - bash v4.2.26, tcsh v6.18.01 (same across all systems)
- Behavior confirmed by multiple users; tcsh & bash yield same results. One user's shell uses system defaults (no ~/.bashrc, ~/.tcshrc or ~/.login), I customize mine.
- IT says they haven't changed anything beyond standard monthly patching that is applied consistently to all servers.
- Problem persists across reboots
Please let me know if more information is needed.
ls
report on the two failing systems? – Chris Davies May 17 '23 at 14:40ls /bin
andecho "$PATH"
. Also take a look in the package manager's log. – May 17 '23 at 14:40.
as the first element in$PATH
is a potential security issue. It's better not to include it at all, but if you must then put it at the end of the list – Chris Davies May 17 '23 at 14:41python3 --version
still work on all three machines? – Marcus Müller May 17 '23 at 14:53.
at the end of the mode string fromls
suggests there is an SELinux context - I wonder if that is a factor? See for example What does a dot after the file permission bits mean? – steeldriver May 17 '23 at 16:11which
command that's misbehaving (in which case an obvious workaround is to stop using it), or do saner commands (type
,command -v
, …) also not find exeutables? – Gilles 'SO- stop being evil' May 17 '23 at 16:32@roima - Thanks for the tip on the '.' in my $PATH. I'll fix that.
Marcus Muller - Running
python3 --version
on all 3x systems returns '3.6.8'@steeldriver - I'll read up on that next
– JB Looney May 18 '23 at 13:48-rwxr-x---
) androot:root
there's likely not much to relate to here. I feel this question is steering into an unclear direction. – May 18 '23 at 14:12