'which' behaves inconsistently on different machines - Why the difference?
2
votes
0
answers
70
views
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//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//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//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.
Asked by JB Looney
(21 rep)
May 17, 2023, 02:27 PM
Last activity: May 18, 2023, 01:47 PM
Last activity: May 18, 2023, 01:47 PM