Malformed request line #4047
Unanswered
new-user-name
asked this question in
Help needed
Replies: 1 comment
-
|
I get this error frequently in our Gitlab CI pipelines (seemingly at random) and it's extremely annoying. There seems to be no pattern to it, and re-running the same identical pipeline always works the second time. I get the same error on a variety of projects and deployment targets so really think the issue must be internal to deployer somewhere. <?php
namespace Deployer;
use Illuminate\Support\Facades\Http;
require 'recipe/laravel.php';
// Config
set('repository', 'git@gitlab.example.com:super-secret-project.git');
set('gitlab_project_id', 123);
set('chat_webhook', 'https://chat.googleapis.com/v1/spaces/SPACEID');
add('shared_dirs', [
'storage',
'docker',
]);
// Hosts
host('staging')
->setDeployPath('~/staging')
->setHostname('example.com')
->setRemoteUser('staging')
->setSshArguments([
'-o StrictHostKeyChecking=accept-new',
])
->set('branch', 'develop')
->set('php_version', 8.4)
->set('identity_file', fn () => $_ENV['DEPLOY_PRIVATE_KEY'] ?? '');
host('live')
->setDeployPath('~/production')
->setHostname('example.com')
->setRemoteUser('production')
->setSshArguments([
'-o StrictHostKeyChecking=accept-new',
])
->set('branch', 'main')
->set('php_version', 8.4)
->set('identity_file', fn () => $_ENV['DEPLOY_PRIVATE_KEY'] ?? '');
// Hooks
after('deploy:symlink', 'artisan:horizon:terminate');
after('deploy:symlink', 'docs:build');
after('deploy:failed', 'deploy:unlock');
// Tasks
task('artisan:landlord:migrate', artisan('migrate --force --path=database/migrations/landlord --database=landlord', ['skipIfNoEnv']));
task('artisan:tenant:migrate', artisan('tenants:artisan "migrate --force"', ['skipIfNoEnv']));
task('artisan:tenant:optimize', artisan('tenants:artisan "optimize"', ['skipIfNoEnv']));
task('npm:build', function () {
$commands = [
'cd {{release_path}}',
'export NVM_DIR="$HOME/.nvm"',
'[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"',
'nvm install --lts',
'nvm use --lts',
'npm install',
'npm run build',
'rm -rf node_modules',
];
run(implode(' && ', $commands));
});
task('docs:build', function () {
$commands = [
'cd {{release_path}}',
'{{bin/php}} {{bin/artisan}} tenants:artisan "scribe:generate" --tenant=1',
];
run(implode(' && ', $commands));
});
task('notify:chat', function () {
if (! get('gitlab_project_id') || ! get('chat_webhook')) {
return;
}
$revision = run('cd {{release_path}} && cat REVISION');
Http::post('https://example.com/api/deployment-notification', [
'commit_project_id' => get('gitlab_project_id'),
'commit_sha' => $revision,
'chat_webhook' => get('chat_webhook'),
]);
})->select('live');
task('deploy', [
'deploy:prepare',
'deploy:vendors',
'artisan:storage:link',
'npm:build',
'artisan:landlord:migrate',
'artisan:tenant:migrate',
'artisan:optimize:clear',
'artisan:tenant:optimize',
'deploy:publish',
'notify:chat',
]);In this case the exception happened immediately after |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Deployer Version
8.0
Target OS
Windows 11
Which PHP version are you using?
PHP 8.4
Content of deploy.php or deploy.yaml
Steps to reproduce
vendor/bin/dep rsyncfrom Windows 11 to Ubuntu 24,
Malformed request lineerror in console, Server.php, line 167.This gives empty line
Beta Was this translation helpful? Give feedback.
All reactions