Open mingjiahui opened 3 years ago
And If I follow theappconfig.json
file you gave, there will be another error like:
info: Custom response `res.serverError()` called with an Error: { AdapterError: Unexpected error from database adapter: `count` failed ("badConnection"). A connection either could not be obtained or there was an error using the connection.
Additional data:
{ error:
{ error: password authentication failed for user "admin"
at Connection.parseE (/home/hnu/go/src/github.com/hyperledger/airmedfoundation-terminal/node_modules/pg/lib/connection.js:569:11)
at Connection.parseMessage (/home/hnu/go/src/github.com/hyperledger/airmedfoundation-terminal/node_modules/pg/lib/connection.js:396:17)
at Socket.<anonymous> (/home/hnu/go/src/github.com/hyperledger/airmedfoundation-terminal/node_modules/pg/lib/connection.js:132:22)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at TCP.onread (net.js:601:20)
hello, @Alex99y.
I encountered the above error when running./ init.sh
Command.
There is no problem in the project EXCEPT for the error in explore. Could you help me take a look, please!! I really need your help~~
Hello @mingjiahui ! I'm sorry, the project is no longer being maintained. Try this:
^
from package.json (This allow npm to install greater versions)./init.sh
If you are using Docker to set up the database, the user, password, and database name should be right. If not, you need to set up the configuration of postgresdb (Please use pgl version 11.2)Hello @mingjiahui ! I'm sorry, the project is no longer being maintained. Try this:
* Check the README.md updates in #15 * REMOVE ALL `^` from package.json (This allow npm to install greater versions) * Remove node_modules and package-lock.json * npm install * `./init.sh` If you are using Docker to set up the database, the user, password, and database name should be right. If not, you need to set up the configuration of postgresdb (Please use pgl version 11.2)
Yes, I'm using Docker, and I'm sure the parameters are in accordance with docker-compose.yaml to set up. And I'll try as you suggest, Thanks again!
Hi @Alex99y, I've tried as you suggest, but it's doesn't work for me. Could you please have a look?
my docker-compose.yaml file:
version: '2'
services:
posgresql:
image: postgres:11.2
container_name: postgresql
ports:
- "5432:5432"
environment:
POSTGRES_DB: "airmed"
POSTGRES_USER: "airmed"
POSTGRES_PASSWORD: "LYbAWCErGttRsP9y"
volumes:
- data_psql:/var/lib/postgresql/data
redis:
image: redis:4.0
container_name: redis
ports:
- "6379:6379"
volumes:
- data_redis:/data
- ./redis.conf:/usr/local/etc/redis/redis.conf
entrypoint: redis-server /usr/local/etc/redis/redis.conf
volumes:
data_psql:
data_redis:
and my appconfig.json file: { "email": { "admin":"admin_email@gmail.com", "auth": { "user": "admin_email@gmail.com", "pass": "password" }, "service": "Gmail", "emailVerification": 1 }, "database": { "adapter": "sails-postgresql", "user": "airmed", "password": "LYbAWCErGttRsP9y", "port": "5432", "host": "localhost", "database": "airmed" }, "session": { "name": "sails.sid", "secret": "secretKey", "redis": { "url": "redis://: redisPassword@127.0.0.1.com:6379/15", "host": "127.0.0.1", "port": 6379, "pass": "redisPassword", "db": 15 } }, "ipfs": { "host":"127.0.0.1", "port":"5001" } }
@mingjiahui do you tried to run sails before init.sh?
@mingjiahui do you tried to run sails before init.sh?
Yes, I did. and the project can run normally except for explore.
@mingjiahui what is not working in the explorer?. It is giving you an error? Or it is not updating the front end?
@Alex99y When I execute the./init.sh
command, this error occurs, and when I click explorer , the same error will appear on the front page.
@mingjiahui the problem might be in the sails-postgresql adapter. I'm sorry that I couldn't help with this. You need to check why the adapter is not connecting to the database, maybe need to be updated to the last version. Do you know if Sails has been connected to the database successfully?. That is because sails should create the database models after start.
@Alex99y okay, but thank you all the same!~~
please,I want know which port that the server is running at
Hi, I encountered the following error, could you please tell me how to solve it? Thank you in advance. I changed the
appconfig.json
like this:{ "email": { "admin":"admin_email@gmail.com", "auth": { "user": "admin_email@gmail.com", "pass": "password" }, "service": "Gmail", "emailVerification": 1 }, "database": { "adapter": "sails-postgresql", "user": "airmed", "password": "LYbAWCErGttRsP9y", "port": "5432", "host": "localhost", "database": "airmed" }, "session": { "name": "sails.sid", "secret": "secretKey", "redis": { "url": "redis://: redisPassword@127.0.0.1.com:6379/15", "host": "127.0.0.1", "port": 6379, "pass": "redisPassword", "db": 15 } }, "ipfs": { "host":"127.0.0.1", "port":"5001" } }
database:{... "user": "airmed", "password": "LYbAWCErGttRsP9y" ...}
is this right?Everything else is normal.