Code Monkey home page Code Monkey logo

Comments (13)

Jeroen0494 avatar Jeroen0494 commented on June 5, 2024

This is correct, you need to type in "INIT" to manually confirm to wipe the database. This is done by Moloch on purpose so you don't accidentally wipe your database.

from selks-scripts.

Jeroen0494 avatar Jeroen0494 commented on June 5, 2024

On line 40 of the Moloch setup script you could do something like this:
yes INIT | /data/moloch/db/db.pl http://localhost:9200 init
I don't have a system to test it out on though, I'm not claiming this actually works and I shan't be responsible for the consequences...

from selks-scripts.

pevma avatar pevma commented on June 5, 2024

Nope - in my case it does not as - just hangs there - see screenshot below:

screenshot from 2018-11-30 13-30-13

from selks-scripts.

Jeroen0494 avatar Jeroen0494 commented on June 5, 2024

That particular step always takes a while for me to if I have a lot of data in Elasticsearch, but it would never just 'hang'. Could you make the script more verbose by adding "set -x" to the top?

from selks-scripts.

pevma avatar pevma commented on June 5, 2024

Ya - ok - so I experience the same, if there is data in ES it wait there a lot. Not sure why?

from selks-scripts.

Jeroen0494 avatar Jeroen0494 commented on June 5, 2024

So after waiting long enough, the command does complete? I don't see you typing 'INIT' in the screenshot above, does this command actually execute?

The init command wipes all Moloch data in Elasticsearch via the API, including indexed PCAP files. If you have a lot of network traffic (and a lot of Elasticsearch data) this command takes a while. It also wipes the user database.

from selks-scripts.

pevma avatar pevma commented on June 5, 2024

Yes - on both points. It just it takes while to come to the question of "type INIT" - the end user may keep wondering what is happening....

from selks-scripts.

Jeroen0494 avatar Jeroen0494 commented on June 5, 2024

Hmm, that is weird. If I run the script as-is on a working system the question for INIT comes up immediately. And I have never experienced extreme slowness before that question comes up. My only thought would be the timeout in the curl command in the if-statement.

Moloch checks the status of Elasticsearch too, btw. So maybe you can even remove the curl, because this would mean double the waiting time.

from selks-scripts.

pevma avatar pevma commented on June 5, 2024

That first curl check - comes out very fast - no wait time it just returns if ES is up or not, so i doubt it is because of it.
Ok then it is probably because of my VM set up maybe - if no one else experiences it ...

from selks-scripts.

Jeroen0494 avatar Jeroen0494 commented on June 5, 2024

Hi Peter,

So I ran the first-time-setup script on an already configured system for some testing and it just hung there until I typed INIT, but it never asked for me to type it. Somehow the moloch init script doesn't forward it's output to the current terminal session, making it seem like the script froze.
I'm off for the holidays but maybe this gives you some more information for testing in the meantime.

Jeroen

from selks-scripts.

pevma avatar pevma commented on June 5, 2024

ok.
Thanks for the follow up.
I think this should be fixed by - 2914453

from selks-scripts.

Jeroen0494 avatar Jeroen0494 commented on June 5, 2024

Hi Peter,

Can this issue be closed?

from selks-scripts.

pevma avatar pevma commented on June 5, 2024

from selks-scripts.

Related Issues (3)

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.