Sample Header Ad - 728x90

Invalid MIT-MAGIC-COOKIE-1 when I run mpirun

2 votes
2 answers
4789 views
Suddenly whenever I run mpirun I get the error Invalid MIT-MAGIC-COOKIE-1 key. I think this might have started after I killed a command using mpirun that had been launched from a python console. I looked at $XAUTHORITY and found no .Xauthority file. I also tried xhost +local: in the terminal but the problem remains. I have only used mpirun to run things locally on my pc. (For the most part mpirun does seem to do what it is supposed to, but I believe it also now creates errors in things that were working perfectly before.) Simply running the below shows the warning for example (nonsense minimal example): /usr/bin/mpirun -n 1 echo "bla" ----- I ran export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority because it solved the issue for someone else but it seemed to have made things worse (?). Now it says No protocol specified whenever I run mpirun. By going through the steps in https://superuser.com/a/941244/728074 it goes back to saying Invalid MIT-MAGIC-COOKIE-1 key. Also my $DISPLAY was set to nothing it seems. I tried setting it to ":1" or ":0" but that does not resolve the issue. I also do not know whether it had a value before but some posts suggest its value is relevant for this error. ---- System: Ubuntu 20.04 LTS
Asked by Kvothe (453 rep)
Jan 22, 2021, 03:23 PM
Last activity: Aug 21, 2023, 08:04 AM