FIX ERROR – AWS Lambda Python: “main() takes 0 positional arguments but 2 were given”

When trying to execute the Lambda Python function, the following error occurs: { "errorMessage": "main() takes 0 positional arguments but 2 were given", "errorType": "TypeError", "stackTrace": [ " File \"/var/runtime/bootstrap.py\", line 131, in handle_event_request\n response = request_handler(event, lambda_context)\n" ] }   Solution: From the message, we see that we use the "main" function as a … Continue reading "FIX ERROR – AWS Lambda Python: “main() takes 0 positional arguments but 2 were given”"

FIX ERROR – CentOS+Nginx+Jenkins: 502 Bad Gateway

When running Nginx as a reverse proxy to Jenkins on CentOS, a 502 error may occur. Nginx error log will be as follows: 2020/05/07 13:32:33 [crit] 9665#9665: *1 connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream, client: 1.2.3.4, server: jenkins.artem.services, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "jenkins.artem.services"   Solution: Reason SELinux. … Continue reading "FIX ERROR – CentOS+Nginx+Jenkins: 502 Bad Gateway"

FIX ERROR – CentOS 7 kubectl: Invalid choice: ‘eks’, maybe you meant

When trying to execute any "kubectl" command on an EKS cluster, the following error occurs: Invalid choice: 'eks', maybe you meant:   A possible reason for this is the old version of "kubectl" available in the repository.   Solution: Install the latest version of "kubectl" using PIP3   To use "kubectl" installed using PIP, you … Continue reading "FIX ERROR – CentOS 7 kubectl: Invalid choice: ‘eks’, maybe you meant"

FIX ERROR – Ansible AWS SSM: AnsibleError: An unhandled exception occurred while templating

When trying to get a value from AWS SSM, Ansible Playbook using Python3 as an interpreter generates the following error: fatal: [localhost-py3]: FAILED! => {"changed": false, "msg": "AnsibleError: An unhandled exception occurred while templating '{{ lookup('aws_ssm', 'server_listeners', decrypt=false, region='eu-west-1') }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while running the lookup … Continue reading "FIX ERROR – Ansible AWS SSM: AnsibleError: An unhandled exception occurred while templating"

 FIX ERROR – Terraform: Blocks of type “tags” are not expected here.

When trying to make a terraform plan or  terraform apply, terraform returns the following error: Error: Unsupported block type Blocks of type "tags" are not expected here. Did you mean to define argument "tags"? If so, use the equals sign to assign it a value.   Solution: In terraform versions below the 12, the following … Continue reading " FIX ERROR – Terraform: Blocks of type “tags” are not expected here."

FIX ERROR – WordPress: Blocked loading mixed active content

A similar error may occur when using mixed content HTTP and HTTPS. Blocked loading mixed active content   Solution: To get rid of it and download everything using the HTTPS protocol, you need to add the following to the "wp-config.php" file:

FIX ERROR – phpMyAdmin+Apache 2.4: client denied by server configuration: /usr/share/phpMyAdmin/

When I tried to log in to phpMyAdmin using Apache 2.4 I received a 403 error, in the logs the following message: client denied by server configuration: /usr/share/phpMyAdmin/ The reason is that the configuration for Apache version 2.2   Solution: Open the configuration file:   And we change this part:   To the following:   … Continue reading "FIX ERROR – phpMyAdmin+Apache 2.4: client denied by server configuration: /usr/share/phpMyAdmin/"

FIX ERROR – WordPress: The server requested authentication method unknown to the client [caching_sha2_password]

When installing WordPress using MySQL 8, the following error may occur: Warning: mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password] The reason is the default authorization method.   Solution: In the file "/etc/my.cnf" in the block "mysqld" add the following:   And restart the mysqld service:   If the user has already … Continue reading "FIX ERROR – WordPress: The server requested authentication method unknown to the client [caching_sha2_password]"