Coder Social home page Coder Social logo

Comments (4)

ekorolevanyrun avatar ekorolevanyrun commented on June 16, 2024

I noticed that there was used ursadb backend as a container from dockerhub image, which is updated 2 years ago. I build ursadb image from source code, however it doesn't work anyway. I got the same error:

web_1      | INFO:     172.21.0.1:38738 - "POST /api/query HTTP/1.1" 200 OK
daemon1_1  | [12/04/2022 06:03:49][INFO] search: MOCE25RFYVF3
daemon1_1  | [12/04/2022 06:03:49][INFO] Parsing...
daemon1_1  | [12/04/2022 06:03:49][INFO] New job, generate subtasks...
ursadb1_1  | [2022-04-12 06:03:49.558] [info] TASK: start [11]: topology;
ursadb1_1  | [2022-04-12 06:03:49.558] [info] TASK: done [11] (in 1ms)
daemon1_1  | [12/04/2022 06:03:49][INFO] Get next dataset to query...
web_1      | INFO:     172.21.0.1:38738 - "GET /api/job/MOCE25RFYVF3 HTTP/1.1" 200 OK
daemon1_1  | [12/04/2022 06:03:49][INFO] Querying backend...
ursadb1_1  | [2022-04-12 06:03:49.602] [info] TASK: start [12]: select with datasets ["10334e1a"] into iterator (((min 1 of ({457863657074696f6e}))));
ursadb1_1  | [2022-04-12 06:03:49.604] [info] TASK: done [12] (in 2ms)
ursadb1_1  | [2022-04-12 06:03:49.604] [info] CHANGE: NEW_ITERATOR itermeta.af3e1247.db.ursa
ursadb1_1  | [2022-04-12 06:03:49.604] [info] LOAD: itermeta.af3e1247.db.ursa
ursadb1_1  | [2022-04-12 06:03:49.605] [info] SAVE: db.ursa
daemon1_1  | [12/04/2022 06:03:49][INFO] Iterator af3e1247 contains 36 files
daemon1_1  | [12/04/2022 06:03:49][INFO] search: MOCE25RFYVF3
daemon1_1  | [12/04/2022 06:03:49][INFO] Parsing...
daemon1_1  | [12/04/2022 06:03:49][INFO] Get next dataset to query...
daemon1_1  | [12/04/2022 06:03:49][INFO] Nothing to query, returning...
daemon2_1  | [12/04/2022 06:03:49][INFO] yara: iterator af3e1247
ursadb2_1  | [2022-04-12 06:03:49.612] [info] LOCK: af3e1247
ursadb2_1  | [2022-04-12 06:03:49.612] [info] TASK: start [20]: iterator "af3e1247" pop 10;
ursadb2_1  | [2022-04-12 06:03:49.613] [error] Task 20 failed: tried to read non-existent iterator
ursadb2_1  | [2022-04-12 06:03:49.613] [info] TASK: done [20] (in 0ms)
web_1      | INFO:     172.21.0.1:38738 - "GET /api/matches/MOCE25RFYVF3?offset=0&limit=20 HTTP/1.1" 200 OK
web_1      | INFO:     172.21.0.1:38738 - "GET /api/matches/MOCE25RFYVF3?offset=0&limit=20 HTTP/1.1" 200 OK

Separated logs from all containers

web

web_1      | INFO:     172.21.0.1:38738 - "POST /api/query HTTP/1.1" 200 OK
web_1      | INFO:     172.21.0.1:38738 - "GET /api/job/MOCE25RFYVF3 HTTP/1.1" 200 OK
web_1      | INFO:     172.21.0.1:38738 - "GET /api/matches/MOCE25RFYVF3?offset=0&limit=20 HTTP/1.1" 200 OK
web_1      | INFO:     172.21.0.1:38738 - "GET /api/matches/MOCE25RFYVF3?offset=0&limit=20 HTTP/1.1" 200 OK

daemon1

daemon1_1  | [12/04/2022 06:03:49][INFO] search: MOCE25RFYVF3
daemon1_1  | [12/04/2022 06:03:49][INFO] Parsing...
daemon1_1  | [12/04/2022 06:03:49][INFO] New job, generate subtasks...
daemon1_1  | [12/04/2022 06:03:49][INFO] Get next dataset to query...
daemon1_1  | [12/04/2022 06:03:49][INFO] Querying backend...
daemon1_1  | [12/04/2022 06:03:49][INFO] Iterator af3e1247 contains 36 files
daemon1_1  | [12/04/2022 06:03:49][INFO] search: MOCE25RFYVF3
daemon1_1  | [12/04/2022 06:03:49][INFO] Parsing...
daemon1_1  | [12/04/2022 06:03:49][INFO] Get next dataset to query...
daemon1_1  | [12/04/2022 06:03:49][INFO] Nothing to query, returning...

ursadb1

ursadb1_1  | [2022-04-12 06:03:49.558] [info] TASK: start [11]: topology;
ursadb1_1  | [2022-04-12 06:03:49.558] [info] TASK: done [11] (in 1ms)
ursadb1_1  | [2022-04-12 06:03:49.602] [info] TASK: start [12]: select with datasets ["10334e1a"] into iterator (((min 1 of ({457863657074696f6e}))));
ursadb1_1  | [2022-04-12 06:03:49.604] [info] TASK: done [12] (in 2ms)
ursadb1_1  | [2022-04-12 06:03:49.604] [info] CHANGE: NEW_ITERATOR itermeta.af3e1247.db.ursa
ursadb1_1  | [2022-04-12 06:03:49.604] [info] LOAD: itermeta.af3e1247.db.ursa
ursadb1_1  | [2022-04-12 06:03:49.605] [info] SAVE: db.ursa

daemon2

daemon2_1  | [12/04/2022 06:03:49][INFO] yara: iterator af3e1247

ursadb2

ursadb2_1  | [2022-04-12 06:03:49.612] [info] LOCK: af3e1247
ursadb2_1  | [2022-04-12 06:03:49.612] [info] TASK: start [20]: iterator "af3e1247" pop 10;
ursadb2_1  | [2022-04-12 06:03:49.613] [error] Task 20 failed: tried to read non-existent iterator
ursadb2_1  | [2022-04-12 06:03:49.613] [info] TASK: done [20] (in 0ms)

from mquery.

ekorolevanyrun avatar ekorolevanyrun commented on June 16, 2024

UPD:

I found out that there is a possibility to add argument to daemon.Dockerfile ENTRYPOINT, that argument is name of a daemons group. That separates daemon's data and make process works smoother

The next step I got an obstacle: task is never finishes. Look at this condition. Function self.db.agent_finish_task() called only once for the daemon which finishes last. For the least daemons job.total_files is never equal job.files_processed.

I forked the repository and add some adjustments to make parallel daemons work, may be it will help: #271

from mquery.

ekorolevanyrun avatar ekorolevanyrun commented on June 16, 2024

There are another bug: the same query yara rule results with different number of matches (running 24 daemons with 24 ursadb backends)
image

(Note that there are different matches number, but queries are the same).

That bug is reproduced even wihout my last PR fixes

from mquery.

williballenthin avatar williballenthin commented on June 16, 2024

I've experienced similar inconsistencies with the number of results returned across clusters of ursadb instances. Haven't had a chance to triage yet, unfortunately.

from mquery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.