GithubHelp home page GithubHelp logo

gatewayd-installers's People

Contributors

xbrooks avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gatewayd-installers's Issues

502 bad gateway on ripple-rest startup

Hello again Nino - not sure if this is the right place to ask this:

After reinstalling Ubuntu14.04 and following
https://github.com/RoastBeefSandwichCo/gatewayd-installers/blob/master/ubuntu-14.04-server.txt
today
ripple-rest on its own without the cold wallet seems to work and
gatewayd apppears to start with the example cold wallet:
shell_user_gatewayd@geoff-laptop:~/gatewayd$ bin/gateway start
body-parser deprecated undefined extended: provide extended option lib/app.js:19:20
Starting gateway processes and running pm2 list...
┌─────────────┬────┬─────────┬──────┬────────┬───────────┬────────┬─────────────┬─────────────┐
│ App name │ id │ mode │ PID │ status │ restarted │ uptime │ memory │ watching │
├─────────────┼────┼─────────┼──────┼────────┼───────────┼────────┼─────────────┼─────────────┤
│ server │ 0 │ cluster │ 5440 │ online │ 0 │ 3s │ 74.473 MB │ unactivated │
│ withdrawals │ 1 │ cluster │ 5446 │ online │ 0 │ 3s │ 79.652 MB │ unactivated │
│ incoming │ 2 │ cluster │ 5456 │ online │ 0 │ 2s │ 76.723 MB │ unactivated │
│ deposits │ 3 │ cluster │ 5458 │ online │ 0 │ 2s │ 76.570 MB │ unactivated │
│ outgoing │ 4 │ cluster │ 5460 │ online │ 0 │ 2s │ 75.891 MB │ unactivated │
└─────────────┴────┴─────────┴──────┴────────┴───────────┴────────┴─────────────┴─────────────┘

Use pm2 desc[ribe] <id> to get more details

shell_user_gatewayd@geoff-laptop:/gatewayd$ bin/gateway get_cold_wallet
body-parser deprecated undefined extended: provide extended option lib/app.js:19:20
info: rhj3RL3SdxYVm8a7TXc7mbK2WoUBNMVuxz
shell_user_gatewayd@geoff-laptop:
/gatewayd$


but then ripple-rest gives:

shell_user_gatewayd@geoff-laptop:~/gatewayd$ /usr/bin/start-rest
[sudo] password for shell_user_gatewayd:

  • Starting PostgreSQL 9.3 database server [ OK ]
    shell_user_gatewayd@geoff-laptop:~/gatewayd$ Attempting to connect to the Ripple Network...
    ripple-rest server listening over UNSECURED HTTP at port: 5990
    Using sqlite3 in memory database. DO NOT USE THIS FOR A PRODUCTION SYSTEM
    info: GET /v1/accounts/rhj3RL3SdxYVm8a7TXc7mbK2WoUBNMVuxz/notifications/undefined?types=payment 502 5.832 ms - 92
    info: GET /v1/accounts/rhj3RL3SdxYVm8a7TXc7mbK2WoUBNMVuxz/notifications/undefined?types=payment 502 3.994 ms - 92
    info: GET /v1/accounts/rhj3RL3SdxYVm8a7TXc7mbK2WoUBNMVuxz/notifications/undefined?types=payment 502 1.437 ms - 92
    Connected to rippled
    Waiting for confirmation of network activity...
    Connected to rippled server at: wss://s-west.ripple.com:443
    ripple-rest server ready
    Attempting to connect to the Ripple Network...
    info: GET /v1/accounts/rhj3RL3SdxYVm8a7TXc7mbK2WoUBNMVuxz/notifications/undefined?types=payment 502 10.601 ms - 346
    Attempting to connect to the Ripple Network...
    info: GET /v1/accounts/rhj3RL3SdxYVm8a7TXc7mbK2WoUBNMVuxz/notifications/undefined?types=payment 502 8.859 ms - 346
    Attempting to connect to the Ripple Network...
    info: GET /v1/accounts/rhj3RL3SdxYVm8a7TXc7mbK2WoUBNMVuxz/notifications/undefined?types=payment 502 11.010 ms - 346
    Attempting to connect to the Ripple Network...
    info: GET /v1/accounts/rhj3RL3SdxYVm8a7TXc7mbK2WoUBNMVuxz/notifications/undefined?types=payment 502 10.547 ms - 346
    Attempting to connect to the Ripple Network...
    etc.....

database_url unset by gwd

A few months ago, cornfeedhobo authored a change that apparently never made it.

in gatewayd/config/config.js, add
process.env['DATABASE_URL'] = nconf.get('DATABASE_URL');
This fixes the bug where database_url must be exported before running gatewayd.

Possibly use sed to make this edit alongside the others.

gatewayd start script?

Should the first active line of the script be
cd /home/shell_user_gatewayd/gatewayd
because as far as I can tell we cannot actually log into the shell....... user only su to it?

Also I was running it from my own user but then I had to
sudo chown geoff *.log
in order for the logs to be written to as they belonged to root.
Can/should it be run from shell_user_gatewayd and if so have I made a mistake in that my logs belonged to root?

Remove obsolete hotfix

The following lines can be removed as 269 has been closed:

GATEWAYD HOTFIXES. WHAT YOU MUST DO

#1) lib/processmanager, line 16 SEE ISSUE 1 Change "processes = {};" to "this.processes = {};"

See: ripple/gatewayd#269

Errors or hanging on node-gyp rebuild

Sometimes it gives an error:

shell_user_gatewayd@geoff-laptop:~/gatewayd/ripple-rest$ sudo npm install --global grunt grunt-cli pg
/usr/bin/grunt -> /usr/lib/node_modules/grunt-cli/bin/grunt
|

[email protected] install /usr/lib/node_modules/pg
node-gyp rebuild || (exit 0)

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: EPERM, utime '/home/shell_user_gatewayd/.node-gyp/0.10.31'
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/pg
gyp ERR! node -v v0.10.31
gyp ERR! node-gyp -v v1.0.1
gyp ERR! This is a bug in node-gyp.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! https://github.com/TooTallNate/node-gyp/issues
[email protected] /usr/lib/node_modules/grunt-cli
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])

[email protected] /usr/lib/node_modules/grunt
├── [email protected]
├── [email protected]


shell_user_gatewayd@geoff-laptop:/gatewayd/ripple-rest$ sudo apt-get install node-gyp
Reading package lists... Done
Building dependency tree
Reading state information... Done
node-gyp is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 48 not upgraded.
shell_user_gatewayd@geoff-laptop:
/gatewayd/ripple-rest$


or sometimes just hangs:
shell_user_gatewayd@geoff-laptop:/gatewayd/ripple-rest$ sudo npm install
npm WARN cannot run in wd [email protected] grunt (wd=/home/shell_user_gatewayd/gatewayd/ripple-rest)
shell_user_gatewayd@geoff-laptop:
/gatewayd/ripple-rest$ npm install --save pg
|

[email protected] install /home/shell_user_gatewayd/gatewayd/ripple-rest/node_modules/pg
node-gyp rebuild || (exit 0)

Details of ssl problem?

Your comment says:

The irony here is you can't enable ssl or gatewayd will break (for now).

I am having trouble finding the issue report.
Could you possibly add a link to the issue to that comment so we can check details?

Authentication token manipulation error

I am not a Ubuntu expert but I guess the commands to add the users should read:
sudo adduser --system restful
and
sudo adduser --system shell_user_gatewayd
(if not system user sudo command not allowed later)

Also the password setting can give an error:
geoff@geoff-laptop:$ randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo;}
geoff@geoff-laptop:
$ shell_user_gatewaydPW=randpw 20
geoff@geoff-laptop:$ echo "shell_user_gatewayd:$shell_user_gatewaydPW" | chpasswd
Changing password for shell_user_gatewayd.
chpasswd: (user shell_user_gatewayd) pam_chauthtok() failed, error:
Authentication token manipulation error
chpasswd: (line 1, user shell_user_gatewayd) password not changed
geoff@geoff-laptop:
$ echo $shell_user_gatewaydPW
e3Y48Cia6esbKgfvL-Z7
geoff@geoff-laptop:~$


When I tried to use chpasswd manually it hung so my workaround was:
geoff@geoff-laptop:$ sudo passwd restful
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
geoff@geoff-laptop:
$ sudo passwd shell_user_gatewayd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
geoff@geoff-laptop:~$

Typo?

Not quite sure what line 129 and 132 are trying to do:

echo $SHELL_USER_GATEWAYDPW
............
shell_user_gatewayd@geoff-laptop:/gatewayd$ echo "$SHELL_USER_GATEWAYDPW" | sudo -S ddddd
[sudo] password for shell_user_gatewayd: sudo: ddddd: command not found
shell_user_gatewayd@geoff-laptop:
/gatewayd$

Broken!

FIXME

[email protected] install /home/shell_user_gatewayd/gatewayd/ripple-rest/node_modules/ripple-lib/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/home/shell_user_gatewayd/gatewayd/ripple-rest/node_modules/ripple-lib/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Leaving directory '/home/shell_user_gatewayd/gatewayd/ripple-rest/node_modules/ripple-lib/node_modules/ws/build'
npm WARN cannot run in wd [email protected] grunt (wd=/home/shell_user_gatewayd/gatewayd/ripple-rest)
npm ERR! peerinvalid The package chai does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants chai@>=1.0.0 <2

npm ERR! System Linux 3.16.0-4-amd64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/shell_user_gatewayd/gatewayd/ripple-rest
npm ERR! node -v v0.10.41
npm ERR! npm -v 1.4.29
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/shell_user_gatewayd/gatewayd/ripple-rest/npm-debug.log
npm ERR! not ok code 0

Remove obsolete fixes

If you type the Unix command
locale
and your settings are already UTF-8
then perhaps the workaround in

change postgres template: http://stackoverflow.com/questions/16736891/pgerror-error-new-encoding-utf8-is-incompatible

is not necessary?

I guess 14.04 installs with UTF-8 locale as default so unless you have changed it you should be OK?
So perhaps there should just be a note in brackets to say that if you get the error mentioned in the link to check with the "locale" command that your locale is set correctly.

config edit improvements (sed)

sed needs a better regex such that it doesn't just look for the default pre-packaged lines (s/ripple_rest_user:password/d) but can change existing passwords. This is necessary because from time to time during development, passwords must be changed or read rather than simply created.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.