-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't seem to create new profile #195
Comments
Never mind - managed to get past that bit by doing a symlink:
However, I now get another error (and I can't find anything on google about it);
|
Ok - so I got past that step. The problem was that I was running an incomplete install (it had a sub-folder inside it, that was a duplicate) So now I have that going - I'm trying to access the admin panel. For some reason I just get a blank page:
I have it running:
|
For the blank page, do you have any logs/errors in the chrome inspector ? |
Hi, Thanks for the reply, I sure do - a ton of them:
My config file looks like:
Does that look OK? It appears the paths are missing /oauth from them: https://mydomain.net/libs/bootstrap-3.1.1/js/bootstrap.js ..but if I manually try and load this file, it just loads the blank admin page again: https://mydomain.net/oauth/libs/bootstrap-3.1.1/js/bootstrap.js Thanks! |
This kind of issue is often due to a configuration mistake.
We advise to use oauthd on a subdomain at the root, e.g. https://oauth.mysite.net/ or setup the mounted url (/oauth) behind a reverse proxy on nginx or apache (in which case the You also have an issue with the port and host_url that does not match (either use port 443 or host_url like |
Thanks. I'm actually on a reverse proxy with nginx, so I have this in my nginx config:
Then this in config.local.js:
Are you suggesting something more like:
I tried that, but I get an error:
Not too sure what that is telling me though :) Cheers Andy |
i guess you can just use
Edit: i m not sure there's a base mount for the current front, i ll check it but this should be easier with a subdomain to keep the root path |
hm after more check, we discovered it wasn't working with custom path like So, currently, |
Thanks. That seems to work :) It took a bit of configuring, as I had to re-create our SSL certificates using LetsEncrypt (as it was obviously a new sub-domain). It all loads OK now though The next question, is how I get it running as a service? This works:
But it just sits there telling me its running. How do I tell it to run as a background server? I also have a little bash script I wrote, which checks nginx/mysql/solr etc are running. Any suggestions on how to also check for the oauthd process running? Thanks :)
|
I did not fully tested this script but you can #!/bin/sh
### BEGIN INIT INFO
# Provides: oauthd
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the oauthd server
# Description: starts oauthd using forever
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/nginx
NAME=oauthd
DESC=oauthd
INSTANCE=/home/myinstance
OAUTHD=/usr/local/lib/node_modules/oauthd/cli/index.js
case "$1" in
start)
cd $INSTANCE && forever start -l forever.log -a -o out.log -e err.log --minUptime 3000 --spinSleepTime 5000 $OAUTHD
;;
stop)
cd $INSTANCE && forever stop $OAUTHD
;;
restart)
cd $INSTANCE && forever restart -l forever.log -a -o out.log -e err.log --minUptime 3000 --spinSleepTime 5000 --killSignal=SIGUSR2 $OAUTHD || forever start -l forever.log -a -o out.log -e err.log --minUptime 3000 --spinSleepTime 5000 $OAUTHD
;;
status)
forever list
;;
reload|force-reload)
echo "Use $NAME restart instead" >&2
exit 3
;;
*)
echo "Usage: $NAME {start|stop|restart|reload|force-reload|status}" >&2
exit 3
;;
esac |
Hi, Sorry for the late reply. Paid jobs took over, and I didn't feel like doing any bits on my own stuff after a long day :) I tried installing
I did find this post: foreversd/forever#788 My NPM version is coming up as 1.4.21 ... maybe thats too old? I only installed it using apt-get:
I then set that script up in /etc/init.d/oauthd , with the contents:
...and then trying to start it with:
I get an error though:
Am I missing something? This is the first time I've created a daemon script before, so its possible I'm being dumb :) BTW, Merry Christmas to you and your family. Thanks for everything you all do on this awesome project 👍 |
I used the old way where you can run it directly with (sudo) |
Thanks. Doesn't seem to want to work for me though?
I double checked, and /etc/init.d/oauthd is where the file is :/ |
maybe |
Ah, that was it :) It appears that "forever" didn't install correctly though:
It seems to be installed though:
Not quite sure what to make of that! |
that was for a global install on my machine but it can be different on yours.
(thinking at it, maybe that's only missing "bin" in your path ( |
Ahhh that was it ! I now get:
Unfortunately, I don't seem to be able to access the admin area (or any other functions) ... almost like its not running. Is there a way to check which ones are currently running? Thanks! |
You can either check logs (~/.forever/forever.log by default and out.log / err.log) or run Did you configure the redis server and had no error when creating the instance ? (https://github.com/oauth-io/oauthd/wiki/Quickstart) |
It all boots up fine when running it manually: root@steampunklinode:~# cd /root/steampunkjunkies/ && oauthd start I can then access the web-admin section. The log file has something interesting, but I'm not really sure what it means :)
|
Ah, my bad, i adapted from another script and forgot the ...
case "$1" in
start)
cd $INSTANCE && forever start -l forever.log -a -o out.log -e err.log --minUptime 3000 --spinSleepTime 5000 $OAUTHD start
;;
... |
Hi, We are getting there :) That now boots, but in out.log, I get:
(the admin panel also doesn't load) Cheers Andy |
Did you change config.js since your test with |
Yeah - I tweaked it to:
That looks ok though, doesn't it? Also, the fact it also boots up fine when I do:
BTW, just noticed a typo in the comment:
I'm assuming thats in the dist version? :) |
Indeed that looks fine... I ll do some tries a little later, until then you can also try with |
Yay - that seems to have done it :) For anyone reading this at a later time, I changed:
to:
Then spun it up using:
I'm not sure why the other command failed, but it seems good now Thanks for sticking at it 🥇 |
Glad that you finally made it works 👍 |
I'm coming back to this post again, as I'm moving servers. I'm trying to get it going with: nano /etc/init.d/oauthd Contents are:
I then run it with:
but in forever.log, I get:
I added some debugging in, and its running this process:
When I run that manually I get:
If I try and start it manually it works ok:
The directory looks like:
I assume I'm calling the right index.js? I can't work out why the "forever" version won't work. Any ideas? |
Anyone? I'm still not able to move servers due to this issue :( Cheers Andy |
Eugh man, finally got this one !!! The old server it was:
The new one that path is different:
Hopefully that helps someone in the future! Andy |
Hi,
I'm trying to set this up on my server. I've got all the dependencies (as far as I'm aware) installed, but I still get an error when trying to
init
a new profile:Could someone please explain to me what that error means? (apologies for posting here, but I couldn't find a forum to ask my question)
Thanks
Andy
The text was updated successfully, but these errors were encountered: