Mostrando postagens com marcador Centos. Mostrar todas as postagens
Mostrando postagens com marcador Centos. Mostrar todas as postagens

terça-feira, 22 de abril de 2025

Docker error: “Cannot initialize async manager: cannot create thread – operation not permitted”

Erro Docker no CentOS: cannot create thread

Publicado por Sysadmin Urbano | Infraestrutura, SysOps e DevOps

Um guia prático para quem vive na linha de frente da operação de sistemas.

Erro Docker no CentOS: cannot create thread – operation not permitted

Erro Docker no terminal CentOS

Se ao tentar iniciar um container no Docker você se deparou com a mensagem:

Cannot initialize async manager: cannot create thread – operation not permitted

Esse erro geralmente está relacionado a limites de sistema (ulimit) ou restrições de segurança no CentOS ou Red Hat-based systems.

🔍 Possíveis causas

  • Limite de threads (max user processes) está muito baixo
  • Docker sendo executado em um ambiente restrito (como contêiner ou com SELinux/apparmor ativo)
  • Container tentando criar mais threads do que o sistema permite

✅ Como resolver

1. Aumentar o limite de threads (ulimit)

ulimit -u 65535

Ou edite o arquivo /etc/security/limits.conf:

* soft nproc 65535
* hard nproc 65535

2. Ajustar systemd

Se o Docker for iniciado via systemd:

sudo systemctl edit docker

Adicione:

[Service]
LimitNPROC=infinity

Depois reinicie o serviço:

sudo systemctl daemon-reexec
sudo systemctl restart docker

3. SELinux (se ativado)

Para testar, você pode temporariamente desabilitar:

sudo setenforce 0

(⚠️ use com cautela — preferencialmente ajuste permissões via audit2allow)


“Limitações silenciosas do sistema podem se tornar barreiras para contêineres. Saber onde mexer é a chave.”

terça-feira, 13 de setembro de 2016

Instalando MariaDB no CentOS 7

Publicado por Sysadmin Urbano | Infraestrutura, SysOps e DevOps

Um guia prático para quem vive na linha de frente da operação de sistemas.

Instalando MariaDB

MariaDB é um SGBD que surgiu como fork do MySQL, criado pelo próprio fundador do projeto após sua aquisição pela Oracle.
Nesse artigo faremos uma instalação básica do MariaDB num Servidor CentOS 7, caso queiram ler sobre a instalação básica de um Servidor CentOS 7 já escrevi um artigo em: http://bit.ly/2c1sM3r

Instalando o MariaDB:

yum install mariadb mariadb-devel mariadb-server -y
Inicializando o mariadb:
systemctl start mariadb
Utilizando Script de Inicialização segura:
mysql_secure_installation 
Siga as instruções do script:
# mysql_secure_installation 
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: comando não encontrado

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

segunda-feira, 12 de setembro de 2016

Instalação básica CentOS 7

Publicado por Sysadmin Urbano | Infraestrutura, SysOps e DevOps

Um guia prático para quem vive na linha de frente da operação de sistemas.

Instalação CentOS 7

Abordarei nesse artigo uma configuração básica de um Servidor CentOS 7, sem Hardening, sem Tuning, serve como base para iniciar os estudos ou trabalhos.

Baseado na instalação mínima

Para seguir nesse artigo, você deve ter um CentOS 7 minimal instalado. A instalação mínima reduz as possibilidades de ataques e garante que você apenas instale os softwares que você irá usar.

SELinux

SELinux quer dizer Security-Enhanced Linux. É excelente para ajudar na segurança de um servidor Linux.
O arquivo /etc/selinux/config contém sua configuração default:



Não é intuito desse artigo tratar de configurações do selinux, portanto iremos trocar de enforcing para permissive.

Iptables

No CentOS 7 o firewall que vem instalado por padrão é o FirewallD, caso queira modificar para Iptables basta seguir o procedimento abaixo:

Desabilitando Firewalld:

systemctl mask firewalld
systemctl stop firewalld
Instalando iptables:
yum -y install iptables-services
Habilitando iptables no boot:
systemctl enable iptables
systemctl enable ip6tables
Inicializando o serviço iptables:
systemctl start iptables
systemctl start ip6tables

Repositório Epel

Extra Packages for Enterprise Linux (EPEL), é um repositório mantido pela comunidade Fedora que cria, mantém e administra um conjunto de pacotes adicionais para Enterprise Linux, incluindo, mas não limitado à, Red Hat Enterprise Linux (RHEL), CentOS, Scientific Linux (SL) e Oracle Linux (OL).
Instalando o repositório Epel:

yum install epel-release -y
Atualize o Sistema:
yum update -y

SysadminUrbano • Guia Técnico: Migração Windows 10 -> Windows 11 com Backup Completo

Migração Windows 10 → Windows 11: Backup completo e restauração sem perdas Checklist técnico com comandos, exportações e reaproveit...