We get identical problem in our software installer. It seem that dirmngr processes never goes away. We workaround the issue by terminating the process manually:
{code} =item addRepositories( @repositories ) See iMSCP::DistPackageManager::Interface::addRepositories() Param list @repositories List of repositories, each represented as a hash with the following key/value pairs: repository : APT repository in format 'uri suite [component1] [component2] [...]' repository_key_srv : APT repository key server such as keyserver.ubuntu.com (not needed if repository_key_uri is provided) repository_key_id : APT repository key identifier such as 5072E1F5 (not needed if repository_key_uri is provided) repository_key_uri : APT repository key URI such as https://packages.sury.org/php/apt.gpg (not needed if repository_key_id is provided) =cut sub addRepositories { my ( $self, @repositories ) = @_; $self->{'eventManager'}->trigger( 'beforeAddDistributionRepositories', \@repositories ) == 0 or die( getMessageByType( 'error', { amount => 1, remove => TRUE } ) || 'Unknown error' ); # Make sure that repositories are not added twice $self->removeRepositories( @repositories ); my $file = iMSCP::File->new( filename => $APT_SOURCES_LIST_FILE_PATH ); my $fileContent = $file->getAsRef(); # Add APT repositories for my $repository ( @repositories ) { ${ $fileContent } .= <<"EOF"; deb $repository->{'repository'} deb-src $repository->{'repository'} EOF # Hide "apt-key output should not be parsed (stdout is not a terminal)" warning that # is raised in newest apt-key versions. Our usage of apt-key is not dangerous (not parsing) local $ENV{'APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE'} = TRUE; if ( $repository->{'repository_key_srv'} && $repository->{'repository_key_id'} ) { # Add the repository key from the given key server my $rs = execute( [ 'apt-key', 'adv', '--recv-keys', '--keyserver', $repository->{'repository_key_srv'}, $repository->{'repository_key_id'} ], \my $stdout, \my $stderr ); debug( $stdout ) if length $stdout; $rs == 0 or die( $stderr || 'Unknown error' ); # Workaround https://bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/1633754 execute( [ 'pkill', '-TERM', 'dirmngr' ], \$stdout, \$stderr ); } elsif ( $repository->{'repository_key_uri'} ) { # Add the repository key by fetching it first from the given URI my $keyFile = File::Temp->new(); $keyFile->close(); my $rs = execute( [ 'wget', '--prefer-family=IPv4', '--timeout=30', '-O', $keyFile, $repository->{'repository_key_uri'} ], \my $stdout, \my $stderr ); debug( $stdout ) if length $stdout; $rs == 0 or die( $stderr || 'Unknown error' ); $rs = execute( [ 'apt-key', 'add', $keyFile ], \$stdout, \$stderr ); debug( $stdout ) if length $stdout; $rs == 0 or die( $stderr || 'Unknown error' ); } } $file->save(); $self->{'eventManager'}->trigger( 'afterAddDistributionRepositories', \@repositories ) == 0 or die( getMessageByType( 'error', { amount => 1, remove => TRUE } ) || 'Unknown error' ); } {code} -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1633754 Title: dirmngr is used as daemon To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1633754/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs