[SOLVED] No URL in config |CouchDB|

  1. 7 years ago
    Edited 7 years ago by MrXdeposher

    Hello, I know that it's specifically stated on the wiki that local DB won't get any support, but I'd really hope that some of you could help me anyways. I've followed this tutorial : . I've done all the steps and filled in the alive.cfg with by "url" aka. localhost:5984, but in the @ALiVEServer logs it says that there's "No URL in config".

    Here's my alive.cfg
    JSON,[Here'smyUsername],[Here'smyPassword],{MyTag],localhost:5984
    I've checked that my tag is authorized.

    This is a raw excerpt from my log, I censored my username, tag and password.
    [2016-12-04 20:00:10] [info] Reading 'alive.cfg'
    [2016-12-04 20:00:10] [info] Configuration found: C:\Users\Censored\AppData\Local\ALiVE\alive.cfg
    [2016-12-04 20:00:10] [info] No URL in config. Using default.
    [2016-12-04 20:00:10] [info] Configuration 'alive.cfg' read OK.
    [2016-12-04 20:00:10] [debug] Alive Config:
    [2016-12-04 20:00:10] [debug] Type: JSON
    [2016-12-04 20:00:10] [debug] User: [CENSORED]
    [2016-12-04 20:00:10] [debug] Pass: xxxxxxxxxxxxxxxx
    [2016-12-04 20:00:10] [debug] Group: [CENSORED]
    [2016-12-04 20:00:10] [debug] URL: http://db.alivemod.com:5984
    [2016-12-04 20:00:10] [info] Checking WarRoom access...
    [2016-12-04 20:00:10] [info] URL: http://alivemod.com/api/authorise?&group=*Censored*
    [2016-12-04 20:00:10] [info] WarRoom access granted.
    [2016-12-04 20:00:10] [info] Checking DB access...
    [2016-12-04 20:00:11] [error] ###### HandleMessage - StartALiVE ######
    [2016-12-04 20:00:11] [error] Error: Unable to connect to DB
    [2016-12-04 20:00:11] [error] RAW: StartALiVE ['true']
    [2016-12-04 20:00:11] [debug] Return value [['StartALiVE','ERROR','Unable to connect to DB']]
    [2016-12-04 20:00:11] [debug] |/-\ Elapsed time: 620.095ms

    I'd really appreciate any help that I could get on this matter.

  2. Edited 7 years ago by marceldev89

    No experience with it but check https://github.com/ALiVEOS/ALiVE.OS/wiki/Setting-Up-a-local-DB-instance-(DEV-ONLY)

    No further support beyond the link. :)

    EDIT: Oh crap... missed the link above... :/

  3. Tupolov

    4 Dec 2016 Administrator
    Edited 7 years ago by Tupolov

    You need to use a URL not a hostname

    i.e http://localhost:5984

    not

    localhost:5984

  4. This is my current alive.cfg JSON,admin,admin,*CENSORED*,http://localhost:5984 , and it still gives me the "No URL in config". But I did however find a sort of a fix for this. I'll state that under this log from: aliveplugin_2016-12-05_21-00.txt

    [2016-12-05 21:00:06] [info] ALiVEPlugIn v2.1a-
    [2016-12-05 21:00:06] [debug] >>> ParseMessage [StartALiVE ['true']]
    [2016-12-05 21:00:06] [debug]     Function: StartALiVE
    [2016-12-05 21:00:06] [debug]     Params:
    [2016-12-05 21:00:06] [debug]             - [true]
    [2016-12-05 21:00:06] [info]     Disable Performance Monitor: true
    [2016-12-05 21:00:06] [info]     Reading 'alive.cfg'
    [2016-12-05 21:00:06] [info]     Configuration found: C:\Users\*CENSORED*\AppData\Local\ALiVE\alive.cfg
    [2016-12-05 21:00:06] [info]     No URL in config. Using default.
    [2016-12-05 21:00:06] [info]     Configuration 'alive.cfg' read OK.
    [2016-12-05 21:00:06] [debug]     Alive Config:
    [2016-12-05 21:00:06] [debug]         Type:  JSON
    [2016-12-05 21:00:06] [debug]         User:  admin
    [2016-12-05 21:00:06] [debug]         Pass:  xxxxxxxxxxxxxxxx
    [2016-12-05 21:00:06] [debug]         Group: *CENSORED*
    [2016-12-05 21:00:06] [debug]         URL:   http://db.alivemod.com:5984
    [2016-12-05 21:00:06] [info]     Checking WarRoom access...
    [2016-12-05 21:00:06] [info]     URL: http://alivemod.com/api/authorise?&group=*CENSORED*
    [2016-12-05 21:00:06] [info]         WarRoom access granted.
    [2016-12-05 21:00:06] [info]     Checking DB access...
    [2016-12-05 21:00:06] [error] ###### HandleMessage - StartALiVE ######
    [2016-12-05 21:00:06] [error]     Error: Unable to connect to DB
    [2016-12-05 21:00:06] [error]     RAW:   StartALiVE ['true']
    [2016-12-05 21:00:06] [debug]     Return value [['StartALiVE','ERROR','Unable to connect to DB']]
    [2016-12-05 21:00:06] [debug] |/-\ Elapsed time: 298.286ms
    [2016-12-05 21:00:06] [debug] >>> ParseMessage [GroupName]
    [2016-12-05 21:00:06] [debug]     Function: GroupName
    [2016-12-05 21:00:06] [debug]     Params:
    [2016-12-05 21:00:06] [warning] ALiVE not initialized yet!
    [2016-12-05 21:00:06] [info]     GroupName: *CENSORED*
    [2016-12-05 21:00:06] [debug]     Return value [['*CENSORED*']]
    [2016-12-05 21:00:06] [debug] |/-\ Elapsed time: 0.501ms
    [2016-12-05 21:00:06] [debug] >>> ParseMessage [SendJSON ['GET','sys_data/config','']]
    [2016-12-05 21:00:06] [debug]     Function: SendJSON
    [2016-12-05 21:00:06] [debug]     Params:
    [2016-12-05 21:00:06] [debug]             - [GET]
    [2016-12-05 21:00:06] [debug]             - [sys_data/config]
    [2016-12-05 21:00:06] [debug]             - []
    [2016-12-05 21:00:06] [warning] ALiVE not initialized yet!
    [2016-12-05 21:00:07] [debug]     Return value [['{"error":"unauthorized","reason":"Name or password is incorrect."}
    ']]
    [2016-12-05 21:00:07] [debug] |/-\ Elapsed time: 341.828ms

    What I did, which did result in a successful connection to the DB was to edit my host file.
    -image-

    Now when I enter either localhost:5984 or db.alivemod.com I come to this site.
    -image-

    I've also managed to set up my db and make ALiVE connect to it and even post to it, as shown here
    -image-

    Here's also how my log looks like now
    -image-

    TL;DR
    I changed db.alivemod.com to route to 127.0.0.1 in my hosts file.

    But now a new error has occurred. When I save the game, it pushes data to the DB, but when I start up the mission again, the green squares that once was cleared, now has to be cleared yet again. Any tips on this?.

  5. Did you enable persistence for the C2ISTAR module? (not sure if there's an option for it though)

  6. @marceldev89 Did you enable persistence for the C2ISTAR module? (not sure if there's an option for it though)

    Well, there's not an option called persistent, but there is one called persistent tasks. It's enabled, and I guess it does roughly the same thing.

  7. TRACE doesn't have persistence, I guess you'll have to visit the places again for them to turn green. It might also be updated over time without going there but that's an unknown atm.

  8. So everytime I turn off my server, and then back on again, we have to clear all the sector and fight our way into the center of the map, everytime? So we can't just save and start off where we let go last time?

  9. Don't know really, never played with TRACE but if you've cleared it it's most likely still cleared. It's just not shown with the TRACE system.

  10. Just the color of the TRACE squares doesn't persist. I have a feature request ticket open for that BTW: https://github.com/ALiVEOS/ALiVE.OS/issues/113

    But enemy position and occupation absolutely should be persisting. If it's not, please report.

  11. Ok, thanks for all the help :) ALiVE has an awesome and really responsive community. I'll mark this as solved, so I won't cause more confusion. Thanks again.

    Cheers
    Xdeposh

  12. Tupolov

    5 Dec 2016 Administrator

    Thanks found a bug in the plugin that doesn't read the URL param :(

  13. LOL, was struggling with this myself tonight. I'll do the hosts edit till plugin gets corrected.

    Thanks
    Eric

  14. Tupolov

    6 Dec 2016 Administrator
    Edited 7 years ago by Tupolov

    Got a test version of the plugin for you

    Should pick up the URL

    Backup your old DLL :)

  15. Tupolov

    6 Dec 2016 Administrator
    [2016-12-06 14:56:33] [info]     Reading 'alive.cfg'
    [2016-12-06 14:56:33] [info]     Configuration found: C:\Users\Matt\AppData\Local\ALiVE\alive.cfg
    [2016-12-06 14:56:33] [info]     Configuration 'alive.cfg' read OK.
    [2016-12-06 14:56:33] [debug]     Alive Config:
    [2016-12-06 14:56:33] [debug]         Type:  JSON
    [2016-12-06 14:56:33] [debug]         User:  xxxxxxxxxxxxxxxxxx
    [2016-12-06 14:56:33] [debug]         Pass:  xxxxxxxxxxxxxxxx
    [2016-12-06 14:56:33] [debug]         Group: NSG
    [2016-12-06 14:56:33] [debug]         URL:   http://db.alivemod.com:5984
    [2016-12-06 14:56:33] [info]     Checking WarRoom access...
    [2016-12-06 14:56:33] [info]     URL: http://alivemod.com/api/authorise?&group=NSG
    [2016-12-06 14:56:33] [info]         WarRoom access granted.
    [2016-12-06 14:56:33] [info]     Checking DB access...
    [2016-12-06 14:56:34] [info]         DB access granted.
    [2016-12-06 14:56:34] [info]     ALiVE successfully initialized.
  16. The new .dll file is working now, thanks.

    -image-

    [2016-12-06 16:46:24] [info] ALiVEPlugIn v2.1a-
    [2016-12-06 16:46:24] [debug] >>> ParseMessage [StartALiVE ['true']]
    [2016-12-06 16:46:24] [debug]     Function: StartALiVE
    [2016-12-06 16:46:24] [debug]     Params:
    [2016-12-06 16:46:24] [debug]             - [true]
    [2016-12-06 16:46:24] [info]     Disable Performance Monitor: true
    [2016-12-06 16:46:24] [info]     Reading 'alive.cfg'
    [2016-12-06 16:46:24] [info]     Configuration found: C:\Users\*Censored*\AppData\Local\ALiVE\alive.cfg
    [2016-12-06 16:46:24] [info]     Configuration 'alive.cfg' read OK.
    [2016-12-06 16:46:24] [debug]     Alive Config:
    [2016-12-06 16:46:24] [debug]         Type:  JSON
    [2016-12-06 16:46:24] [debug]         User:  admin
    [2016-12-06 16:46:24] [debug]         Pass:  xxxxxxxxxxxxxxxx
    [2016-12-06 16:46:24] [debug]         Group: *Censored*
    [2016-12-06 16:46:24] [debug]         URL:   http://localhost:5984
    [2016-12-06 16:46:24] [info]     Checking DB access...
    [2016-12-06 16:46:24] [info]         DB access granted.
    [2016-12-06 16:46:24] [info]     ALiVE successfully initialized.
  17. Tupolov

    6 Dec 2016 Administrator

    Awesome, you are breaking new ground so keep us abreast of how it goes :)

  18. So been playing for a few days, and persistence is now functional, and it both posts and gets from the database.

 

or Sign Up to reply!