Create new Site error when installing erpnext on a fresh ubuntu 16.04 server

I don’t think “bench reinstall” is a valid command.

I did succeed first time. Then I couldn’t log in. So I’m trying to install on another server. And, as for the old one, in which I can’t login, trying bench update (Maybe I tried already, still trying again). Will let you know what happens.

Nah, this isn’t working either. Still the same.And for some unknown reason, my server, this one is damn slow. Still that verifying stage and nothings going ahead from there.

Hi, It actually exists if you use latest bench version. Here is --help output from my installation:

frappe@ubuntu:~/frappe-bench$ bench --help
Usage:  [OPTIONS] COMMAND [ARGS]...

  Bench manager for Frappe

Options:
  --version
  --help     Show this message and exit.

Commands:
  backup                 backup site
  backup-all-sites       backup all sites
  config                 change bench configuration
  disable-production     Disables production environment for the...
  download-translations  Download latest translations
  get-app                clone an app from the internet and set it up...
  init                   Create a new bench
  install                Install system dependancies
  new-app                start a new app
  new-site               Create a new site in the bench
  prepare-staging        Prepare staging branch from develop branch
  release                Release app (internal to the Frappe team)
  remote-reset-url       Reset app remote url to frappe official
  remote-set-url         Set app remote url
  remote-urls            Show apps remote url
  remove-app             completely remove app from bench
  renew-lets-encrypt     Renew Let's Encrypt certificate
  restart                Restart supervisor processes
  retry-upgrade
  set-default-site       Set default site for bench
  set-mariadb-host       Set MariaDB host for bench
  set-nginx-port         Set nginx port for site
  set-ssl-certificate    Set ssl certificate path for site
  set-ssl-key            Set ssl certificate private key path for site
  set-url-root           Set url root for site
  setup                  Setup bench
  shell
  src                    Prints bench source folder path, which can be...
  start                  Start Frappe development processes
  switch-to-branch       Switch all apps to specified branch, or...
  switch-to-develop      Switch frappe and erpnext to develop branch
  switch-to-master       Switch frappe and erpnext to master branch
  update                 Update bench
()
Framework commands:

  add-system-manager          Add a new system manager to a site
  add-to-email-queue          Add an email to the Email Queue
  backup                      Backup
  build                       Minify + concatenate JS and CSS files, build...
  build-docs                  Setup docs in target folder of target app
  build-message-files         Build message files for translation
  bulk-rename                 Rename multiple records via CSV file
  clear-cache                 Clear cache, doctype cache and defaults
  clear-limits                Clears given limit from the site config, and...
  clear-website-cache         Clear website cache
  console                     Start ipython console for a site
  destroy-all-sessions        Clear sessions of all users (logs them out)
  disable-scheduler           Disable scheduler
  disable-user
  doctor                      Get diagnostic info about background workers
  drop-site
  enable-scheduler            Enable scheduler
  execute                     Execute a function
  export-csv                  Export data import template with data for...
  export-doc                  Export a single document to csv
  export-fixtures             Export fixtures
  export-json                 Export doclist as json to the given path, use...
  get-untranslated            Get untranslated strings for language
  import-csv                  Import CSV using data import
  import-doc                  Import (insert/update) doclist.
  import-translations         Update translated strings
  install-app                 Install a new app to site
  list-apps                   List apps in site
  make-app                    Creates a boilerplate app
  make-demo                   Reinstall site and setup demo
  migrate                     Run patches, sync schema and rebuild...
  mysql                       Start Mariadb console for a site
  new-language                Create lang-code.csv for given app
  new-site                    Create a new site
  publish-realtime            Publish realtime event from bench
  purge-jobs                  Purge any pending periodic tasks, if event...
  ready-for-migration
  rebuild-global-search       Setup help table in the current site (called...
  reinstall                   Reinstall site ie.
  reload-doc                  Reload schema for a DocType
  reload-doctype              Reload schema for a DocType
  remove-from-installed-apps  Remove app from site's installed-apps list
  request                     Run a request as an admin
  reset-perms                 Reset permissions for all doctypes
  restore                     Restore site database from an sql file
  run-patch                   Run a particular patch
  run-setup-wizard-ui-test    Run setup wizard UI test
  run-tests                   Run tests
  run-ui-tests                Run UI tests
  schedule
  scheduler
  serve                       Start development web server
  set-admin-password          Set Administrator password for a site
  set-config                  Insert/Update a value in site_config.json
  set-last-active-for-user    Set users last active date to current...
  set-limit                   Sets user / space / email limit for a site
  set-limits
  set-maintenance-mode
  setup-global-help           setup help table in a separate database that...
  setup-help                  Setup help table in the current site (called...
  show-pending-jobs           Get diagnostic info about background jobs
  trigger-scheduler-event     Trigger a scheduler event
  uninstall-app               Remove app and linked modules from site
  update-translations         Update translated strings
  use                         Set a default site
  version                     Show the versions of all the installed apps
  watch                       Watch and concatenate JS and CSS files as and...
  worker

Well, reinstalled my site; bench update; reinstalled erpnext app. But can’t load my site.

Anyway, guys thanks. I will keep trying. Thanks for all the help. Really appreciate it.

@fnrfarid
any update i have the same issue with administrator login

Sorry Brother, still the same. Let’s see what happens. Hopefully there will be an official solution to this. :slight_smile:

hello bro i face the same problem now .
just i want you to explain your solve to me with commands and steps because iam beginner

TASK [create a new default site] ***********************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “new-site”, “site1.local”, “–admin-password”, “asd”, “–mariadb-root-password”, “asdasd”], “delta”: “0:00:02.119695”, “end”: “2018-01-14 06:23:58.202955”, “failed”: true, “rc”: 1, “start”: “2018-01-14 06:23:56.083260”, “stderr”: “ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)”, “stderr_lines”: [“ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)”], “stdout”: “Database not installed, this can due to lack of permission, or that the database name exists.\nCheck your mysql root password, or use --force to reinstall”, “stdout_lines”: [“Database not installed, this can due to lack of permission, or that the database name exists.”, “Check your mysql root password, or use --force to reinstall”]}
to retry, use: --limit @/tmp/.bench/playbooks/develop/install.retry

PLAY RECAP *********************************************************************
localhost : ok=48 changed=28 unreachable=0 failed=1

i try more over 5 times to setup it on a fresh server and it’s give me errors every time 4 days till now am trying but nothing .

Try this for login problem its working for me

sudo update-rc.d redis-server disable
sudo service redis-server stop
sudo supervisorctl start all

Thanks. It’s working. [login issue] :slight_smile:

Great but check if you have this problem

Brother, the server I’ve installed is super slow for some unknown reason. I’m gonna try to install again on a fresh server and then try all this. I will get back to you if I face this problem.

Thanks

Finally i finished the installation successfully :joy::joy:

hello guys @Alaa_Badri @Mohamed_khalifa @anebi @benjamin i just solved the problem right now :smile: but i will apply a pull request to the main bench repo to apply the solution :smiley:
i wish if they accept my pull request to solve this serious problem, its under pull request " fix-mysql-error " by elba7r.

Best Regards

1 Like

TASK [bench : Install ERPNext to default site] ************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “–site”, “site1.local”, “install-app”, “erpnext”], “delta”: “0:00:10.967035”, “end”: “2019-04-09 15:11:06.699468”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2019-04-09 15:10:55.732433”, “stderr”: “”, “stderr_lines”: [], “stdout”: “Could not find app "erpnext"”, “stdout_lines”: [“Could not find app "erpnext"”]}
to retry, use: --limit @/tmp/.bench/playbooks/site.retry

i am facing this error in production version

Hello
This fixed this:

Specifically step #4 and #5 if needed!

I am getting below error.

and here is the screenshots of different .cnf files

/etc/mysql/conf.d/mysql.cnf :point_down:

/etc/mysql/mariadb.conf.d/50-server.cnf :point_down:

/etc/mysql/my.cnf

/etc/mysql/mysql.conf.d/mysql.cnf

/etc/mysql/mysql.conf.d/mysqld.cnf

I have read many articles and very confused what to change in which file.

I am getting below error.

and here is the screenshots of different .cnf files

/etc/mysql/conf.d/mysql.cnf :point_down:

/etc/mysql/mariadb.conf.d/50-server.cnf :point_down:

/etc/mysql/my.cnf

/etc/mysql/mysql.conf.d/mysql.cnf

/etc/mysql/mysql.conf.d/mysqld.cnf