Hello...
We're working with our developer to create a music royalty tracking database for our internet radio station.
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 that he has moved it over to a cPanel-based 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 cPanel-based database server has the hostname admin.ourstation.org ; our streaming server we can call streams.ourstation.org (NOTE: 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.
Our developer has done the following:
1. Run a test call (similar to that shown below - don't try it as the domains aren't real) from admin.ourstation.org to several other hosts and all return the desired data
2. Run the test call below from several other hosts to return data from streams.ourstation.org and all return the desired data
3. Our developer and I can both return data from streams.ourstation.org with manual curl calls from our desktop machines' command line.
4. Our developer has been able to recover data from streams.ourstation.org from the prototype system on his own server from the beginning (and still can).
So, from our cPanel server we can return data using curl from a wide variety of sources all successfully.
Similarly, we can pull data off our streaming server from virtually any host but NOT ours!
ONLY the test from admin.ourstation.org to streams.ourstation.org fails.
Are there challenges involving running curl between two hosts in the same domain? Anyone suggest a cause of this strangely specific issue?
We would be most grateful for any observations. Thanks in advance!
--Richard E
TEST CODE
<?php
header("Content-type: application/json; charset=utf-8");
$url = "https://streams.ourstation.org:2199/rpc/ourstation/streaminfo.get";
$mysession = curl_init();
curl_setopt($mysession, CURLOPT_URL, $url);
curl_setopt($mysession, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($mysession, CURLOPT_CONNECTTIMEOUT , 10);
curl_setopt($mysession, CURLOPT_FAILONERROR, true);
$json = json_decode(curl_exec($mysession), true);
if (curl_errno($mysession)) {
echo "error: " . curl_error($mysession);
}else{
echo json_encode($json,JSON_PRETTY_PRINT);
}
?>
We're working with our developer to create a music royalty tracking database for our internet radio station.
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 that he has moved it over to a cPanel-based 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 cPanel-based database server has the hostname admin.ourstation.org ; our streaming server we can call streams.ourstation.org (NOTE: 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.
Our developer has done the following:
1. Run a test call (similar to that shown below - don't try it as the domains aren't real) from admin.ourstation.org to several other hosts and all return the desired data
2. Run the test call below from several other hosts to return data from streams.ourstation.org and all return the desired data
3. Our developer and I can both return data from streams.ourstation.org with manual curl calls from our desktop machines' command line.
4. Our developer has been able to recover data from streams.ourstation.org from the prototype system on his own server from the beginning (and still can).
So, from our cPanel server we can return data using curl from a wide variety of sources all successfully.
Similarly, we can pull data off our streaming server from virtually any host but NOT ours!
ONLY the test from admin.ourstation.org to streams.ourstation.org fails.
Are there challenges involving running curl between two hosts in the same domain? Anyone suggest a cause of this strangely specific issue?
We would be most grateful for any observations. Thanks in advance!
--Richard E
TEST CODE
<?php
header("Content-type: application/json; charset=utf-8");
$url = "https://streams.ourstation.org:2199/rpc/ourstation/streaminfo.get";
$mysession = curl_init();
curl_setopt($mysession, CURLOPT_URL, $url);
curl_setopt($mysession, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($mysession, CURLOPT_CONNECTTIMEOUT , 10);
curl_setopt($mysession, CURLOPT_FAILONERROR, true);
$json = json_decode(curl_exec($mysession), true);
if (curl_errno($mysession)) {
echo "error: " . curl_error($mysession);
}else{
echo json_encode($json,JSON_PRETTY_PRINT);
}
?>