Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sysv files #343

Merged
merged 3 commits into from
Aug 5, 2024
Merged

Fix sysv files #343

merged 3 commits into from
Aug 5, 2024

Conversation

f-galland
Copy link
Member

Description

This PR fixes the sysv script under /etc/init.d/wazuh-indexer.

Issues Resolved

solves #340

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@f-galland f-galland linked an issue Aug 2, 2024 that may be closed by this pull request
@f-galland
Copy link
Member Author

After installing packages generated with the changes of this PR, the service commands operate as expected:

[root@alma9 ~]# curl -k -u admin:admin https://localhost:9200
{
  "name" : "node-1",
  "cluster_name" : "wazuh-cluster",
  "cluster_uuid" : "CQgc5AqSRzSg9HyWQd-u3g",
  "version" : {
    "number" : "7.10.2",
    "build_type" : "rpm",
    "build_hash" : "bf42358a96448dcf95cdde3cc82300267743a9e0",
    "build_date" : "2024-08-01T19:11:30.394888472Z",
    "build_snapshot" : false,
    "lucene_version" : "9.10.0",
    "minimum_wire_compatibility_version" : "7.10.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "The OpenSearch Project: https://opensearch.org/"
}
[root@alma9 ~]# service status wazuh-indexer
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, reload-or-restart, try-reload-or-restart, force-reload, status, condrestart). For other actions, please try to use systemctl.
[root@alma9 ~]# service wazuh-indexer status
● wazuh-indexer.service - wazuh-indexer
     Loaded: loaded (/usr/lib/systemd/system/wazuh-indexer.service; enabled; preset: disabled)
    Drop-In: /run/systemd/system/service.d
             └─zzz-lxc-service.conf
     Active: active (running) since Fri 2024-08-02 12:33:32 UTC; 34s ago
       Docs: https://documentation.wazuh.com
   Main PID: 6906 (java)
      Tasks: 123 (limit: 200975)
     Memory: 1.4G
        CPU: 33.254s
     CGroup: /system.slice/wazuh-indexer.service
             └─6906 /usr/share/wazuh-indexer/jdk/bin/java -Xshare:auto -Dopensearch.networkaddress.cache.ttl=60 -Dopensearch.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -XX:+ShowCodeDetailsInExceptionMessages -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.security.manager=allow -Djava.locale.providers=SPI,COMPAT -Xms1g -Xmx1g -XX:+UseG1GC -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -Djava.io.tmpdir=/var/log/wazuh-indexer/tmp -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/lib/wazuh-indexer -XX:ErrorFile=/var/log/wazuh-indexer/hs_err_pid%p.log "-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/wazuh-indexer/gc.log:utctime,pid,tags:filecount=32,filesize=64m" -Djava.security.manager=allow -Djava.util.concurrent.ForkJoinPool.common.threadFactory=org.opensearch.secure_sm.SecuredForkJoinWorkerThreadFactory -Dclk.tck=100 -Djdk.attach.allowAttachSelf=true -Djava.security.policy=file:///etc/wazuh-indexer/opensearch-performance-analyzer/opensearch_security.policy --add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED -XX:MaxDirectMemorySize=536870912 -Dopensearch.path.home=/usr/share/wazuh-indexer -Dopensearch.path.conf=/etc/wazuh-indexer -Dopensearch.distribution.type=rpm -Dopensearch.bundled_jdk=true -cp "/usr/share/wazuh-indexer/lib/*" org.opensearch.bootstrap.OpenSearch -p /run/wazuh-indexer/wazuh-indexer.pid --quiet

Aug 02 12:33:25 alma9 systemd-entrypoint[6906]: WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.OpenSearch (file:/usr/share/wazuh-indexer/lib/opensearch-2.13.0.jar)
Aug 02 12:33:25 alma9 systemd-entrypoint[6906]: WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.OpenSearch
Aug 02 12:33:25 alma9 systemd-entrypoint[6906]: WARNING: System::setSecurityManager will be removed in a future release
Aug 02 12:33:26 alma9 systemd-entrypoint[6906]: Aug 02, 2024 12:33:26 PM sun.util.locale.provider.LocaleProviderAdapter <clinit>
Aug 02 12:33:26 alma9 systemd-entrypoint[6906]: WARNING: COMPAT locale provider will be removed in a future release
Aug 02 12:33:26 alma9 systemd-entrypoint[6906]: WARNING: A terminally deprecated method in java.lang.System has been called
Aug 02 12:33:26 alma9 systemd-entrypoint[6906]: WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.Security (file:/usr/share/wazuh-indexer/lib/opensearch-2.13.0.jar)
Aug 02 12:33:26 alma9 systemd-entrypoint[6906]: WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.Security
Aug 02 12:33:26 alma9 systemd-entrypoint[6906]: WARNING: System::setSecurityManager will be removed in a future release
Aug 02 12:33:32 alma9 systemd[1]: Started wazuh-indexer.
[root@alma9 ~]# service wazuh-indexer stop
Stopping wazuh-indexer (via systemctl):                    [  OK  ]
[root@alma9 ~]# service wazuh-indexer start
Starting wazuh-indexer (via systemctl):                    [  OK  ]
[root@alma9 ~]# ls -lsah /etc/init.d/wazuh-indexer 
4.0K -rwxr-xr-x 1 root root 3.6K Aug  2 12:27 /etc/init.d/wazuh-indexer

@f-galland f-galland marked this pull request as ready for review August 2, 2024 12:38
@f-galland f-galland requested a review from a team as a code owner August 2, 2024 12:38
@f-galland f-galland self-assigned this Aug 2, 2024
@AlexRuiz7 AlexRuiz7 merged commit a7f758c into 4.9.0 Aug 5, 2024
7 checks passed
@AlexRuiz7 AlexRuiz7 deleted the 340-fix-sysv-service-files branch August 5, 2024 12:55
AlexRuiz7 added a commit that referenced this pull request Aug 20, 2024
* Adding /var/run/wazuh-indexer to the list of ignored files (#339)

* Fix sysv files (#343)

* Change sysv script to reference opensearch script

* Correct permissions on sysv script

* Updating sysv service file permissions to match 4.8

* Moving logstash dockerfile and associated files to its own folder (#302)

* Moving logstash dockerfile and associated files to its own folder

* Removing unused context from logstash container in splunk compose

* Changing context in manager to splunk integration to newly created logstash folder

* Using common logstash container for Security Lake integration

* Removing unused dockerfiles

* Adding gzip to logstash pipeline

* Adding gzip decompression to lambda

* Changing aws REGION variable name

* Cleanup commented code

* Adding environment variables for docker images versions

* Adding logstash version to .env

* Fixing minor issues in compose files

* Removing certs configuration

* Format YAML and Readme file from 3rd-party integrations

* Remove unused code

* Upgrade integrations to the latest Wazuh version

* Fic environment variable

* Remove unused code and fix ASL documentation

---------

Co-authored-by: Álex Ruiz <[email protected]>

* Fixing chown command (#347)

---------

Co-authored-by: Federico Gustavo Galland <[email protected]>
AlexRuiz7 added a commit that referenced this pull request Aug 20, 2024
* Adding /var/run/wazuh-indexer to the list of ignored files (#339)

* Fix sysv files (#343)

* Change sysv script to reference opensearch script

* Correct permissions on sysv script

* Updating sysv service file permissions to match 4.8

* Moving logstash dockerfile and associated files to its own folder (#302)

* Moving logstash dockerfile and associated files to its own folder

* Removing unused context from logstash container in splunk compose

* Changing context in manager to splunk integration to newly created logstash folder

* Using common logstash container for Security Lake integration

* Removing unused dockerfiles

* Adding gzip to logstash pipeline

* Adding gzip decompression to lambda

* Changing aws REGION variable name

* Cleanup commented code

* Adding environment variables for docker images versions

* Adding logstash version to .env

* Fixing minor issues in compose files

* Removing certs configuration

* Format YAML and Readme file from 3rd-party integrations

* Remove unused code

* Upgrade integrations to the latest Wazuh version

* Fic environment variable

* Remove unused code and fix ASL documentation

---------

Co-authored-by: Álex Ruiz <[email protected]>

* Fixing chown command (#347)

---------

Co-authored-by: Federico Gustavo Galland <[email protected]>
AlexRuiz7 added a commit that referenced this pull request Sep 6, 2024
* Adding /var/run/wazuh-indexer to the list of ignored files (#339)

* Fix sysv files (#343)

* Change sysv script to reference opensearch script

* Correct permissions on sysv script

* Updating sysv service file permissions to match 4.8

* Moving logstash dockerfile and associated files to its own folder (#302)

* Moving logstash dockerfile and associated files to its own folder

* Removing unused context from logstash container in splunk compose

* Changing context in manager to splunk integration to newly created logstash folder

* Using common logstash container for Security Lake integration

* Removing unused dockerfiles

* Adding gzip to logstash pipeline

* Adding gzip decompression to lambda

* Changing aws REGION variable name

* Cleanup commented code

* Adding environment variables for docker images versions

* Adding logstash version to .env

* Fixing minor issues in compose files

* Removing certs configuration

* Format YAML and Readme file from 3rd-party integrations

* Remove unused code

* Upgrade integrations to the latest Wazuh version

* Fic environment variable

* Remove unused code and fix ASL documentation

---------

Co-authored-by: Álex Ruiz <[email protected]>

* Fixing chown command (#347)

* Add Changelog for 4.9.0 (#364)

---------

Co-authored-by: Federico Gustavo Galland <[email protected]>
AlexRuiz7 added a commit that referenced this pull request Sep 6, 2024
* Merge 4.9.0 into 4.9.1 (#376)

* Adding /var/run/wazuh-indexer to the list of ignored files (#339)

* Fix sysv files (#343)

* Change sysv script to reference opensearch script

* Correct permissions on sysv script

* Updating sysv service file permissions to match 4.8

* Moving logstash dockerfile and associated files to its own folder (#302)

* Moving logstash dockerfile and associated files to its own folder

* Removing unused context from logstash container in splunk compose

* Changing context in manager to splunk integration to newly created logstash folder

* Using common logstash container for Security Lake integration

* Removing unused dockerfiles

* Adding gzip to logstash pipeline

* Adding gzip decompression to lambda

* Changing aws REGION variable name

* Cleanup commented code

* Adding environment variables for docker images versions

* Adding logstash version to .env

* Fixing minor issues in compose files

* Removing certs configuration

* Format YAML and Readme file from 3rd-party integrations

* Remove unused code

* Upgrade integrations to the latest Wazuh version

* Fic environment variable

* Remove unused code and fix ASL documentation

---------

Co-authored-by: Álex Ruiz <[email protected]>

* Fixing chown command (#347)

* Add Changelog for 4.9.0 (#364)

---------

Co-authored-by: Federico Gustavo Galland <[email protected]>

* Merge 4.9.1 into 4.9.2

---------

Co-authored-by: Federico Gustavo Galland <[email protected]>
AlexRuiz7 added a commit that referenced this pull request Sep 6, 2024
* Merge 4.9.0 into 4.9.1 (#376)

* Adding /var/run/wazuh-indexer to the list of ignored files (#339)

* Fix sysv files (#343)

* Change sysv script to reference opensearch script

* Correct permissions on sysv script

* Updating sysv service file permissions to match 4.8

* Moving logstash dockerfile and associated files to its own folder (#302)

* Moving logstash dockerfile and associated files to its own folder

* Removing unused context from logstash container in splunk compose

* Changing context in manager to splunk integration to newly created logstash folder

* Using common logstash container for Security Lake integration

* Removing unused dockerfiles

* Adding gzip to logstash pipeline

* Adding gzip decompression to lambda

* Changing aws REGION variable name

* Cleanup commented code

* Adding environment variables for docker images versions

* Adding logstash version to .env

* Fixing minor issues in compose files

* Removing certs configuration

* Format YAML and Readme file from 3rd-party integrations

* Remove unused code

* Upgrade integrations to the latest Wazuh version

* Fic environment variable

* Remove unused code and fix ASL documentation

---------

Co-authored-by: Álex Ruiz <[email protected]>

* Fixing chown command (#347)

* Add Changelog for 4.9.0 (#364)

---------

Co-authored-by: Federico Gustavo Galland <[email protected]>

* Merge 4.9.1 into 4.9.2

---------

Co-authored-by: Federico Gustavo Galland <[email protected]>
AlexRuiz7 added a commit that referenced this pull request Sep 6, 2024
* Merge 4.9.0 into 4.9.1 (#376)

* Adding /var/run/wazuh-indexer to the list of ignored files (#339)

* Fix sysv files (#343)

* Change sysv script to reference opensearch script

* Correct permissions on sysv script

* Updating sysv service file permissions to match 4.8

* Moving logstash dockerfile and associated files to its own folder (#302)

* Moving logstash dockerfile and associated files to its own folder

* Removing unused context from logstash container in splunk compose

* Changing context in manager to splunk integration to newly created logstash folder

* Using common logstash container for Security Lake integration

* Removing unused dockerfiles

* Adding gzip to logstash pipeline

* Adding gzip decompression to lambda

* Changing aws REGION variable name

* Cleanup commented code

* Adding environment variables for docker images versions

* Adding logstash version to .env

* Fixing minor issues in compose files

* Removing certs configuration

* Format YAML and Readme file from 3rd-party integrations

* Remove unused code

* Upgrade integrations to the latest Wazuh version

* Fic environment variable

* Remove unused code and fix ASL documentation

---------

Co-authored-by: Álex Ruiz <[email protected]>

* Fixing chown command (#347)

* Add Changelog for 4.9.0 (#364)

---------

Co-authored-by: Federico Gustavo Galland <[email protected]>

* Merge 4.9.1 into 4.9.2

---------

Co-authored-by: Federico Gustavo Galland <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Wazuh indexer error when used with service on rhel-based systems
2 participants