Budget: 500 UAH Deadline: 1 day
Good afternoon. I can help with the elastic setting right now.
необходимо сейчас подключиться на сервер, исправить ошибки с elasticsearch
service elasticsearch status
● elasticsearch.service - Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2023-10-11 15:51:40 BST; 4 days ago
Docs: https://www.elastic.co
Process: 1086363 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILUR>
Main PID: 1086363 (code=exited, status=1/FAILURE)
Oct 11 15:51:40 dev systemd[1]: Starting Elasticsearch...
Oct 11 15:51:40 dev systemd-entrypoint[1086502]: Error occurred during initialization of boot layer
Oct 11 15:51:40 dev systemd-entrypoint[1086502]: java.lang.module.FindException: Two versions of module org.apache.logging.log4j.core found in /usr/>
Oct 11 15:51:40 dev systemd-entrypoint[1086363]: ERROR: Elasticsearch exited unexpectedly, with exit code 1
Oct 11 15:51:40 dev systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Oct 11 15:51:40 dev systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Oct 11 15:51:40 dev systemd[1]: Failed to start Elasticsearch.
journalctl -xe
-- Support: http://www.ubuntu.com/support
--
-- The unit elasticsearch.service has entered the 'failed' state with result 'exit-code'.
Oct 15 18:12:23 dev systemd[1]: Failed to start Elasticsearch.
-- Subject: A start job for unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit elasticsearch.service has finished with a failure.
--
-- The job identifier is 2428374 and the job result is failed.
Oct 15 18:12:24 dev agent[1607825]: 2023-10-15 18:12:24 BST | CORE | WARN | (pkg/collector/python/datadog_agent.go:131 in LogMessage) | http_check:U>
Oct 15 18:12:24 dev agent[1607825]: 2023-10-15 18:12:24 BST | CORE | INFO | (pkg/collector/python/datadog_agent.go:133 in LogMessage) | http_check:U>
Oct 15 18:12:25 dev agent[1607825]: 2023-10-15 18:12:25 BST | CORE | WARN | (pkg/collector/python/datadog_agent.go:131 in LogMessage) | http_check:U>
Oct 15 18:12:25 dev agent[1607825]: 2023-10-15 18:12:25 BST | CORE | INFO | (pkg/collector/python/datadog_agent.go:133 in LogMessage) | http_check:U>
Oct 15 18:12:26 dev agent[1607825]: 2023-10-15 18:12:26 BST | CORE | WARN | (pkg/collector/python/datadog_agent.go:131 in LogMessage) | http_check:U>
Oct 15 18:12:26 dev agent[1607825]: 2023-10-15 18:12:26 BST | CORE | INFO | (pkg/collector/python/datadog_agent.go:133 in LogMessage) | http_check:U>
Oct 15 18:12:27 dev agent[1607825]: 2023-10-15 18:12:27 BST | CORE | WARN | (pkg/collector/python/datadog_agent.go:131 in LogMessage) | elastic:f906>
Oct 15 18:12:27 dev agent[1607825]: 2023-10-15 18:12:27 BST | CORE | WARN | (pkg/collector/python/datadog_agent.go:131 in LogMessage) | http_check:U>
Oct 15 18:12:27 dev agent[1607825]: 2023-10-15 18:12:27 BST | CORE | ERROR | (pkg/collector/worker/check_logger.go:69 in Error) | check:elastic | Er>
Oct 15 18:12:27 dev agent[1607825]: 2023-10-15 18:12:27 BST | CORE | INFO | (pkg/collector/python/datadog_agent.go:133 in LogMessage) | http_check:U>
Oct 15 18:12:28 dev sshd[21590]: Invalid user mcserver from 101.34.250.251 port 47328
Oct 15 18:12:28 dev agent[1607825]: 2023-10-15 18:12:28 BST | CORE | WARN | (pkg/collector/python/datadog_agent.go:131 in LogMessage) | http_check:U>
Oct 15 18:12:28 dev agent[1607825]: 2023-10-15 18:12:28 BST | CORE | INFO | (pkg/collector/python/datadog_agent.go:133 in LogMessage) | http_check:U>
Oct 15 18:12:28 dev sshd[21590]: Received disconnect from 101.34.250.251 port 47328:11: Bye Bye [preauth]
Oct 15 18:12:28 dev sshd[21590]: Disconnected from invalid user mcserver 101.34.250.251 port 47328 [preauth]
Oct 15 18:12:29 dev agent[1607825]: 2023-10-15 18:12:29 BST | CORE | WARN | (pkg/collector/python/datadog_agent.go:131 in LogMessage) | http_check:U>
Oct 15 18:12:29 dev agent[1607825]: 2023-10-15 18:12:29 BST | CORE | INFO | (pkg/collector/python/datadog_agent.go:133 in LogMessage) | http_check:U>
lines 1034-1061/1061 (END)
tail -fn 100 /var/log/elasticsearch/gc.log
[2023-10-15T17:12:23.329+0000][21485][info][gc,init] CardTable entry size: 512
[2023-10-15T17:12:23.329+0000][21485][info][gc ] Using G1
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Version: 21+35-2513 (release)
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] CPUs: 12 total, 12 available
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Memory: 31884M
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Large Page Support: Disabled
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] NUMA Support: Disabled
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Compressed Oops: Enabled (32-bit)
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Heap Region Size: 4M
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Heap Min Capacity: 512M
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Heap Initial Capacity: 512M
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Heap Max Capacity: 1G
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Pre-touch: Enabled
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Parallel Workers: 10
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Concurrent Workers: 3
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Concurrent Refinement Workers: 10
[2023-10-15T17:12:23.372+0000][21485][info][gc,init] Periodic GC: Disabled
[2023-10-15T17:12:23.378+0000][21485][info][gc,metaspace] CDS archive(s) mapped at: [0x00007f376f000000-0x00007f376fca5000-0x00007f376fca5000), size 13258752, SharedBaseAddress: 0x00007f376f000000, ArchiveRelocationMode: 1.
[2023-10-15T17:12:23.378+0000][21485][info][gc,metaspace] Compressed class space mapped at: 0x00007f3770000000-0x00007f37b0000000, reserved size: 1073741824
[2023-10-15T17:12:23.378+0000][21485][info][gc,metaspace] Narrow klass base: 0x00007f376f000000, Narrow klass shift: 0, Narrow klass range: 0x100000000
Budget: 500 UAH Deadline: 1 day
Good afternoon. I can help with the elastic setting right now.
Доброго вечора. Там же вказана помилка:
Two versions of module org.apache.logging.log4j.core found in /usr/
It is necessary to perform the update, transfer, and configuration of Laravel projects to a new server, ensuring stable operation, security, protection against exploits, and correct functioning of all services after migration. 1. Main tasks Prepare the new server for operation. Transfer project files, databases, configurations, and cron jobs. Update server software. Configure a secure environment for Laravel. Check compatibility of PHP, Laravel, Composer packages, and dependencies. Ensure protection against known exploits, malicious requests, and unauthorized access. Set up SSL certificates. Check the functionality of the websites after the transfer. 2. Transfer of Laravel projects For each project, it is necessary to: Transfer project files. Transfer the database. Transfer the .env configuration. Set directory access permissions: storage bootstrap/cache Check functionality: homepage; admin panel; authorization; forms; API; file uploads; email sending; cron jobs; queue workers.3. Security and protection It is necessary to implement basic and application-level protection: close root access via SSH; configure SSH access only via keys; change the default SSH port if necessary; configure the firewall; allow only necessary ports; install Fail2Ban; hide service versions of Nginx/Apache/PHP; restrict access to .env, .git, backup files, log files; set correct file permissions; check projects for malicious files; check Composer packages for known vulnerabilities; update dependencies if it does not break functionality; configure protection against SQL injection, XSS, CSRF, and path traversal; check the correctness of Laravel APP_ENV and APP_DEBUG; set APP_DEBUG=false in production; configure rate limiting for critical endpoints; check access to storage/uploads; configure protection against PHP execution in upload directories; check access rights to admin panels. 4. SSL and domains It is necessary to: Install SSL certificates. Configure automatic SSL renewal. Enable redirect from HTTP to HTTPS. Check the correct operation of websites via HTTPS. 5. Backup It is necessary to configure backup: project files; databases; .env files; uploaded media; cron configurations; Nginx/Apache configurations. Backup should be performed automatically on a schedule. It is preferable to store copies separately from the main server. 6. Post-transfer verification After migration, it is necessary to check: absence of 500/403/404 errors; absence of critical errors in Laravel logs. 9. Result of execution After the work is completed, there should be: Laravel projects successfully transferred to the new server; websites are functioning stably; SSL is configured; the server is protected with basic security settings; access to critical files is restricted; backup is configured; cron and queues are operational; the old server can be turned off after final verification.
We have a dedicated server on Hetzner with a website on Docker (+ Laravel framework) Contact with the developers has been lost Need to: - restore and change server access (probably SSH) - recommend a storage location and set up a full server backup with easy recovery, probably not on Hetzner for security - fix the logo that is not displaying for some reason (it's unclear why the file has become inaccessible) Important - there is no website backup, and there is no room for error. We will only consider experienced specialists.