Disabled registration and now there is no login page...


  • @UnknownGeek To settle anything you're not sure on, sounds like it could be an issue with master of NodeBB and openshift. Creating an admin is done at the setup part. Local login is not disabled by default. It seems like a database issue, but I've never used Openshift, so I can't be sure.

    Can you try port 8000, someone reported that's the only port websockets work on. Also try the auth in the config, found in this post


  • I just went with the docs using redis, I'll try using mongodb next. Not sure that websockets would be the issue normally the bindings go from port 80 to backend 8080 It seemed more like the scripts weren't set up to create an admin anyway. I went through the repo and walked myself through the javascript, didn't look like there was anything that had to do with creating an admin account if it was missing. Though I can't say I know nodebb at the core level.

    I do know that nodejs would have websockets and http enabled on that port though:
    https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-nodejs/metadata/manifest.yml

  • NodeBB

    Admin creation happens here.


  • Straight to the heart of the issue, though looking at it now I'm not sure why that wasn't part of the prompts I got, looks like it would've had to have double checked to make sure an admin exists. Maybe when using the redis database there's already an admin user? After I typed the redis password the script ended, and it definitely saved the config.json, I had to crack it open to copy over the password because I got it wrong. Seemed like after a restart nodebb was up and running.

  • NodeBB

    If you have access to the redis instance you can flush and start over.

    redis-cli
    select <db number>
    flushdb
    

    Then start over with the setup.

    Alternative you can check if there is an admin group and it has members by.

    redis-cli
    smembers group:administrators:members
    

  • If I don't get a mongodb instance running properly I'll try doing a redis install again. If it seems to be a repeat problem I'll see if emptying the database doesn't help, may be a good idea to add to the docs just in case though.


  • @UnknownGeek said:

    If I don't get a mongodb instance running properly I'll try doing a redis install again. If it seems to be a repeat problem I'll see if emptying the database doesn't help, may be a good idea to add to the docs just in case though.

    Docs could do with a lick of paint. Certain things aren't included, docs are quite developer focussed at the minute. 😆


  • Tried going about connecting to redis, yet to figure out how. It just seems odd that the logins I made were definitely kept (after clearing my cache they still show up). (Nodebb has access but I don't?) I also read in other parts of the forums that the first user logged in is supposed to be made an admin with access to the /admin route, but that didn't seem to the case when I did a fresh install. The only thing I can imagine is that there's an admin user already preconfigured in the database and it skips some parts of some important nodebb configuration.


  • Had issue with my install and redis flush definitely helped (warning: I did the flushall since I didn't have anything else using it). This allowed me to go back and do the setup again which then generated the admin user to login and configure the settings.


  • How'd you connect to redis? I found I kept getting warnings that I couldn't be connected.


  • @UnknownGeek said:

    How'd you connect to redis? I found I kept getting warnings that I couldn't be connected.

    What version of Redis are you running? Sorry, don't know the command on openshift. 😆


  • @a_5mith said:

    What version of Redis are you running? Sorry, don't know the command on openshift. 😆

    https://github.com/smarterclayton/openshift-redis-cart/tree/master/versions/2.6/bin

    Figured it out, combining the redis-cli command with the $REDIS_CLI environment variable, I'll see if doing a flush all doesn't help. Feeling a little silly I didn't notice...they did that on purpose.

    redis-cli $REDIS_CLI


  • Got it running, admin was created, as were discussion threads (looks good so far), but the login page is still missing, or I think it shouldn't be, it looks like it's trying to output the login form but instead it's spitting out:
    [object Object]

    Registration still works, which I find odd.


  • @UnknownGeek Anything in logs/output.log? (As ./nodebb log probably wouldn't work in openshift)


  • Looks like the server just needed one last restart. I think it's properly setup now.

    Yeap! Got into the admin panel, looks like I've got it to work on Openshift! I think the docs are being updated. If you're more the developer type take a crack at it, you'll have your own NodeBB.

    All's good 🙂 Thanks @baris

Suggested Topics

| |