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

One project's deployment is cancelled, and I don't know why ? #365

Open
adaniloff opened this issue Feb 20, 2018 · 8 comments
Open

One project's deployment is cancelled, and I don't know why ? #365

adaniloff opened this issue Feb 20, 2018 · 8 comments

Comments

@adaniloff
Copy link

Before submitting your issue, please make sure that you've checked all of the checkboxes below.

  • [ x ] I'm running the 0.0.46 version of Deployer.
  • ! I'm running PHP 5.6.3 instead of PHP 5.6.4
  • [ x ] I've ran composer install --no-dev from the root of my installation.
  • [ x ] I've ran npm install --production from the root of my installation.
  • [ x ] You've ran rm -rf bootstrap/cache/* from the root of your installation.
  • [ x ] I have restarted the queue listener and node socket server.

Expected behaviour

The deployment to be successful (or, at least, get a verbose message of what's going on).

Actual behaviour

So...
I got a setup with like ... 20 different projects.
All of them were working fine but since yesterday : we got one of our projects which doesn't work (by that I mean, cannot be deployed) anymore.
Actually, the process doesn't even start, it only prints "cancelled" in the first step (which is "Create new release"). Image below.

capture d ecran 2018-02-20 a 15 05 10

The weird stuff is, I got 2 others projects located on the same server, with the same user and same conf.

Only the bitbucket repositories are different so I don't know how it is possible that I can deploy the 2 projects successfully, but not the 3rd ?

Steps to reproduce

Click on the deploy button :)

Environment info

  • Operating System: Linux (debian)
  • PHP Version: 5.6.3
  • Node Version: 1.4.21
  • Database: MySQL Ver 14.14 Distrib 5.5.55

I tried a lot of things before coming here (also checking other similar issues) but nothing worked.

Thanks for your help :)

@adaniloff
Copy link
Author

up !

@adaniloff
Copy link
Author

up again, I tried to create a new project with the same repo and I still have the problem. The other new projects are fine tho.

@REBELinBLUE
Copy link
Owner

Apologises for the delay, I've been out of the country without a computer and I'm still catching up

Are you using the HTTP URL for the repository or the SSH URL? If the latter, have you remembered to add the SSH key to the repository?

Can you turn on debugging by running php artisan app:debug on and then try again, then posting the log file, specifically the storage/logs/cli-2018-03-06.log one?

@adaniloff
Copy link
Author

adaniloff commented Mar 6, 2018

No problem !

I'm using the SSH url, the configuration is the same for all my projects. Yes I added it ; if not the error will be displayed explicitly anyway so I'm 100% sure it is not the case here. Also, the project has also been deployed successfully multiple times before this problem's first occurence.

Here come the log :

[2018-03-06 11:00:01] production.DEBUG: ### Run script locally
bash -s << 'EOF'
    # Turn on quit on non-zero exit
    set -e
    ### Mirror git repository
chmod +x /home/www/deployer/storage/app/tmp/sshCnPSH0
export GIT_SSH=/home/www/deployer/storage/app/tmp/sshCnPSH0

if [ ! -d /home/www/deployer/storage/app/mirrors/git_bitbucket.org_leoogit_yara-es.git ]; then
    git clone --mirror [email protected]:leoogit/yara-es.git /home/www/deployer/storage/app/mirrors/git_bitbucket.org_leoogit_yara-es.git
fi

cd /home/www/deployer/storage/app/mirrors/git_bitbucket.org_leoogit_yara-es.git

git fetch --all --prune
EOF

[2018-03-06 11:00:02] production.DEBUG: ### Run script locally
bash -s << 'EOF'
    # Turn on quit on non-zero exit
    set -e
    ### Get commit details - 763
cd /home/www/deployer/storage/app/mirrors/git_bitbucket.org_leoogit_yara-es.git

git log master -n1 --pretty=format:"%H%x09%an%x09%ae"
EOF

[2018-03-06 11:00:02] production.DEBUG: ### Run script locally
bash -s << 'EOF'
    # Turn on quit on non-zero exit
    set -e
    ### Create release archive - 763
git clone --depth 1 --recursive /home/www/deployer/storage/app/mirrors/git_bitbucket.org_leoogit_yara-es.git /home/www/deployer/storage/app/tmp/clone_16_20180306110001
cd /home/www/deployer/storage/app/tmp/clone_16_20180306110001
git checkout 81eb51984024f877fc3b0698a6fbab0d2f072e71
/home/www/deployer/resources/scripts/tools/GitArchiveAll.sh --tree-ish 81eb51984024f877fc3b0698a6fbab0d2f072e71 --format tar.gz --verbose /home/www/deployer/storage/app/16_20180306105958.tar.gz
cd -
rm -rf /home/www/deployer/storage/app/tmp/clone_16_20180306110001
EOF

There is also a lot a logs for others projects, but I pasted here only the one I got a problem with.

@REBELinBLUE
Copy link
Owner

Hmm, odd

Bit of a hack but can you edit app/Jobs/DeployProject.php and on line 118 put

\Illuminate\Support\Facades\Log::error($error);

then restart the worker with php artisan queue:restart

then try again and then post the log, looks like there is an error occurring which is unexpected but being caught.

@adaniloff
Copy link
Author

Ok so I got it.
It seems that someone in my team committed a git submodule (a part of it actually) in the project. And deployer does not seem happy with it :)

We are removing this submodule (it should not have been here in the first time). It will probably fix the error. I'll report the result to you.

Anyway, Deployer was not alerting us about the error and I thing it's a feature/fix to work on, someday maybe :)

(Here come the error that shows up with your hack:)

[2018-03-07 17:34:43] production.ERROR: exception 'RuntimeException' with message 'Could not get repository info - Cloning into '/home/www/deployer/storage/app/tmp/clone_16_20180307173440'...
warning: --depth is ignored in local clones; use file:// instead.
done.
No submodule mapping found in .gitmodules for path 'src/Leoo/CatalogBundle'
' in /home/www/deployer/app/Jobs/DeployProject/ReleaseArchiver.php:61
Stack trace:
#0 [internal function]: REBELinBLUE\Deployer\Jobs\DeployProject\ReleaseArchiver->handle(Object(REBELinBLUE\Deployer\Services\Scripts\Runner))
#1 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(30): call_user_func_array(Array, Array)
#2 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#3 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#4 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#5 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array)
#6 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(114): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(REBELinBLUE\Deployer\Jobs\DeployProject\ReleaseArchiver))
#7 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(REBELinBLUE\Deployer\Jobs\DeployProject\ReleaseArchiver))
#8 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#9 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(75): Illuminate\Bus\Dispatcher->dispatchNow(Object(REBELinBLUE\Deployer\Jobs\DeployProject\ReleaseArchiver))
#10 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php(17): Illuminate\Bus\Dispatcher->dispatch(Object(REBELinBLUE\Deployer\Jobs\DeployProject\ReleaseArchiver))
#11 /home/www/deployer/app/Jobs/DeployProject.php(105): REBELinBLUE\Deployer\Jobs\DeployProject->dispatch(Object(REBELinBLUE\Deployer\Jobs\DeployProject\ReleaseArchiver))
#12 [internal function]: REBELinBLUE\Deployer\Jobs\DeployProject->handle(Object(REBELinBLUE\Deployer\Services\Filesystem\Filesystem))
#13 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(30): call_user_func_array(Array, Array)
#14 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#15 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#16 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#17 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array)
#18 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(114): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(REBELinBLUE\Deployer\Jobs\DeployProject))
#19 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(REBELinBLUE\Deployer\Jobs\DeployProject))
#20 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#21 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(43): Illuminate\Bus\Dispatcher->dispatchNow(Object(REBELinBLUE\Deployer\Jobs\DeployProject), NULL)
#22 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(69): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\BeanstalkdJob), Array)
#23 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(317): Illuminate\Queue\Jobs\Job->fire()
#24 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(267): Illuminate\Queue\Worker->process('beanstalkd', Object(Illuminate\Queue\Jobs\BeanstalkdJob), Object(Illuminate\Queue\WorkerOptions))
#25 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(113): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\BeanstalkdJob), 'beanstalkd', Object(Illuminate\Queue\WorkerOptions))
#26 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(102): Illuminate\Queue\Worker->daemon('beanstalkd', 'deployer-high,d...', Object(Illuminate\Queue\WorkerOptions))
#27 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(86): Illuminate\Queue\Console\WorkCommand->runWorker('beanstalkd', 'deployer-high,d...')
#28 [internal function]: Illuminate\Queue\Console\WorkCommand->fire()
#29 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(30): call_user_func_array(Array, Array)
#30 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#31 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#32 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Container/Container.php(539): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#33 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array)
#34 /home/www/deployer/vendor/symfony/console/Command/Command.php(264): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#35 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Console/Command.php(168): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#36 /home/www/deployer/vendor/symfony/console/Application.php(869): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#37 /home/www/deployer/vendor/symfony/console/Application.php(223): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#38 /home/www/deployer/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#39 /home/www/deployer/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#40 /home/www/deployer/artisan(46): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#41 {main}  

@adaniloff
Copy link
Author

Yes, it does work now. Thanks for the help !
I'd close the issue, but since the error is not displayed for the user I'm not sure if I should do it or not ?

So feel free to do it if you want to :)

Have a nice day !

@REBELinBLUE
Copy link
Owner

wow, that is very interesting, yeah sounds like there should be some sort of way to report on such errors with git so leave this open and I'll see if I can some up with some ideas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants