Skip to content
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

Error: Unable to connect to account #484

Open
oniabifo opened this issue Dec 16, 2017 · 25 comments
Open

Error: Unable to connect to account #484

oniabifo opened this issue Dec 16, 2017 · 25 comments

Comments

@oniabifo
Copy link

oniabifo commented Dec 16, 2017

I installed the ilp-kit on Google compute Engine, The installation went smoothly, and after running
"sudo ./start.sh"

I get an error that says
"(node:32188) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Unable to connect to account"

I am able to navigate to my public url but I am not able to login, nor is it responding to any action.

Are there any trouble shooting steps can i follow to resolve this issue?

@michielbdejong
Copy link
Contributor

@oniabifo yes, check that the following three URLs all contain some JSON:

Then another thing you could try is to stop all containers and remove them (docker ps, docker stop, docker rm), remove the on-host postgres data (see `https://github.com/interledgerjs/ilp-kit-docker-compose/blob/master/docker-compose.yml#L31), and then run your docker-compose up command again (make sure you set all the environment variables, on my server I created a little 'up.sh' script which sets them each time).

@oniabifo
Copy link
Author

Hello @michielbdejong , Thanks for the tip, but i want to make sure, i am on the same page with you, I see you have mentioned docker a couple of times, and i want to make sure i am supposed to be using docker even if i installed using the Google Compute Engine?

On the set up page, There were three options, Docker, compute engine, and heroku, i am using Google compute engine, so i just want to make sure i am on the same page with you.

Also, The three Urls shows an error that says "The requested page hasn't been found
screen shot 2017-12-17 at 8 38 21 am

I will follow your troubleshooting steps, and hope it helps. Thanks.

@michielbdejong
Copy link
Contributor

Ah sorry, I was confused, yes. The GCE instructions don't use Docker (the Azure ones do, that's what I was confused with). OK, then you should check the same URLs and make sure that all the processes started by https://github.com/interledgerjs/ilp-kit/blob/master/start-all.sh are working - maybe start them one by one in four separate processes. Also, make sure to copy https://github.com/interledgerjs/ilp-kit/blob/master/client/public/config.example.js to just config.js and edit it to use your domain name (the GCE instructions probably weren't updated yet to instruct to do that)

@oniabifo
Copy link
Author

@michielbdejong i thought as much, well, i decided to start all over again with a fresh install to document the issues that i am facing.

I figured when i run the command "npm install" on the ilp kit, the only issue i had was with sqlite3 during the npm install. It returns an error saying

"node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.9/node-v59-linux-x
64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/oniabifo/.npm/_logs/2017-12-17T20_06_09_206Z-debug.log"
Is sqlite3 essential to the success of the ilp-kit?

Also thanks for the instructions, will be sure to follow it once i install sqlite3 successfully.

@oniabifo
Copy link
Author

oniabifo commented Dec 17, 2017

@michielbdejong I started the ledger, and then the api, and it returned an error on the ledger which says

"2017-12-17T22:02:22.495Z ledger:error-handler warn Unauthorized: Unknown or invalid account / password" on the ledger process and " UnhandledPromiseRejectionWarning: Error: Unable to connect to account" on the api process at the same time.

I have googled the error and i came across this link #97 Someone suggested creating a new DB and i am go to try that out. Although, i will like to ask, The account / password that is being used are the variables set in env.list?

LEDGER_ADMIN_USER={#}
LEDGER_ADMIN_PASS= {#}

Thanks

@michielbdejong
Copy link
Contributor

The account / password that is being used are the variables set in env.list?

Yes, they are. Which operating system are you using on your Google Compute Engine server?

Reading about your experience makes me think it would be easier for you to use https://github.com/interledgerjs/ilp-kit-docker-compose on top of Google Compute Engine?

If so, maybe we should remove the GCE-specific install instructions from the ilp-kit readme.

@oniabifo
Copy link
Author

oniabifo commented Dec 18, 2017

@michielbdejong I am making use of ubuntu 17.04, I have used every version of ubuntu on there. I think i will use the docker on top of the GCE and see what happens.

Well the GCE install instructions i do prefer because i am a data engineer who is more familiar with backends options and do a little bit of programming every now and then, Most people with my background will prefer to use the GCE install instructions. I just think there isn't a lot of troubleshooting methods when problems are ran into, and i believe that has something to do with issues rarely being ran into.

I will still like to believe i am doing something wrong somewhere. I will like to ask, must all the processes be started before the ledger connects?

@michielbdejong
Copy link
Contributor

The ledger can run by itself. The api process wants to connect to the ledger, and will complain if it can't. The webserver will try to proxy requests to the ledger, and you'll see a Bad Gateway error if it can't.

@oniabifo
Copy link
Author

Funny enough, when i started the ledger the first time, i ran into an error "ledger:error-handler warn Unauthorized: Unknown or invalid account / password" before i even started the Api, now i do not get that error anymore, but still run into an once i start the api.

@michielbdejong
Copy link
Contributor

that first one was probably about the ledger connecting to the database. have a look at an env var called something like LEDGER_DB_URI

@oniabifo
Copy link
Author

@michielbdejong There is DB_URI which connects to the postgres DB in the env file.

@oniabifo
Copy link
Author

oniabifo commented Dec 19, 2017

why is the webserver.js using port 80? Does port 80 listens to the server? Can this port be changed? I figured there is a problem starting npm. "Error: listen EACCES 0.0.0.0:80 and Error: listen EACCES 0.0.0.0:443".

Of course this doesn't solve the issue of the ledger not connecting, but it seems once nginx is started, it starts listening on port 80 which makes the webserver not being able to start

@michielbdejong
Copy link
Contributor

Right, that would require sudo privileges, yes. Try editing https://github.com/interledgerjs/ilp-kit/blob/master/webserver/webserver.js#L95-L96

@oniabifo
Copy link
Author

oniabifo commented Dec 19, 2017

@michielbdejong I supposed i asked that just to make sure it wont change anything in the folder, i am wondering maybe there might be some services that is supposed to listen to port 80 and port 443 before i go ahead and make the change.

But i am reading through each documentation in each folders, and i think the instructions on the Github page isn't the same. Some extra things need to be done for each folder(ledger, api, webserver, and client) before this app will be able to run to run successfully.

Once i am sure i have everything 100 percent going, would it be okay if i write a documentation for the steps?

@michielbdejong
Copy link
Contributor

would it be okay if i write a documentation for the steps?

ah, that would be awesome! :)

@oniabifo
Copy link
Author

oniabifo commented Dec 19, 2017

@michielbdejong I will definitely do that. This has tested my patience lol. I was able to get everything going. Can make api calls, and the all the URLS are working.

Only thing left for me to figure out is why the UI isn't responding.

@michielbdejong
Copy link
Contributor

Awesome!! :) Did you copy config.example.js to config.js? Like https://red.ilpdemo.org/config.js

@oniabifo
Copy link
Author

oniabifo commented Dec 19, 2017

Yes, I did. Should I be getting a "Not Found" message when i do https://URL/api?

@michielbdejong
Copy link
Contributor

On /api yes, but not on http://red.ilpdemo.org/api/config

@oniabifo
Copy link
Author

oniabifo commented Dec 19, 2017

That's exactly how it went, Once i get the UI going, I will be sure to write a documentation for each steps, Maybe start all over again. Oh the Thrill of it not working again :)

Edited:

I decided to check my UI Console and saw this error patiently waiting for me.
"Failed to load https://ilpkit-ngn.ripafrika.com/api/config: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://...*' is therefore not allowed access. The response had HTTP status code 404."

I am honestly wondering why it is coming up... Looking back at the install instructions, I am wondering if this has to do with the "Install And Confgiure Nginx", "Domain setup", "Set up proxy for ILP Kit" and "Setup SSL via letsencrypt" section of the installing instructions.

Ah: I think i did something wrong while setting up the domain

@oniabifo
Copy link
Author

Hello @michielbdejong just a question i will like to clarify, is it possible to move fiat currency from the ILP to a ripple address?

@michielbdejong
Copy link
Contributor

Only if the network contains a connector that is willing to forward that payment for you. Currently, there are no such connectors on the live network yet, but they do exist on the testnet (although then 'fiat' is inaccurate, it would be 'testnet fiat' to testnet-xrp).

@oniabifo
Copy link
Author

oniabifo commented Dec 22, 2017

Thanks, I still have many questions, so i suppose i should ask if there is a way of messaging you personally? @michielbdejong

@michielbdejong
Copy link
Contributor

Sure, let's chat in https://gitter.im/interledger/ilp-kit

@michielbdejong
Copy link
Contributor

You can message me personally on https://gitter.im/michielbdejong but if it's ilp-kit related then let's use the chat channel that's dedicated to this sort of conversation! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants