Score:0

Running Enterprise Search as a service

ธง bv

Elastic's Enterprise Search Installation Guide goes as far as starting the process locally - which is obviously not very stable.

When installed from a .deb or .rpm, a service is actually set up and ready to use but unfortunately, it doesn't seem to be working!?

When I start the service, all I can see is:

$ systemctl status enterprise-search

● enterprise-search.service - Elastic Enterprise Search
     Loaded: loaded (/lib/systemd/system/enterprise-search.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-07-10 15:26:17 UTC; 3s ago
       Docs: https://www.elastic.co/guide/en/enterprise-search/current/index.html
   Main PID: 9144 (java)
      Tasks: 19 (limit: 9536)
     Memory: 209.0M
     CGroup: /system.slice/enterprise-search.service
             └─9144 java -cp /usr/share/enterprise-search/lib/war/lib/jruby-stdlib-9.2.13.0.jar:/usr/share/enterprise-search/lib/war/lib/jruby-core-9.2.13.0-complete.jar -Djruby.cli.warning.level=NIL -Djava.a>

Jul 10 15:26:17 ip-172-31 systemd[1]: Started Elastic Enterprise Search.
Jul 10 15:26:17 ip-172-31 enterprise-search[9144]: Found java executable in PATH
Jul 10 15:26:18 ip-172-31 enterprise-search[9144]: Java version detected: 11.0.11 (major version: 11)
Jul 10 15:26:18 ip-172-31 enterprise-search[9144]: Enterprise Search is starting...
Jul 10 15:26:18 ip-172-31 enterprise-search[9144]: Logs can be found in the location configured via the 'log_directory' setting (typically /var/log/enterprise-search)

But the logs don't have any new entries and nothing's listening on the defined port. Whereas starting the search just as a normal process as

sudo /usr/share/enterprise-search/bin/enterprise-search

Works perfectly fine.

nohup is also not helpful, the process stops very shortly after it starts, exactly as seen in this post

I have added a comment to that thread but as it was already marked as solved I don't expect to see an answer. The solution provided did not work for me.

Any suggestions?

UPDATE

journalctl -u enterprise-search.service reveals that the service is currently failing due to permission issues to its own log.

e.g.

Jul 11 16:57:53 ip-172-31 enterprise-search[284346]: Unexpected exception while running Enterprise Search:
Jul 11 16:57:53 ip-172-31 enterprise-search[284346]: Error: Permission denied - /var/log/enterprise-search/stats.log at org/jruby/RubyIO.java:1237:in `sysopen'

Changing the owner to enterprise-search for the following:

app-server.log
connectors.log
filebeat
stats.log
system.log
worker.log

resolves the issue temporarily but it will resourface when the logs get rotated.

The initialisation now fails with:

enterprise-search[286929]: Unexpected exception while running Enterprise Search:
enterprise-search[286929]: NoMethodError: undefined method `join' for nil:NilClass
enterprise-search[286929]:     run! at /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:115
enterprise-search[286929]:   <main> at bin/enterprise-search-internal:15
systemd[1]: enterprise-search.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: enterprise-search.service: Failed with result 'exit-code'.

I'm guessing this will still be related to privileges but I'm a bit stuck as to what else I have to change. I also have no clue how to make sure that the logs stay with the enterprise-search user on rotation.

djdomi avatar
za flag
`ใช้งานอยู่: ใช้งานอยู่ (กำลังทำงาน) ` ดังนั้นบริการนี้ควรจะเปิดใช้งานอยู่
RekaB avatar
bv flag
มันควรจะ. แต่มันไม่ใช่
djdomi avatar
za flag
/var/log/enterprise-search ว่างเปล่า? หรือเป็นเหตุผลว่าทำไมคุณถึงซ่อนบันทึก? คุณลอง `/etc/init.d/elas... | tail -f /var/log/syslog` และคุณช่วยตัดสินใจได้ไหมว่าคุณใช้ระบบที่ใช้ reddit (RPM) หรือ debian (deb)
RekaB avatar
bv flag
ใช่ บันทึกว่างเปล่า บริการไม่เริ่มทำงาน การใช้ `journalctl -u enterprise-search.service` แสดงว่าบริการไม่สามารถเริ่มทำงานได้เนื่องจากไม่มีสิทธิ์สำหรับบันทึกของตัวเอง
djdomi avatar
za flag
ทำไมคุณไม่อัปเดตคำถามของคุณด้วยข้อมูลที่เกี่ยวข้องนี้
Score:0
ธง bv

ทางออกสุดท้ายสำหรับสิ่งนี้คือการอัปเดตคำถาม: เปลี่ยนเจ้าของไฟล์บันทึกเป็น ค้นหาองค์กร แก้ไขปัญหา ข้อผิดพลาดสุดท้ายที่กล่าวถึงข้างต้นเกี่ยวข้องกับ การค้นหาแบบยืดหยุ่น กระบวนการหยุดทำงานเป็น ค้นหาองค์กร กำลังเริ่มต้นขึ้น การรีบูตเซิร์ฟเวอร์ช่วยแก้ปัญหาทั้งหมดและทุกอย่างทำงานได้ดีในขณะนี้ บันทึกกำลังหมุนด้วย

โพสต์คำตอบ

คนส่วนใหญ่ไม่เข้าใจว่าการถามคำถามมากมายจะปลดล็อกการเรียนรู้และปรับปรุงความสัมพันธ์ระหว่างบุคคล ตัวอย่างเช่น ในการศึกษาของ Alison แม้ว่าผู้คนจะจำได้อย่างแม่นยำว่ามีคำถามกี่ข้อที่ถูกถามในการสนทนา แต่พวกเขาไม่เข้าใจความเชื่อมโยงระหว่างคำถามและความชอบ จากการศึกษาทั้ง 4 เรื่องที่ผู้เข้าร่วมมีส่วนร่วมในการสนทนาด้วยตนเองหรืออ่านบันทึกการสนทนาของผู้อื่น ผู้คนมักไม่ตระหนักว่าการถามคำถามจะมีอิทธิพลหรือมีอิทธิพลต่อระดับมิตรภาพระหว่างผู้สนทนา