So we’re building a web application in PHP and we’re trying to make requests to an external API. Problem is that we’re getting a curl error:
cURL error 7: Failed to connect to external.api.com port 443: No route to host
A little bit of background now.
- We’re making requests using Guzzle.
- We’re hosting on Apache, which is running on a Linux machine and we’re also using SSL.
- The API is also using SSL, therefore the port 443 in error message.
- The HTTP requests include a certificate for authentication.
I’ve managed to get it running on two different development environments but not on the production one. I suspect the problem is in the configuration of Apache, as if we haven’t made it available to make requests to certain IP or port. I have no idea how to check it. I’ve read that I might have to change the file /etc/network/interface yet I haven’t found any info on what to write there.
I’ve also read I have to run $ netstat -rn for answers yet I’m not sure what to look there.
подключение к сокету:
[Errno 113] No route to host
Все перепробовал, добавлял rule для firewall но не помогло. Отключать firewall нельзя так как gitlab-runner не будет работать.
- Вопрос задан 30 янв.
- 527 просмотров
chupasaurus, network_mode не установлен. Установил утелиту tcping на centos.
Запускаю туже команду на локалке mac:
Но в чем не понятная/мистическая штука в том что данный код на продакшене (Centos 7) иногда работает.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto | Site FAQ | Sitemap | Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
|Introduction to Linux — A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author’s experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.