self host problem
bahanni opened this issue · comments
I tried to do self host but I found this problem
sudo docker-compose run web npm install
npm notice npm notice New patch version of npm available! 8.5.0 -> 8.5.4 npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.5.4 npm notice Run npm install -g npm@8.5.4 to update! npm notice npm ERR! code ERR_SOCKET_TIMEOUT npm ERR! errno ERR_SOCKET_TIMEOUT npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/@parcel%2fpackage-manager: Socket timeout npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config' npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-03-17T15_00_18_103Z-debug-0.log ERROR: 1
youssef@youssef-HP-EliteBook-840-G3:~/Desktop/Farmbot-Web-App$ sudo docker-compose run web bundle exec rails db:create db:migrate Creating farmbot-web-app_web_run ... done [DEPRECATION] Rack::Attack.throttled_response is deprecated. Please use Rack::Attack.throttled_responder instead connection to server at "172.18.0.2", port 5432 failed: FATAL: password authentication failed for user "postgres" Couldn't create 'farmbot_development' database. Please check your configuration. rails aborted! ActiveRecord::NoDatabaseError: connection to server at "172.18.0.2", port 5432 failed: FATAL: password authentication failed for user "postgres" Caused by: PG::ConnectionBad: connection to server at "172.18.0.2", port 5432 failed: FATAL: password authentication failed for user "postgres" Tasks: TOP => db:create (See full trace by running task with --trace) ERROR: 1
I modified the .env file with the following configuration:
MQTT_HOST=196.200.150.227 # I made a random IP
MAX_POOL_SIZE=2
API_HOST=196.200.150.227 # I made a random IP
API_PORT=3000
POSTGRES_PASSWORD=Josef&bhnhd432
DEVISE_SECRET=078d4427d05594b68d756f7e0e4085d6a7ca5a3c3cd0623260d2c0b5aaaf72f6865d14b7ca9c9ae98bd26b6b7318eb6c7bc09d2800326b6f61f0922adff110f8
ADMIN_PASSWORD=Josef&bhnhd432
SECRET_KEY_BASE=3f8793dc6ebfb03d60dfc007122e3eea1aeeb1eb81a4b02d7f5285345058d645d06fc25b3da4f871f3e8db6a7ae93d77e25258d140ce204a7357a01c5a24ab94
NO_EMAILS=TRUE
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
DOCS=Seto_yo_k22
RUN_CAPYBARA=true
EXTRA_DOMAINS=staging.farm.bot,whatever.farm.bot
RSA_KEY=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDlTx5xoglCnCv1kP9+n+f3sPV7weaeg/Mu8AeMS5SjZtJibFaQjfEtmRs/z3KFKcK9Yxi72QwW1/YJqMhG9IPgEzac3xGNhHg3cX/T2rzTqy4a2E55sx5M8EUGYHQm6gmwETxGG+8xslM7pvw/mdhZ9SHYE+LLHcZTbIRxlebOmGIHw5DS7sWuxl15goo6zsZ0cb3a2D2AKV8SE1EK4qEV3uZbAO7Tv1Kl7wFPQ+Q0VjsWAMjDb3d8WcKbg1MocyyUo1lkyrIJxE2SDCZOwt1NqA2l9j2Fcp3Iw3th79yrDLcQuEMywj61LteFcXjSMfE8SKu8YkbwFHRHualLC1e/ youssef@youssef-HP-EliteBook-840-G3
NO_CLEAN=true
DATADOG_CLIENT_TOKEN=??
CUSTOMER_SUPPORT_SUBSCRIBERS=alice@protonmail.com,bob@yahoo.com
FEEDBACK_WEBHOOK_URL=http://localhost:3000/home/youssef/Desktop/Farmbot-Web-App
AUTHORIZED_PUBLISHER=foo@bar.com
npm ERR! code ERR_SOCKET_TIMEOUT
As the error message indicates, "This is a problem related to network connectivity. In most cases you are behind a proxy or have bad network settings." If your internet connection is otherwise working, it could be that you have a network setup that NPM has a hard time with, such as a VPN, proxy, double NAT, etc.
password authentication failed for user "postgres"
POSTGRES_PASSWORD
must not include special characters.
.env
file
I would recommend removing all except:
MQTT_HOST
API_HOST
API_PORT
POSTGRES_PASSWORD
DEVISE_SECRET
ADMIN_PASSWORD
SECRET_KEY_BASE
NO_EMAILS
Also make sure the IP addresses are your actual IP address in the file itself.
up to date, audited 1438 packages in 8s 191 packages are looking for funding run `npm fund` for details 11 vulnerabilities (7 moderate, 4 high) To address issues that do not require attention, run: npm audit fix Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. npm notice npm notice New patch version of npm available! 8.5.0 -> 8.5.5 npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.5.5 npm notice Run npm install -g npm@8.5.5 to update! npm notice Creating farmbot-web-app_web_run ... done [DEPRECATION] Rack::Attack.throttled_response is deprecated. Please use Rack::Attack.throttled_responder instead connection to server at "172.18.0.2", port 5432 failed: FATAL: password authentication failed for user "postgres" Couldn't create 'farmbot_development' database. Please check your configuration. rails aborted! ActiveRecord::NoDatabaseError: connection to server at "172.18.0.2", port 5432 failed: FATAL: password authentication failed for user "postgres" Caused by: PG::ConnectionBad: connection to server at "172.18.0.2", port 5432 failed: FATAL: password authentication failed for user "postgres" Tasks: TOP => db:create (See full trace by running task with --trace) ERROR: 1
how i can get :
MQTT_HOST ??
API_HOST ??
i don't use the proxy my fille ~/.npmrc :
unsafe-perm=true prefix=/home/youssef/.npm-global timeout=300000 prefer-offline=true
For MQTT_HOST
and API_HOST
, use the last IP address in the output of hostname -I
.