Curl request on Laravel droplet returns error 'curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)'

The following curl request works fine on my local machine, however when run from my DigitalOcean droplet it fails and returns the following error, when run locally this works fine and returns json.

curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)

Below is the curl request that my droplet is running, I am using the following Laravel marketplace image

curl --location '' \
--header 'authority:' \
--header 'accept: application/json' \
--header 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'origin:' \
--header 'referer:' \
--header 'sec-ch-ua: "Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-site' \
--header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36' \
--header 'Cookie: ak_bmsc=7C4D7C74A50E70A1569B347E0F0398B7~000000000000000000000000000000~YAAQ1LD3SDdB4h2LAQAASE1rLhU8V1WJChws4/bSmlwTnZjTwl4cjqbgHmlo652pG/bBFdNs7PUu/rEl/9t6BDJ86iYSiQLCeWV+H4WqsuMElhzj0iR2kowoon4OWPQ2Xzmv2R7jSRwjnywvE5wduE0Qx/vwYGXC60FxbXHrUR4J5IgOTspKJo1ofmO6Wij8v6RFuygTt09ht3gF0jiYysXYKChfOeAxk74X3H6ZBn/XZ5D/BjqkoSgGtOQtlCn8LTYX0msvoDG/WDrzh1sGsR6qPg1SmLwJCOQIlhLyqVuqe7o3OR/PbRh9fFA0EmwCqbOq8NUN6B2JdV/Hc7im2PoTEG+OtaSADfEeilWwtGaotRt7fprM2g=='

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Site Moderator
Site Moderator badge
October 18, 2023


The error message you’re encountering, “HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2),” suggests an issue with the HTTP/2 connection when running the curl request on your DigitalOcean droplet. This error typically occurs when there is a problem with the HTTP/2 connection, and it can be caused by various factors.

Update cURL: Ensure that curl on your DigitalOcean droplet is up to date.

sudo apt-get update
sudo apt-get install --only-upgrade curl

Having said that, it’s hard to pinpoint the exact issue without more information on the matter.

Bobby Iliev
Site Moderator
Site Moderator badge
October 16, 2023

Hi there,

I can see that the curl request that you’ve shared seems to be already working as expected now.

Would you mind sharing here with the community how you fixed the issue?

If this is still not working for you it could be due to the curl version that you have installed, of you were to run curl --version what is the version that you have?



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel