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

Error in docker container #144

Open
LfJohnVo opened this issue Aug 3, 2023 · 1 comment
Open

Error in docker container #144

LfJohnVo opened this issue Aug 3, 2023 · 1 comment

Comments

@LfJohnVo
Copy link

LfJohnVo commented Aug 3, 2023

Doesnt work compile:

desarrollo@tabantaj-int:/var/contenedores/tabantaj$ sudo docker-compose exec php php artisan opcache:compile --force
Compiling scripts...

Illuminate\Http\Client\RequestException

HTTP request returned status code 500:

at vendor/laravel/framework/src/Illuminate/Http/Client/Response.php:272
268▕ /
269▕ public function toException()
270▕ {
271▕ if ($this->failed()) {
➜ 272▕ return new RequestException($this);
273▕ }
274▕ }
275▕
276▕ /
*

  +15 vendor frames 

16 artisan:35
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

@JusminCode
Copy link

A 500 error typically indicates an issue on the server-side.

If possible, try sending the same HTTP request outside of the Docker container, for example, using a tool like Postman or cURL. This can help determine if the issue is specific to the Docker environment.If the issue is within your Laravel application, you might want to add some additional error handling to your code to capture more information about the response that's causing the exception. You can catch the RequestException and then log or dump the response to get more details about the error. For example:

use Illuminate\Support\Facades\Http;
use Illuminate\Http\Client\RequestException;

try {
    $response = Http::get('your_url_here');
    // Process the response
} catch (RequestException $e) {
    // Log or dump the response
    dd($e->response);
}

Remember to replace 'your_url_here' with the actual URL you're requesting.

Ensure that your Docker container can access the necessary network resources to make external requests. If your Docker network configuration is restricted, it could cause issues with outbound HTTP requests.
By investigating these areas, you should be able to narrow down the cause of the 500 error and take appropriate steps to address it.

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