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

how to fix it ? #1

Open
huicpc0215 opened this issue Dec 18, 2016 · 4 comments
Open

how to fix it ? #1

huicpc0215 opened this issue Dec 18, 2016 · 4 comments

Comments

@huicpc0215
Copy link

INFO[20161218 04:11:25] [ main.go ] 37 [ ---------------------------------------------------------->>>
INFO[20161218 04:11:25] [ main.go ] 38 trading broker Engine V1.1 postgres
INFO[20161218 04:11:25] [ main.go ] 39 <<<----------------------------------------------------------]
INFO[20161218 04:11:25] [ trade_center.go ] 49 unit_min_amount,unit_max_amount: 0.01 5
ERRO[20161218 04:11:25] [ db.go ] 49 open: pq: password authentication failed for user "root"
ERRO[20161218 04:11:25] [ trade_order.go ] 88 pq: password authentication failed for user "root"
INFO[20161218 04:11:25] [ amount_limit.go ] 40 init limit: 200 200 0 0
INFO[20161218 04:11:25] [ amount_limit.go ] 123 buy_total_amount: 0
INFO[20161218 04:11:25] [ amount_limit.go ] 132 sell_total_amount: 0
ERRO[20161218 04:11:25] [ db.go ] 49 open: pq: password authentication failed for user "root"
ERRO[20161218 04:11:25] [ exchange_config.go ] 55 pq: password authentication failed for user "root"
INFO[20161218 04:11:25] [ trade_server.go ] 48 Thrift server listening on 127.0.0.1:18030
ERRO[20161218 04:11:26] [ db.go ] 49 open: pq: password authentication failed for user "root"
ERRO[20161218 04:11:26] [ tx.go ] 11 pq: password authentication failed for user "root"
ERRO[20161218 04:11:26] [ tx.go ] 36 TxBegin failed pq: password authentication failed for user "root"
ERRO[20161218 04:11:27] [ db.go ] 49 open: pq: password authentication failed for user "root"

endless.. error.
And how can I use postgres sql?

@philsong
Copy link
Owner

you need config correct postgresql user and password account.

@huicpc0215
Copy link
Author

Right now, I have use root:root to postgre sql.
When I import sql from trader_2016_06_29.sql,
it shows that psql:etc/trader_2016_06_29.sql:733: ERROR: role "phil" does not exist.
When I create user phil, It shows that:

psql:etc/trader_2016_06_29.sql:23: ERROR: must be owner of extension plpgsql
SET
SET
SET
psql:etc/trader_2016_06_29.sql:47: ERROR: relation "account" already exists
psql:etc/trader_2016_06_29.sql:50: ERROR: must be owner of relation account
psql:etc/trader_2016_06_29.sql:61: ERROR: relation "account_id_seq" already exists
psql:etc/trader_2016_06_29.sql:64: ERROR: must be owner of relation account_id_seq
psql:etc/trader_2016_06_29.sql:70: ERROR: must be owner of relation account_id_seq
psql:etc/trader_2016_06_29.sql:84: ERROR: relation "amount_config" already exists
psql:etc/trader_2016_06_29.sql:87: ERROR: must be owner of relation amount_config
psql:etc/trader_2016_06_29.sql:98: ERROR: relation "amount_config_id_seq" already exists
psql:etc/trader_2016_06_29.sql:101: ERROR: must be owner of relation amount_config_id_seq
psql:etc/trader_2016_06_29.sql:107: ERROR: must be owner of relation amount_config_id_seq
psql:etc/trader_2016_06_29.sql:121: ERROR: relation "depth" already exists
psql:etc/trader_2016_06_29.sql:124: ERROR: must be owner of relation depth

How can I fix it?

@huicpc0215
Copy link
Author

I found that it's not easy to setup property to import postgresql file.

@philsong
Copy link
Owner

replace the username to your real db username in sql file.

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