Unable to activate qiime2 env '-bash: redirection error: cannot duplicate fd: Too many open files'

Hello,

I am returning to the Qiime2 enviroment after some time off but I appear unable to open it or any others.

I’m using a conda enviroment and have tried both qiime2-2020.2 and qiime2-2019.1

source activate qiime2-2020.2

(After some time cycling through bash, python, sed, tr the following message prints repeatly to my screen)

-bash: redirection error: cannot duplicate fd: Too many open files
-bash: redirection error: cannot duplicate fd: Too many open files
-bash: redirection error: cannot duplicate fd: Too many open files
-bash: redirection error: cannot duplicate fd: Too many open files
-bash: redirection error: cannot duplicate fd: Too many open files

Understand this may be more of conda env issue but I’ve had a surprisingly hard time finding anything useful online from other sources.

Any help would be most apprciated so I can get stuck back into my microbiomes :slightly_smiling_face:

Thanks in advance,

Sam

1 Like

This post was flagged by the community and is temporarily hidden.

Okay - issue resolved and lesson learned.

Issue was I had created an alias in my .bashrc/.bash_profile

alias qiime='source activate qiime2-2020.2'

Deleted this, rebooted and it worked again.

Maybe getting stuck in some kind of loop as in the conda env ‘qiime’ is also a command prehaps.

Anyway issue resolved

Thanks

1 Like

Hello Colin,

Thanks for getting back to me on this - Listing the files in /etc/security directory I see the following

.
├── audit_class
├── audit_control
├── audit_event
├── audit_user
└── audit_warn

0 directories, 5 files

I’ve now also removed the enviroments and reinstalled them as per offical instructions:
https://docs.qiime2.org/2020.2/install/native/#install-qiime-2-within-a-conda-environment

Any further suggestions?

Thanks,

Sam

P.S. Could i have the link source for your first responce?

P.S.

Hi @SamWilliamsUOB!

It sounds like maybe your shell was evaluating the contents of that alias statement. Bash (the shell you appear to be using) is picky about single quotes vs double quotes, so maybe the right incantation is:

alias qiime="source activate qiime2-2020.2"

It’s also worth noting that conda has introduced a more robust tool for activation of envs, I highly recommend you switch to that:

conda activate qiime2-2020.2

The QIIME 2 Forum Moderator team removed the response - it contained content that was inconsistent with our code of conduct (link).

Let’s focus on the issue that you have identified (your bash alias) - we don’t want to start changing the security settings (what was proposed in the removed post) on your computer without reason.

3 Likes

Hello Sam,

I spoke too soon with my initial post. I should have focused on the underlying issue with conda activation. And especially:

:lock: :shield: :+1:

1 Like