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

SQL exceptions when send requests. #1

Open
AlekseySorokin opened this issue Feb 14, 2017 · 3 comments
Open

SQL exceptions when send requests. #1

AlekseySorokin opened this issue Feb 14, 2017 · 3 comments

Comments

@AlekseySorokin
Copy link

При запуске vagrant up выполнение прерывается. Далее при последующих запросах к методам API возвращаются SQLExceptions.
Привожу логи из консоли:
==> universal-backend: Clearing any previously set forwarded ports...
==> universal-backend: Clearing any previously set network interfaces...
==> universal-backend: Preparing network interfaces based on configuration...
universal-backend: Adapter 1: nat
universal-backend: Adapter 2: hostonly
==> universal-backend: Forwarding ports...
universal-backend: 22 (guest) => 2222 (host) (adapter 1)
==> universal-backend: Running 'pre-boot' VM customizations...
==> universal-backend: Booting VM...
==> universal-backend: Waiting for machine to boot. This may take a few minutes...
universal-backend: SSH address: 127.0.0.1:2222
universal-backend: SSH username: vagrant
universal-backend: SSH auth method: private key
universal-backend: Warning: Remote connection disconnect. Retrying...
==> universal-backend: Machine booted and ready!
==> universal-backend: Checking for guest additions in VM...
universal-backend: The guest additions on this VM do not match the installed version of
universal-backend: VirtualBox! In most cases this is fine, but in rare cases it can
universal-backend: prevent things such as shared folders from working properly. If you see
universal-backend: shared folder errors, please make sure the guest additions within the
universal-backend: virtual machine match the version of VirtualBox you have installed on
universal-backend: your host and reload your VM.
universal-backend:
universal-backend: Guest Additions Version: 4.3.36
universal-backend: VirtualBox Version: 5.1
==> universal-backend: Setting hostname...
==> universal-backend: Configuring and enabling network interfaces...
==> universal-backend: Mounting shared folders...
universal-backend: /app => C:/Users/user/Desktop/Projects/NewU-editor/backend-app
==> universal-backend: Updating /etc/hosts file on active guest machines...
==> universal-backend: Updating /etc/hosts file on host machine (password may be required)...
==> universal-backend: Machine already provisioned. Run vagrant provision or use the --provision
==> universal-backend: flag to force provisioning. Provisioners marked to run always will still run.
==> universal-backend: Running provisioner: shell...
universal-backend: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20170214-18292-kofrwx.sh
==> universal-backend: stdin: is not a tty
==> universal-backend:
==> universal-backend: --> Provision-script user: root
==> universal-backend:
==> universal-backend:
==> universal-backend: --> Restart web-stack
==> universal-backend:
==> universal-backend: php5-fpm stop/waiting
==> universal-backend: * Restarting nginx nginx
==> universal-backend: ...done.
==> universal-backend: mysql stop/waiting
==> universal-backend: mysql start/running, process 1960
==> universal-backend: Running provisioner: shell...
universal-backend: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20170214-18292-z2gizu.sh
==> universal-backend:
==> universal-backend: --> Install project dependencies
==> universal-backend:
==> universal-backend: Loading composer repositories with package information
==> universal-backend: Installing dependencies (including require-dev) from lock file
==> universal-backend: Nothing to install or update
==> universal-backend: Generating autoload files
==> universal-backend: > php init --env=Development --overwrite=n
==> universal-backend: Yii Application Initialization Tool v1.0
==> universal-backend:
==> universal-backend:
==> universal-backend: Start initialization ...
==> universal-backend: exist backend/config/main-local.php
==> universal-backend: ...overwrite? [Yes|No|All|Quit]
==> universal-backend: skip backend/config/main-local.php
==> universal-backend: unchanged backend/config/params-local.php
==> universal-backend: unchanged backend/web/index-test.php
==> universal-backend: unchanged backend/web/index.php
==> universal-backend: unchanged common/config/main-local.php
==> universal-backend: unchanged common/config/params-local.php
==> universal-backend: unchanged console/config/main-local.php
==> universal-backend: unchanged console/config/params-local.php
==> universal-backend: unchanged tests/codeception/config/config-local.php
==> universal-backend: unchanged yii
==> universal-backend: generate cookie validation key in backend/config/main-local.php
==> universal-backend: chmod 0777 backend/runtime
==> universal-backend: chmod 0777 backend/web/assets
==> universal-backend: chmod 0755 yii
==> universal-backend: chmod 0755 tests/codeception/bin/yii
==> universal-backend:
==> universal-backend: ... initialization completed.
==> universal-backend:
==> universal-backend: --> Init project
==> universal-backend:
==> universal-backend: /usr/bin/env:
==> universal-backend: php
==> universal-backend: : No such file or directory
==> universal-backend:
==> universal-backend: --> Apply migrations
==> universal-backend:
==> universal-backend: /usr/bin/env:
==> universal-backend: php
==> universal-backend: : No such file or directory
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
`

Как решилась проблема

Выполнить по очереди в консоли из корня проекта:

  1. vagrant ssh;
  2. cd /app;
  3. php init;
  4. php yii migrate.

После выполнения этих команд запросы к серверу идут успешно и ответы приходят без ошибок.

@niksamokhvalov
Copy link
Member

Можешь сейчас проверить? Я подмержил новый код из yiisoft/yii2-app-advanced.

@AlekseySorokin
Copy link
Author

проблема актуальна

@AlekseySorokin
Copy link
Author

Bringing machine 'universal-backend' up with 'virtualbox' provider...
==> universal-backend: [vagrant-hostmanager:guests] Updating hosts file on active guest virtual machines...
==> universal-backend: [vagrant-hostmanager:host] Updating hosts file on your workstation (password may be required)...
==> universal-backend: Machine already provisioned. Run vagrant provision or use the --provision
==> universal-backend: flag to force provisioning. Provisioners marked to run always will still run.
==> universal-backend: Running provisioner: shell...
universal-backend: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20171227-13980-o9tzks.sh
==> universal-backend: mesg:
==> universal-backend: ttyname failed
==> universal-backend: :
==> universal-backend: Inappropriate ioctl for device
==> universal-backend:
==> universal-backend: --> Provision-script user: root
==> universal-backend:
==> universal-backend:
==> universal-backend: --> Restart web-stack
==> universal-backend:
==> universal-backend: Running provisioner: shell...
universal-backend: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20171227-13980-8fo8x5.sh
==> universal-backend:
==> universal-backend: --> Install project dependencies
==> universal-backend:
==> universal-backend: Loading composer repositories with package information
==> universal-backend: Installing dependencies (including require-dev) from lock file
==> universal-backend: Nothing to install or update
==> universal-backend: Package yiisoft/yii2-codeception is abandoned, you should avoid using it. Use codeception/codeception instead.
==> universal-backend: Generating autoload files
==> universal-backend: > php init --env=Development --overwrite=n
==> universal-backend: Yii Application Initialization Tool v1.0
==> universal-backend:
==> universal-backend: Start initialization ...
==> universal-backend: exist backend/config/main-local.php
==> universal-backend: ...overwrite? [Yes|No|All|Quit]
==> universal-backend: skip backend/config/main-local.php
==> universal-backend: unchanged backend/config/params-local.php
==> universal-backend: unchanged backend/config/test-local.php
==> universal-backend: unchanged backend/web/index-test.php
==> universal-backend: unchanged backend/web/index.php
==> universal-backend: unchanged backend/web/robots.txt
==> universal-backend: unchanged common/config/main-local.php
==> universal-backend: unchanged common/config/params-local.php
==> universal-backend: unchanged common/config/test-local.php
==> universal-backend: unchanged console/config/main-local.php
==> universal-backend: unchanged console/config/params-local.php
==> universal-backend: unchanged frontend/config/main-local.php
==> universal-backend: unchanged frontend/config/params-local.php
==> universal-backend: unchanged frontend/config/test-local.php
==> universal-backend: unchanged frontend/web/index-test.php
==> universal-backend: unchanged frontend/web/index.php
==> universal-backend: unchanged frontend/web/robots.txt
==> universal-backend: unchanged tests/codeception/config/config-local.php
==> universal-backend: unchanged yii
==> universal-backend: unchanged yii_test
==> universal-backend: unchanged yii_test.bat
==> universal-backend: generate cookie validation key in backend/config/main-local.php
==> universal-backend: chmod 0777 backend/runtime
==> universal-backend: chmod 0777 backend/web/assets
==> universal-backend: chmod 0755 yii
==> universal-backend: chmod 0755 tests/codeception/bin/yii
==> universal-backend:
==> universal-backend: ... initialization completed.
==> universal-backend:
==> universal-backend: --> Init project
==> universal-backend:
==> universal-backend: /usr/bin/env:
==> universal-backend: ‘php\r’
==> universal-backend: : No such file or directory
==> universal-backend:
==> universal-backend: --> Apply migrations
==> universal-backend:
==> universal-backend: /usr/bin/env:
==> universal-backend: ‘php\r’
==> universal-backend: : No such file or directory
==> universal-backend:
==> universal-backend: --> Apply fixtures
==> universal-backend:
==> universal-backend: /usr/bin/env:
==> universal-backend: ‘php\r’
==> universal-backend: : No such file or directory
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

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