ilp-kit icon indicating copy to clipboard operation
ilp-kit copied to clipboard

Installation fails on Centos 7

Open whotooktwarden opened this issue 8 years ago • 19 comments

When I tried to install ilp-kit on Centos 7, I encountered the following errors when running npm install.

[twarden@u19195387 ilp-kit]$ npm install

> [email protected] install /home/twarden/ilp-kit/node_modules/libpq
> node-gyp rebuild

make: Entering directory `/home/twarden/ilp-kit/node_modules/libpq/build'
  CXX(target) Release/obj.target/addon/src/connection.o
In file included from ../src/connection.cc:1:0:
../src/addon.h:5:22: fatal error: libpq-fe.h: No such file or directory
 #include <libpq-fe.h>
                      ^
compilation terminated.
make: *** [Release/obj.target/addon/src/connection.o] Error 1
make: Leaving directory `/home/twarden/ilp-kit/node_modules/libpq/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 3.10.0-327.36.3.el7.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/twarden/ilp-kit/node_modules/libpq
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
[email protected] /home/twarden/ilp-kit
└── UNMET PEER DEPENDENCY [email protected]

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of bluebird@^3.x but none was installed.
npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm ERR! Linux 3.10.0-327.36.3.el7.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/bin/npm" "install"
npm ERR! node v7.4.0
npm ERR! npm  v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the libpq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs libpq
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls libpq
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/twarden/.npm/_logs/2017-02-11T21_05_11_934Z-debug.log

whotooktwarden avatar Feb 11 '17 21:02 whotooktwarden

We've had some build issues with libpq. What happens if you run npm rebuild libpq?

On Sat, Feb 11, 2017, 10:18 PM Taylor Warden [email protected] wrote:

When I tried to install ilp-kit on Centos 7, I encountered the following errors when running npm install.

[twarden@u19195387 ilp-kit]$ npm install

[email protected] install /home/twarden/ilp-kit/node_modules/libpq node-gyp rebuild

make: Entering directory /home/twarden/ilp-kit/node_modules/libpq/build' CXX(target) Release/obj.target/addon/src/connection.o In file included from ../src/connection.cc:1:0: ../src/addon.h:5:22: fatal error: libpq-fe.h: No such file or directory #include <libpq-fe.h> ^ compilation terminated. make: *** [Release/obj.target/addon/src/connection.o] Error 1 make: Leaving directory /home/twarden/ilp-kit/node_modules/libpq/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 3.10.0-327.36.3.el7.x86_64 gyp ERR! command "/usr/local/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/twarden/ilp-kit/node_modules/libpq gyp ERR! node -v v7.4.0 gyp ERR! node-gyp -v v3.5.0 gyp ERR! not ok [email protected] /home/twarden/ilp-kit └── UNMET PEER DEPENDENCY [email protected]

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN [email protected] requires a peer of bluebird@^3.x but none was installed. npm WARN [email protected] requires a peer of [email protected] but none was installed. npm ERR! Linux 3.10.0-327.36.3.el7.x86_64 npm ERR! argv "/usr/local/bin/node" "/usr/bin/npm" "install" npm ERR! node v7.4.0 npm ERR! npm v4.3.0 npm ERR! code ELIFECYCLE npm ERR! errno 1

npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the libpq package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs libpq npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls libpq npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/twarden/.npm/_logs/2017-02-11T21_05_11_934Z-debug.log

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/interledgerjs/ilp-kit/issues/212, or mute the thread https://github.com/notifications/unsubscribe-auth/ADHIkj5U-iSG9O2m6enPv9qbQ0pmyTA1ks5rbiWUgaJpZM4L-TOV .

--

Evan Schwartz Software Engineer Managing Director of Ripple Luxembourg http: http:

emschwartz avatar Feb 11 '17 21:02 emschwartz

@emschwartz If I run npm rebuild libpq, it executes but I receive no output.

whotooktwarden avatar Feb 11 '17 22:02 whotooktwarden

I'd try running the kit now

On Sat, Feb 11, 2017, 11:29 PM Taylor Warden [email protected] wrote:

@emschwartz https://github.com/emschwartz If I run npm rebuild libpq, it executes but I receive no output.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/interledgerjs/ilp-kit/issues/212#issuecomment-279180507, or mute the thread https://github.com/notifications/unsubscribe-auth/ADHIknNvVbvidHehHkfSZrL0TpfktUwXks5rbjZMgaJpZM4L-TOV .

--

Evan Schwartz Software Engineer Managing Director of Ripple Luxembourg http: http:

emschwartz avatar Feb 11 '17 22:02 emschwartz

I received this critical error message and these repeating messages about a webpack when I ran npm start.

[twarden@u19195387 ilp-kit]$ npm start

> [email protected] start /home/twarden/ilp-kit
> DEBUG_COLORS=1 concurrently -p "[{name}]" -n "ledger,api,wallet" -c "red,blue,                                                                                        cyan" "npm run start-prod-ledger" "npm run start-prod-api" "npm run start-prod"

[ledger]
[ledger] > [email protected] start-prod-ledger /home/twarden/ilp-kit
[ledger] > better-npm-run start-prod-ledger
[ledger]
[wallet]
[wallet] > [email protected] start-prod /home/twarden/ilp-kit
[wallet] > better-npm-run start-prod
[wallet]
[api]
[api] > [email protected] start-prod-api /home/twarden/ilp-kit
[api] > better-npm-run start-prod-api
[api]
[ledger] running better-npm-run in /home/twarden/ilp-kit
[wallet] running better-npm-run in /home/twarden/ilp-kit
[ledger] Executing script: start-prod-ledger
[ledger]
[ledger] to be executed: node ./bin/ledger.js
[api] running better-npm-run in /home/twarden/ilp-kit
[wallet] Executing script: start-prod
[wallet]
[wallet] to be executed: node ./bin/server.js
[api] Executing script: start-prod-api
[api]
[api] to be executed: node ./bin/api.js
[ledger] DEPRECATION WARNING: Use LEDGER_PUBLIC_URI instead of LEDGER_PUBLIC_HTTPS, LEDGER_PUBLIC_PORT, LEDGER_PUBLIC_PATH
[ledger] 2017-02-11T22:37:22.977Z ledger:app info syncing database
[ledger] 2017-02-11T22:37:23.456Z ledger:app info database sync aborted
[ledger] 2017-02-11T22:37:23.485Z ledger:app error error: relation "L_LU_REJECTION_REASON" does not exist
[ledger]     at Connection.parseE (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:539:11)
[ledger]     at Connection.parseMessage (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:366:17)
[ledger]     at Socket.<anonymous> (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:105:22)
[ledger]     at emitOne (events.js:96:13)
[ledger]     at Socket.emit (events.js:188:7)
[ledger]     at readableAddChunk (_stream_readable.js:176:18)
[ledger]     at Socket.Readable.push (_stream_readable.js:134:10)
[ledger]     at TCP.onread (net.js:551:20)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[api] 2017-02-11T22:37:25.365Z connector:ledgers info adding ledger ca.xag.xagate.
[api] 2017-02-11T22:37:25.519Z sequelize DEBUG using database postgres://twarden:Domesomegood1@localhost/ilpkit
[api] 2017-02-11T22:37:25.951Z sequelize DEBUG Executing (default): CREATE TABLE IF NOT EXISTS "SequelizeMeta" ("name" VARCHAR(255) NOT NULL UNIQUE , UNIQUE ("name"), PRIMARY KEY ("name"));
[api] 2017-02-11T22:37:25.959Z sequelize DEBUG Executing (default): SELECT i.relname AS name, ix.indisprimary AS primary, ix.indisunique AS unique, ix.indkey AS indkey, array_agg(a.attnum) as column_indexes, array_agg(a.attname) AS column_names, pg_get_indexdef(ix.indexrelid) AS definition FROM pg_class t, pg_class i, pg_index ix, pg_attribute a WHERE t.oid = ix.indrelid AND i.oid = ix.indexrelid AND a.attrelid = t.oid AND t.relkind = 'r' and t.relname = 'SequelizeMeta' GROUP BY i.relname, ix.indexrelid, ix.indisprimary, ix.indisunique, ix.indkey ORDER BY i.relname;
[api] 2017-02-11T22:37:25.986Z sequelize DEBUG Executing (default): SELECT "name" FROM "SequelizeMeta" AS "SequelizeMeta" ORDER BY "SequelizeMeta"."name" ASC;
[api] 2017-02-11T22:37:26.011Z sequelize DEBUG Executing (default): SELECT "id", "username", "email", "email_verified", "github_id", "profile_picture", "name", "phone", "address1", "address2", "city", "region", "country", "zip_code", "created_at", "updated_at" FROM "Users" AS "User" WHERE "User"."username" = 'admin' LIMIT 1;
[api] 2017-02-11T22:37:26.046Z app CRIT { Error: connect ECONNREFUSED 127.0.0.1:3101
[api]     at Object.exports._errnoException (util.js:1022:11)
[api]     at exports._exceptionWithHostPort (util.js:1045:20)
[api]     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
[api]   code: 'ECONNREFUSED',
[api]   errno: 'ECONNREFUSED',
[api]   syscall: 'connect',
[api]   address: '127.0.0.1',
[api]   port: 3101,
[api]   response: undefined }
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[api] (node:23148) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Unable to connect to account
[api] (node:23148) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[api] npm run start-prod-api exited with code 0
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)

I'm not using the nginx webserver as I didn't follow the setup guide exactly. When I ran the kit I tried to connect to ilp.xagate.com I was redirected to my other site hosted on the same IP; quickgatewaykit.com.

whotooktwarden avatar Feb 11 '17 22:02 whotooktwarden

@whotooktwarden did #214 fix this too?

vhpoet avatar Feb 13 '17 23:02 vhpoet

@vhpoet I removed version 9.3 and installed 9.6 on Centos 7 with few problems. I received these errors in the terminal after running npm run:

[ledger] DEPRECATION WARNING: Use LEDGER_PUBLIC_URI instead of LEDGER_PUBLIC_HTTPS, LEDGER_PUBLIC_PORT, LEDGER_PUBLIC_PATH
[ledger] 2017-02-14T00:33:47.426Z ledger:app info syncing database
[ledger] 2017-02-14T00:33:47.862Z ledger:app info database sync aborted
[ledger] 2017-02-14T00:33:47.888Z ledger:app error error: Ident authentication failed for user "twarden"
[ledger]     at Connection.parseE (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:539:11)
[ledger]     at Connection.parseMessage (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:366:17)
[ledger]     at Socket.<anonymous> (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:105:22)
[ledger]     at emitOne (events.js:96:13)
[ledger]     at Socket.emit (events.js:188:7)
[ledger]     at readableAddChunk (_stream_readable.js:176:18)
[ledger]     at Socket.Readable.push (_stream_readable.js:134:10)
[ledger]     at TCP.onread (net.js:551:20)

(the terminal was scrolling too fast, I missed some info here)

[api]      file: 'auth.c',
[api]      line: '307',
[api]      routine: 'auth_failed' },
[api]   original:
[api]    { error: Ident authentication failed for user "twarden"
[api]        at Connection.parseE (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:539:11)
[api]        at Connection.parseMessage (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:366:17)
[api]        at Socket.<anonymous> (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:105:22)
[api]        at emitOne (events.js:96:13)
[api]        at Socket.emit (events.js:188:7)
[api]        at readableAddChunk (_stream_readable.js:176:18)
[api]        at Socket.Readable.push (_stream_readable.js:134:10)
[api]        at TCP.onread (net.js:551:20)
[api]      name: 'error',
[api]      length: 100,
[api]      severity: 'FATAL',
[api]      code: '28000',
[api]      detail: undefined,
[api]      hint: undefined,
[api]      position: undefined,
[api]      internalPosition: undefined,
[api]      internalQuery: undefined,
[api]      where: undefined,
[api]      schema: undefined,
[api]      table: undefined,
[api]      column: undefined,
[api]      dataType: undefined,
[api]      constraint: undefined,
[api]      file: 'auth.c',
[api]      line: '307',
[api]      routine: 'auth_failed' } }
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[api] (node:15147) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Unable to connect to account
[api] (node:15147) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[api] npm run start-prod-api exited with code 0
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[ledger] npm run start-prod-ledger exited with code 0

whotooktwarden avatar Feb 14 '17 00:02 whotooktwarden

[ledger] 2017-02-14T00:33:47.426Z ledger:app info syncing database
[ledger] 2017-02-14T00:33:47.862Z ledger:app info database sync aborted

This is interesting. The sync was aborted for some reason. Do you have the right credentials? is the database created?

vhpoet avatar Feb 14 '17 00:02 vhpoet

Yes, I am using the same username, password, and database name combination I was beforehand.

whotooktwarden avatar Feb 14 '17 01:02 whotooktwarden

@whotooktwarden can you confirm both ilp-kit and five-bells-ledger tables are created in the database?

vhpoet avatar Feb 14 '17 17:02 vhpoet

@vhpoet This is the output I received from the \list command as the postgres user on my Centos server:

postgres=# \list
                                  List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileg
es
-----------+----------+----------+-------------+-------------+------------------
-----
 ilpkit    | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
    +
           |          |          |             |             | postgres=CTc/post
gres
 template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
    +
           |          |          |             |             | postgres=CTc/post
gres
(4 rows)

whotooktwarden avatar Feb 14 '17 19:02 whotooktwarden

@whotooktwarden and what tables does ilpkit database have?

vhpoet avatar Feb 14 '17 19:02 vhpoet

@vhpoet I know that the database is populated but I couldn't receive any table or view from ilpkit:

postgres=# \connect ilpkit
You are now connected to database "ilpkit" as user "postgres"..
ilpkit=# \dS
                        List of relations
   Schema   |              Name               | Type  |  Owner
------------+---------------------------------+-------+----------
 pg_catalog | pg_aggregate                    | table | postgres
 pg_catalog | pg_am                           | table | postgres
 pg_catalog | pg_amop                         | table | postgres
 pg_catalog | pg_amproc                       | table | postgres
 pg_catalog | pg_attrdef                      | table | postgres
 pg_catalog | pg_attribute                    | table | postgres
 pg_catalog | pg_auth_members                 | table | postgres
 pg_catalog | pg_authid                       | table | postgres
 pg_catalog | pg_available_extension_versions | view  | postgres
 pg_catalog | pg_available_extensions         | view  | postgres
 pg_catalog | pg_cast                         | table | postgres
 pg_catalog | pg_class                        | table | postgres
 pg_catalog | pg_collation                    | table | postgres
 pg_catalog | pg_config                       | view  | postgres
 pg_catalog | pg_constraint                   | table | postgres
 pg_catalog | pg_conversion                   | table | postgres
 pg_catalog | pg_cursors                      | view  | postgres
 pg_catalog | pg_database                     | table | postgres
 pg_catalog | pg_db_role_setting              | table | postgres
 pg_catalog | pg_default_acl                  | table | postgres
 pg_catalog | pg_depend                       | table | postgres
 pg_catalog | pg_description                  | table | postgres
 pg_catalog | pg_enum                         | table | postgres
 pg_catalog | pg_event_trigger                | table | postgres
 pg_catalog | pg_extension                    | table | postgres
 pg_catalog | pg_file_settings                | view  | postgres
 pg_catalog | pg_foreign_data_wrapper         | table | postgres
 pg_catalog | pg_foreign_server               | table | postgres
 pg_catalog | pg_foreign_table                | table | postgres
 pg_catalog | pg_group                        | view  | postgres
 pg_catalog | pg_index                        | table | postgres
 pg_catalog | pg_indexes                      | view  | postgres
 pg_catalog | pg_inherits                     | table | postgres
 pg_catalog | pg_init_privs                   | table | postgres
 pg_catalog | pg_language                     | table | postgres
 pg_catalog | pg_largeobject                  | table | postgres
 pg_catalog | pg_largeobject_metadata         | table | postgres
 pg_catalog | pg_locks                        | view  | postgres
 pg_catalog | pg_matviews                     | view  | postgres
 pg_catalog | pg_namespace                    | table | postgres
 pg_catalog | pg_opclass                      | table | postgres
 pg_catalog | pg_operator                     | table | postgres
 pg_catalog | pg_opfamily                     | table | postgres
 pg_catalog | pg_pltemplate                   | table | postgres
 pg_catalog | pg_policies                     | view  | postgres
 pg_catalog | pg_policy                       | table | postgres
 pg_catalog | pg_prepared_statements          | view  | postgres
 pg_catalog | pg_prepared_xacts               | view  | postgres
 pg_catalog | pg_proc                         | table | postgres
 pg_catalog | pg_range                        | table | postgres
 pg_catalog | pg_replication_origin           | table | postgres
 pg_catalog | pg_replication_origin_status    | view  | postgres
 pg_catalog | pg_replication_slots            | view  | postgres
 pg_catalog | pg_rewrite                      | table | postgres
 pg_catalog | pg_roles                        | view  | postgres
 pg_catalog | pg_rules                        | view  | postgres
 pg_catalog | pg_seclabel                     | table | postgres
 pg_catalog | pg_seclabels                    | view  | postgres
 pg_catalog | pg_settings                     | view  | postgres
 pg_catalog | pg_shadow                       | view  | postgres
 pg_catalog | pg_shdepend                     | table | postgres
 pg_catalog | pg_shdescription                | table | postgres
 pg_catalog | pg_shseclabel                   | table | postgres
 pg_catalog | pg_stat_activity                | view  | postgres
 pg_catalog | pg_stat_all_indexes             | view  | postgres
 pg_catalog | pg_stat_all_tables              | view  | postgres
 pg_catalog | pg_stat_archiver                | view  | postgres
 pg_catalog | pg_stat_bgwriter                | view  | postgres
 pg_catalog | pg_stat_database                | view  | postgres
 pg_catalog | pg_stat_database_conflicts      | view  | postgres
 pg_catalog | pg_stat_progress_vacuum         | view  | postgres
 pg_catalog | pg_stat_replication             | view  | postgres
 pg_catalog | pg_stat_ssl                     | view  | postgres
 pg_catalog | pg_stat_sys_indexes             | view  | postgres
 pg_catalog | pg_stat_sys_tables              | view  | postgres
 pg_catalog | pg_stat_user_functions          | view  | postgres
 pg_catalog | pg_stat_user_indexes            | view  | postgres
 pg_catalog | pg_stat_user_tables             | view  | postgres
 pg_catalog | pg_stat_wal_receiver            | view  | postgres
 pg_catalog | pg_stat_xact_all_tables         | view  | postgres
 pg_catalog | pg_stat_xact_sys_tables         | view  | postgres
 pg_catalog | pg_stat_xact_user_functions     | view  | postgres
 pg_catalog | pg_stat_xact_user_tables        | view  | postgres
 pg_catalog | pg_statio_all_indexes           | view  | postgres
 pg_catalog | pg_statio_all_sequences         | view  | postgres
 pg_catalog | pg_statio_all_tables            | view  | postgres
 pg_catalog | pg_statio_sys_indexes           | view  | postgres
 pg_catalog | pg_statio_sys_sequences         | view  | postgres
 pg_catalog | pg_statio_sys_tables            | view  | postgres
 pg_catalog | pg_statio_user_indexes          | view  | postgres
 pg_catalog | pg_statio_user_sequences        | view  | postgres
 pg_catalog | pg_statio_user_tables           | view  | postgres
 pg_catalog | pg_statistic                    | table | postgres
 pg_catalog | pg_stats                        | view  | postgres
 pg_catalog | pg_tables                       | view  | postgres
 pg_catalog | pg_tablespace                   | table | postgres
 pg_catalog | pg_timezone_abbrevs             | view  | postgres
 pg_catalog | pg_timezone_names               | view  | postgres
 pg_catalog | pg_transform                    | table | postgres
 pg_catalog | pg_trigger                      | table | postgres
 pg_catalog | pg_ts_config                    | table | postgres
 pg_catalog | pg_ts_config_map                | table | postgres
 pg_catalog | pg_ts_dict                      | table | postgres
 pg_catalog | pg_ts_parser                    | table | postgres
 pg_catalog | pg_ts_template                  | table | postgres
 pg_catalog | pg_type                         | table | postgres
 pg_catalog | pg_user                         | view  | postgres
 pg_catalog | pg_user_mapping                 | table | postgres
 pg_catalog | pg_user_mappings                | view  | postgres
 pg_catalog | pg_views                        | view  | postgres
(110 rows)
ilpkit=# \dt
No relations found.

whotooktwarden avatar Feb 14 '17 19:02 whotooktwarden

No relations found. The database is there, but there are not tables for some reason. Could you stop the ilp-kit and run

$ psql ilpkit
drop schema public cascade; create schema public;

and then rerun the ilp-kit see if that works.

vhpoet avatar Feb 14 '17 19:02 vhpoet

@vhpoet Successfully dropped and recreated the schema. I logged into the non-root user then ran npm start:

[twarden@u19195387 ilp-kit]$ npm start

> [email protected] start /home/twarden/ilp-kit
> DEBUG_COLORS=1 concurrently -p "[{name}]" -n "ledger,api,wallet" -c "red,blue,                                                                                        cyan" "npm run start-prod-ledger" "npm run start-prod-api" "npm run start-prod"

[ledger]
[ledger] > [email protected] start-prod-ledger /home/twarden/ilp-kit
[ledger] > better-npm-run start-prod-ledger
[ledger]
[api]
[api] > [email protected] start-prod-api /home/twarden/ilp-kit
[api] > better-npm-run start-prod-api
[api]
[wallet]
[wallet] > [email protected] start-prod /home/twarden/ilp-kit
[wallet] > better-npm-run start-prod
[wallet]
[ledger] running better-npm-run in /home/twarden/ilp-kit
[ledger] Executing script: start-prod-ledger
[ledger]
[api] running better-npm-run in /home/twarden/ilp-kit
[ledger] to be executed: node ./bin/ledger.js
[wallet] running better-npm-run in /home/twarden/ilp-kit
[api] Executing script: start-prod-api
[api]
[api] to be executed: node ./bin/api.js
[wallet] Executing script: start-prod
[wallet]
[wallet] to be executed: node ./bin/server.js
[ledger] DEPRECATION WARNING: Use LEDGER_PUBLIC_URI instead of LEDGER_PUBLIC_HTTPS, LEDGER_PUBLIC_PORT, LEDGER_PUBLIC_PATH
[ledger] 2017-02-14T20:09:44.885Z ledger:app info syncing database
[ledger] 2017-02-14T20:09:45.310Z ledger:app info database sync aborted
[ledger] 2017-02-14T20:09:45.334Z ledger:app error error: Ident authentication failed for user "twarden"
[ledger]     at Connection.parseE (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:539:11)
[ledger]     at Connection.parseMessage (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:366:17)
[ledger]     at Socket.<anonymous> (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:105:22)
[ledger]     at emitOne (events.js:96:13)
[ledger]     at Socket.emit (events.js:188:7)
[ledger]     at readableAddChunk (_stream_readable.js:176:18)
[ledger]     at Socket.Readable.push (_stream_readable.js:134:10)
[ledger]     at TCP.onread (net.js:551:20)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[api] 2017-02-14T20:09:47.283Z connector:ledgers info adding ledger ca.xag.xagate.
[api] 2017-02-14T20:09:47.447Z sequelize DEBUG using database postgres://twarden:Domesomegood1@localhost/ilpkit
[api] 2017-02-14T20:09:47.836Z app CRIT { SequelizeBaseError: Ident authentication failed for user "twarden"
[api]     at /home/twarden/ilp-kit/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:110:20
[api]     at Connection.<anonymous> (/home/twarden/ilp-kit/node_modules/pg/lib/client.js:176:5)
[api]     at emitOne (events.js:96:13)
[api]     at Connection.emit (events.js:188:7)
[api]     at Socket.<anonymous> (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:109:12)
[api]     at emitOne (events.js:96:13)
[api]     at Socket.emit (events.js:188:7)
[api]     at readableAddChunk (_stream_readable.js:176:18)
[api]     at Socket.Readable.push (_stream_readable.js:134:10)
[api]     at TCP.onread (net.js:551:20)
[api]   name: 'SequelizeConnectionError',
[api]   message: 'Ident authentication failed for user "twarden"',
[api]   parent:
[api]    { error: Ident authentication failed for user "twarden"
[api]        at Connection.parseE (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:539:11)
[api]        at Connection.parseMessage (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:366:17)
[api]        at Socket.<anonymous> (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:105:22)
[api]        at emitOne (events.js:96:13)
[api]        at Socket.emit (events.js:188:7)
[api]        at readableAddChunk (_stream_readable.js:176:18)
[api]        at Socket.Readable.push (_stream_readable.js:134:10)
[api]        at TCP.onread (net.js:551:20)
[api]      name: 'error',
[api]      length: 100,
[api]      severity: 'FATAL',
[api]      code: '28000',
[api]      detail: undefined,
[api]      hint: undefined,
[api]      position: undefined,
[api]      internalPosition: undefined,
[api]      internalQuery: undefined,
[api]      where: undefined,
[api]      schema: undefined,
[api]      table: undefined,
[api]      column: undefined,
[api]      dataType: undefined,
[api]      constraint: undefined,
[api]      file: 'auth.c',
[api]      line: '307',
[api]      routine: 'auth_failed' },
[api]   original:
[api]    { error: Ident authentication failed for user "twarden"
[api]        at Connection.parseE (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:539:11)
[api]        at Connection.parseMessage (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:366:17)
[api]        at Socket.<anonymous> (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:105:22)
[api]        at emitOne (events.js:96:13)
[api]        at Socket.emit (events.js:188:7)
[api]        at readableAddChunk (_stream_readable.js:176:18)
[api]        at Socket.Readable.push (_stream_readable.js:134:10)
[api]        at TCP.onread (net.js:551:20)
[api]      name: 'error',
[api]      length: 100,
[api]      severity: 'FATAL',
[api]      code: '28000',
[api]      detail: undefined,
[api]      hint: undefined,
[api]      position: undefined,
[api]      internalPosition: undefined,
[api]      internalQuery: undefined,
[api]      where: undefined,
[api]      schema: undefined,
[api]      table: undefined,
[api]      column: undefined,
[api]      dataType: undefined,
[api]      constraint: undefined,
[api]      file: 'auth.c',
[api]      line: '307',
[api]      routine: 'auth_failed' } }
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[api] (node:25034) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Unable to connect to account
[api] (node:25034) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[api] npm run start-prod-api exited with code 0
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
[wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)

whotooktwarden avatar Feb 14 '17 20:02 whotooktwarden

oh ok, so the authentication is failing for twarden:Domesomegood1@localhost/ilpkit. The db username or password is wrong.

vhpoet avatar Feb 14 '17 20:02 vhpoet

I believe the problem is that the ident authentication fails because postgres is expecting peer authentication for some strange reason. I will try completely removing postgres from my system later, reinstall, configure a new db + user, and try this again either later tonight or tomorrow.

whotooktwarden avatar Feb 14 '17 21:02 whotooktwarden

Alright, I completely removed postgresql9.6 again then reinstalled the packages via:

yum -y install postgresql96 postgresql96-server postgresql96-contrib postgresql96-libs systemctl enable postgresql-9.6 /usr/pgsql-9.6/bin/postgresql96-setup initdb systemctl start postgresql-9.6

Afterwards I reran npm run configure to set the new postgres details for a new user 'taylor' with the same password and received the same error again:

`[twarden@u19195387 ilp-kit]$ npm start

[email protected] start /home/twarden/ilp-kit DEBUG_COLORS=1 concurrently -p "[{name}]" -n "ledger,api,wallet" -c "red,blue,cyan" "npm run start-prod-ledger" "npm run start-prod-api" "npm run start-prod"

[ledger] [ledger] > [email protected] start-prod-ledger /home/twarden/ilp-kit [ledger] > better-npm-run start-prod-ledger [ledger] [api] [api] > [email protected] start-prod-api /home/twarden/ilp-kit [api] > better-npm-run start-prod-api [api] [wallet] [wallet] > [email protected] start-prod /home/twarden/ilp-kit [wallet] > better-npm-run start-prod [wallet] [ledger] running better-npm-run in /home/twarden/ilp-kit [ledger] Executing script: start-prod-ledger [ledger] [api] running better-npm-run in /home/twarden/ilp-kit [ledger] to be executed: node ./bin/ledger.js [wallet] running better-npm-run in /home/twarden/ilp-kit [api] Executing script: start-prod-api [api] [api] to be executed: node ./bin/api.js [wallet] Executing script: start-prod [wallet] [wallet] to be executed: node ./bin/server.js [ledger] DEPRECATION WARNING: Use LEDGER_PUBLIC_URI instead of LEDGER_PUBLIC_HTTPS, LEDGER_PUBLIC_PORT, LEDGER_PUBLIC_PATH [ledger] 2017-02-15T01:00:03.561Z ledger:app info syncing database [ledger] 2017-02-15T01:00:03.984Z ledger:app info database sync aborted [ledger] 2017-02-15T01:00:04.008Z ledger:app error error: Ident authentication failed for user "taylor" [ledger] at Connection.parseE (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:539:11) [ledger] at Connection.parseMessage (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:366:17) [ledger] at Socket. (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:105:22) [ledger] at emitOne (events.js:96:13) [ledger] at Socket.emit (events.js:188:7) [ledger] at readableAddChunk (_stream_readable.js:176:18) [ledger] at Socket.Readable.push (_stream_readable.js:134:10) [ledger] at TCP.onread (net.js:551:20) [wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish) [api] 2017-02-15T01:00:05.799Z connector:ledgers info adding ledger ca.xag.ilpkit. [api] 2017-02-15T01:00:05.961Z sequelize DEBUG using database postgres://taylor:Domesomegood1@localhost/ilpkit [api] 2017-02-15T01:00:06.348Z app CRIT { SequelizeBaseError: Ident authentication failed for user "taylor" [api] at /home/twarden/ilp-kit/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:110:20 [api] at Connection. (/home/twarden/ilp-kit/node_modules/pg/lib/client.js:176:5) [api] at emitOne (events.js:96:13) [api] at Connection.emit (events.js:188:7) [api] at Socket. (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:109:12) [api] at emitOne (events.js:96:13) [api] at Socket.emit (events.js:188:7) [api] at readableAddChunk (_stream_readable.js:176:18) [api] at Socket.Readable.push (_stream_readable.js:134:10) [api] at TCP.onread (net.js:551:20) [api] name: 'SequelizeConnectionError', [api] message: 'Ident authentication failed for user "taylor"', [api] parent: [api] { error: Ident authentication failed for user "taylor" [api] at Connection.parseE (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:539:11) [api] at Connection.parseMessage (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:366:17) [api] at Socket. (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:105:22) [api] at emitOne (events.js:96:13) [api] at Socket.emit (events.js:188:7) [api] at readableAddChunk (_stream_readable.js:176:18) [api] at Socket.Readable.push (_stream_readable.js:134:10) [api] at TCP.onread (net.js:551:20) [api] name: 'error', [api] length: 99, [api] severity: 'FATAL', [api] code: '28000', [api] detail: undefined, [api] hint: undefined, [api] position: undefined, [api] internalPosition: undefined, [api] internalQuery: undefined, [api] where: undefined, [api] schema: undefined, [api] table: undefined, [api] column: undefined, [api] dataType: undefined, [api] constraint: undefined, [api] file: 'auth.c', [api] line: '307', [api] routine: 'auth_failed' }, [api] original: [api] { error: Ident authentication failed for user "taylor" [api] at Connection.parseE (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:539:11) [api] at Connection.parseMessage (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:366:17) [api] at Socket. (/home/twarden/ilp-kit/node_modules/pg/lib/connection.js:105:22) [api] at emitOne (events.js:96:13) [api] at Socket.emit (events.js:188:7) [api] at readableAddChunk (_stream_readable.js:176:18) [api] at Socket.Readable.push (_stream_readable.js:134:10) [api] at TCP.onread (net.js:551:20) [api] name: 'error', [api] length: 99, [api] severity: 'FATAL', [api] code: '28000', [api] detail: undefined, [api] hint: undefined, [api] position: undefined, [api] internalPosition: undefined, [api] internalQuery: undefined, [api] where: undefined, [api] schema: undefined, [api] table: undefined, [api] column: undefined, [api] dataType: undefined, [api] constraint: undefined, [api] file: 'auth.c', [api] line: '307', [api] routine: 'auth_failed' } } [wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish) [wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish) [wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish) [wallet] [webpack-isomorphic-tools] (waiting for the first Webpack build to finish) ^C [twarden@u19195387 ilp-kit]$ [ledger] npm run start-prod-ledger exited with code null [wallet] npm run start-prod exited with code null [api] npm run start-prod-api exited with code null`

whotooktwarden avatar Feb 15 '17 01:02 whotooktwarden

@whotooktwarden can you confirm you can access postgres://taylor:Domesomegood1@localhost/ilpkit from your terminal?

vhpoet avatar Feb 15 '17 19:02 vhpoet

@vhpoet No, I cannot, like I mentioned before I believe this is an issue with postgres expecting ident authentication but is using peer authentication for some reason, I just confirmed this:


[twarden@u19195387 ~]$ psql -U taylor -d ilpkit
psql: FATAL:  Peer authentication failed for user "taylor"
[twarden@u19195387 ~]$ psql -U taylor -d ilpkit -W
Password for user taylor:
psql: FATAL:  Peer authentication failed for user "taylor"

[twarden@u19195387 ~]$ sudo su - postgres
[sudo] password for twarden:
Last login: Tue Feb 14 19:58:02 EST 2017 on pts/0
-bash-4.2$ psql ilpkit
psql (9.6.2)
Type "help" for help.

ilpkit=# SELECT version();
                                                 version
--------------------------------------------------------------------------------
--------------------------
 PostgreSQL 9.6.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (
Red Hat 4.8.5-11), 64-bit
(1 row)

ilpkit=#\dn
  List of schemas
  Name  |  Owner
--------+----------
 public | postgres
(1 row)
`ilpkit=# \conninfo
You are connected to database "ilpkit" as user "postgres" via socket in "/var/run/postgresql" at port "5432".
ilpkit=# drop schema public cascade;
DROP SCHEMA
ilpkit=# \dn
List of schemas
 Name | Owner
------+-------
(0 rows)
-bash-4.2$ psql ilpkit taylor -W
Password for user taylor:
psql: FATAL:  Peer authentication failed for user "taylor"
-bash-4.2$ dropuser taylor
-bash-4.2$ createuser taylor
-bash-4.2$ psql
psql (9.6.2)
Type "help" for help.

postgres=# ALTER USER taylor WITH PASSWORD 'Domesomegood1';
ALTER ROLE
postgres=# \q
-bash-4.2$ psql ilpkit taylor -W
Password for user taylor:
psql: FATAL:  Peer authentication failed for user "taylor"
-bash-4.2$ psql ilpkit taylor -W
Password for user taylor:
psql: FATAL:  Peer authentication failed for user "taylor"

[twarden@u19195387 ~]$ yum list postgres\*
Loaded plugins: fastestmirror
Repository pgdg96 is listed more than once in the configuration
Repository pgdg96-source is listed more than once in the configuration
Repository pgdg96-updates-testing is listed more than once in the configuration
Repository pgdg96-source-updates-testing is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Installed Packages
postgresql-libs.x86_64                                                                9.2.18-1.el7                                                               @base
postgresql96.x86_64                                                                   9.6.2-1PGDG.rhel7                                                          @pgdg96
postgresql96-contrib.x86_64                                                           9.6.2-1PGDG.rhel7                                                          @pgdg96
postgresql96-libs.x86_64                                                              9.6.2-1PGDG.rhel7                                                          @pgdg96
postgresql96-server.x86_64                                                            9.6.2-1PGDG.rhel7                                                          @pgdg96
Available Packages
postgresql-jdbc.noarch                                                                9.4.1212-1.rhel7                                                           pgdg96
postgresql-jdbc-javadoc.noarch                                                        9.4.1212-1.rhel7                                                           pgdg96
postgresql-unit96.x86_64                                                              2.0-1.rhel7                                                                pgdg96
postgresql-unit96-debuginfo.x86_64                                                    2.0-1.rhel7                                                                pgdg96
postgresql96-debuginfo.x86_64                                                         9.6.2-1PGDG.rhel7                                                          pgdg96
postgresql96-devel.x86_64                                                             9.6.2-1PGDG.rhel7                                                          pgdg96
postgresql96-docs.x86_64                                                              9.6.2-1PGDG.rhel7                                                          pgdg96
postgresql96-odbc.x86_64                                                              09.06.0100-1PGDG.rhel7                                                     pgdg96
postgresql96-plperl.x86_64                                                            9.6.2-1PGDG.rhel7                                                          pgdg96
postgresql96-plpython.x86_64                                                          9.6.2-1PGDG.rhel7                                                          pgdg96
postgresql96-pltcl.x86_64                                                             9.6.2-1PGDG.rhel7                                                          pgdg96
postgresql96-tcl.x86_64                                                               2.1.1-1.rhel7                                                              pgdg96
postgresql96-tcl-debuginfo.x86_64                                                     2.1.1-1.rhel7                                                              pgdg96
postgresql96-test.x86_64              

I don't know why but its borked, I guess I duplicated the repo entries, an the first package in the list is marked in red. Any suggestions?

whotooktwarden avatar Feb 15 '17 20:02 whotooktwarden