Re: Connection refused - subdomain problem suspected
Date: Thu, 5 Sep 2019 20:48:22 +0200
On Wed, Sep 04, 2019 at 11:45:04PM +0100, Richard G Elen via curl-library wrote:
> We use curl from PHP to pull in "now playing" metadata from our
> streaming server's "streaminfo" URL.
>
> During development, our developer used his own server to build the
> system and all was well.
>
> Now he has moved it over to a server we have commissioned from our
> hosting company specifically for the purpose, this call no longer works,
> and neither we (nor our hosting provider) can work out why. We would
> appreciate some suggestions.
>
> Our new database server has the hostname admin.ourstation.org ; our
> streaming server we can call streams.ourstation.org (domain anonymized).
>
> We're trying to pull in the data from
> https://streams.ourstation.org:2199/rpc/ourstation/streaminfo.get. It
> constantly returns "Failed to connect to streams.ourstation.org port
> 2199: Connection refused" - but only when accessed from our
> admin.ourstation.org host. All other machines we can test from return
> the data flawlessly.
>
> We cannot access the command line on the new server ourselves, but our
> hosting provider tells us that if they run it as a curl command it works
> fine.
My recommendation is to get another hosting provider. Either one who knows how
to debug networks and local processes, or one who gives you a shell access so that
you can debug it yourself. Asking for a help with debugging a blackbox on
a random mail list is the worst thing you can do.
> TEST CODE
>
> <?php
> header("Content-type: application/json; charset=utf-8");
>
So you are openning a TCP connection from a webserver process? That suggests
a lot. E.g. the operating system asserts a security policy that prevent from
that and as a result your program obtains ENOPERM or a similar error on the
connect() call. If it is a RHEL-based system, it will be caused by the default
SELinux policy.
-- Petr
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
- application/pgp-signature attachment: signature.asc