Support the ongoing development of Laravel.io →
posted 10 years ago
Packages

Hi,

I've set up Latchet on my vagrant box and start it using an artisan command on deployment:

public function fire()
{

  	Log::info("Latchet server starting");
	$command = "php artisan latchet:listen --env " . App::environment();
	$process = new Process($command);
	$process->start();
	sleep(1);
	if ($process->isRunning()) {
	    Log::info("Latchet Server is running.");
	    Log::info("Latchet pid: " . $process->getPid());
	} else {
		Log::info("Latchet Server is not running.");
		Log::info($process->getOutput());
	}
}

This works perfectly fine on my vagrant box. But when I run it on the EC2 instance by SSH-ing in It says the server is running and using port 1111 as it should, but when I check open ports 1111 is not there. When I actually run php artisan latchet:listen --env development when SSH-ed into the instance, it works fine (but then I can't close the terminal of course). So it seems it's just the artisan command that is not working.

At first I thought maybe the environment name isn't getting set properly with App::environment(), so I hard coded the environment name into the above after also checking that it was being set correctly via php artisan env - same result.

Because it works on my local vagrant box I don't think this is a Latchet problem. I doubt it's a Laravel problem either, but was hoping someone here may have run into it before because the AWS support forums are sometimes...slow to get useful responses from. Maybe someone here has an idea of what's going wrong?

Thanks in advance!

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

drakonka drakonka Joined 10 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.