TritonDataCenter / manta-thoth

Thoth is a Manta-based system for core and crash dump management
16 stars 7 forks source link

"thoth init" should be documented #151

Closed jussisallinen closed 6 years ago

jussisallinen commented 6 years ago

I was trying to use thoth on my local machine but I was hit by this:

$ thoth init
thoth: using database at localhost:28015 (configured from source)
thoth: couldn't connect to database: Could not connect to localhost:28015.
connect ECONNREFUSED 127.0.0.1:28015

Didn't find anything on that one in the Github README. Should thoth init work and initialize a database? Should the database run where? (Localhost, in Manta under $MANTA_USER?)

https://github.com/joyent/manta-thoth/issues/124 This seems to be related somehow?

jussisallinen commented 6 years ago

I'm able to push dump into Manta but that's about it:

$ thoth info 6fd665e410764faad2dd1cb212fe3b53
thoth: using database at localhost:28015 (configured from source)
{
    "name": "/jussi/stor/thoth/6fd665e410764faad2dd1cb212fe3b53",
    "dump": "/jussi/stor/thoth/6fd665e410764faad2dd1cb212fe3b53/core.apache2.52090",
    "pid": "52090",
    "cmd": "apache2",
    "psargs": "/usr/sbin/apache2 -k start",
    "platform": "joyent_20170928T144216Z",
    "node": "1c9d4324-3e6a-481f-c665-c6fb9209ca06",
    "version": "1",
    "time": 1509559879,
    "stack": [
        "0x7ffff7e6f44e()",
        "0xf7df322900000000()"
    ],
    "type": "core",
    "properties": {}
}
$ thoth ls
thoth: using database at localhost:28015 (configured from source)
thoth: couldn't connect to database: Could not connect to localhost:28015.
connect ECONNREFUSED 127.0.0.1:28015
jussisallinen commented 6 years ago

Just realized I had to install RethinkDB:

thoth: using database at localhost:28015 (configured from source) thoth: couldn't connect to database: Server dropped connection with message: "ERROR: Incorrect authorization key."

Seems I need to study some RethinkDB then!

bcantrill commented 6 years ago

I am so sorry for all this -- thoth is badly in need of some love! Yes, RethinkDB is required, and yes, it needs to be much more thoroughly documented! My apologies again, my thanks for your interest in thoth, and my promise to make it better -- if not today, then someday!

On Tue, Nov 7, 2017 at 11:46 AM, Jussi Sallinen notifications@github.com wrote:

Just realized I had to install RethinkDB:

thoth: using database at localhost:28015 (configured from source) thoth: couldn't connect to database: Server dropped connection with message: "ERROR: Incorrect authorization key."

Seems I need to study some RethinkDB then!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/joyent/manta-thoth/issues/151#issuecomment-342599992, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUDpnBRs0clLQVPTaVGCrPAz6lJVdRoks5s0LOYgaJpZM4QQOTi .

coyhile commented 6 years ago

@bcantrill What, specifically, do you see it needing? Something needs to give me reason to learn more node.js (and, really, more javascript in general.) If I'm going to dive in, why not dive in head first to chummed waters full of great whites? ;)

jussisallinen commented 6 years ago

Was able to init thoth after setting authKey (Admin Password) to RethinkDB but most of the things don't work, ie. debug:

$ thoth debug 6fd665e410764faad2dd1cb212fe3b53
thoth: using database at localhost:28015 (configured from source)
thoth: debugging 6fd665e410764faad2dd1cb212fe3b53
thoth: DirectoryDoesNotExistError: /jussi/stor/thoth/analyzers does not exist
    at ClientRequest.onResponse (/usr/local/lib/node_modules/manta-thoth/node_modules/restify-clients/lib/HttpClient.js:217:26)
    at Object.onceWrapper (events.js:314:30)
    at emitOne (events.js:115:13)
    at ClientRequest.emit (events.js:210:7)
    at HTTPParser.parserOnIncomingClient (_http_client.js:549:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
    at TLSSocket.socketOnData (_http_client.js:438:20)
    at emitOne (events.js:115:13)
    at TLSSocket.emit (events.js:210:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at TLSSocket.Readable.push (_stream_readable.js:208:10)
    at TLSWrap.onread (net.js:597:20)

So little bit of documentation for "standalone user" usage might be in place :)

Got little bit further by adding single analyzer:

$ thoth analyzer OS-2359-stacks < stacks.sh
thoth: using database at localhost:28015 (configured from source)
thoth: reading analyzer 'OS-2359-stacks' from stdin
thoth: added analyzer 'OS-2359-stacks'

$ thoth debug 6fd665e410764faad2dd1cb212fe3b53
thoth: using database at localhost:28015 (configured from source)
thoth: debugging 6fd665e410764faad2dd1cb212fe3b53
 * created interactive job -- 8ed37ed4-dd91-c80f-a40e-8febeeb6630b
 * waiting for session... -

 * Error during job run; please check errors.
\

 * IN-JOB ERROR: TaskInitError: failed to dispatch task: first of 1 error: error retrieving asset "/thoth/public/assets/thoth.tar.gz" (status code 403)
 * cleaning up resources...
thoth: debugger exited with code 0

So it sure seems I'll just need to bite the bullet and install thoth to my Triton installation to get further.

bcantrill commented 6 years ago

So, a good chunk of this is a documentation issue -- thoth init itself needs to be documented, with apologies for not having done this in the first place!