#support

SigNoz Server Setup Issue: Connection Errors

TLDR Ruslan faced issues setting up SigNoz server, encountering connection errors. vishal-signoz suggested ensuring the machine port is open for exporter, checking OTLP collector logs, and using yaml file validator for troubleshooting. However, the issue remains unresolved.

Powered by Struct AI
Sep 15, 2023 (2 months ago)
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
07:31 AM
Hello, Support team. Hope all you are doing well.
This is Ruslan from Ukraine.
I have set up the SigNoz server on hosting and get some erros: Please check the screenshot.
[book@stage ]$ php htdocs/signoz.php 
Endpoint: 
Service Name: BookRetreats-PHP-Server
Insecure: true
Starting OTLP example[2023-09-14T13:24:41.005846+00:00] php-otlp-example.ERROR: Export failure {"exception":"[object] (RuntimeException(code: 0): Export retry limit exceeded at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php:114)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Psr18NetworkException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Psr18Client.php:130)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Chunk/ErrorChunk.php:65)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Response/CurlResponse.php:324)","source":"OpenTelemetry\\Contrib\\Otlp\\SpanExporter"} []
[2023-09-14T13:24:41.217725+00:00] php-otlp-example.ERROR: Export failure {"exception":"[object] (RuntimeException(code: 0): Export retry limit exceeded at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php:114)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Psr18NetworkException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Psr18Client.php:130)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Chunk/ErrorChunk.php:65)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Response/CurlResponse.php:324)","source":"OpenTelemetry\\Contrib\\Otlp\\SpanExporter"} []
[2023-09-14T13:24:41.513919+00:00] php-otlp-example.ERROR: Export failure {"exception":"[object] (RuntimeException(code: 0): Export retry limit exceeded at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php:114)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Psr18NetworkException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Psr18Client.php:130)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Chunk/ErrorChunk.php:65)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Response/CurlResponse.php:324)","source":"OpenTelemetry\\Contrib\\Otlp\\SpanExporter"} []
[2023-09-14T13:24:41.796673+00:00] php-otlp-example.ERROR: Export failure {"exception":"[object] (RuntimeException(code: 0): Export retry limit exceeded at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php:114)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Psr18NetworkException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Psr18Client.php:130)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Chunk/ErrorChunk.php:65)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Response/CurlResponse.php:324)","source":"OpenTelemetry\\Contrib\\Otlp\\SpanExporter"} []

OTLP complete!  

The log from my php server for instrumentation.
Please help me to sovle this.
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
07:47 AM
How did you instrument?
Are you using using http exporter or grpc?
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
07:47 AM
http
07:49
Ruslan
07:49 AM
I've set up the server by docker standalone
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
07:49 AM
Is <http://194.140.199.96:4318/v1/traces> accessible from your app?
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
07:49 AM
no
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
07:50 AM
That’s why there’s an error
07:50
vishal-signoz
07:50 AM
Please make sure exporter can export to 4318
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
07:50 AM
how can configure that?
07:51
Ruslan
07:51 AM
I've changed nothing
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
07:51 AM
How are you running SigNoz?
07:52
Ruslan
07:52 AM
please check here. 🙏
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
07:53 AM
Please expose 4318 port of the machine where you are running signoz
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
07:53 AM
to do that, what should I configure?
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
07:54 AM
That depends on machine on which you are running
07:54
vishal-signoz
07:54 AM
Is it on AWS/GCP? You can go settings of that machine and expose 4318
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
07:55 AM
Linux vmi1452187.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Purchased on Contabo
07:55
Ruslan
07:55 AM
Need to do with sudo command
07:59
Ruslan
07:59 AM
yes, I expose 4318 port of my machine.
with this command: sudo ufw allow 4318/tcp

What is the next?
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
07:59 AM
Try sending data now
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
08:00 AM
but still http://194.140.199.96:4318/v1/traces is not working
08:00
Ruslan
08:00 AM
Image 1 for
08:01
Ruslan
08:01 AM
after set up the SigNoz server primarily by docker standalone guide,
is there anything to change the setting for port 4318?
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
08:03 AM
Can you please run: docker ps
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
08:03 AM
Image 1 for
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
08:04 AM
Your signoz otel collector is restarting
08:04
vishal-signoz
08:04 AM
Can you check logs of that
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
08:05 AM
Image 1 for
08:05
Ruslan
08:05 AM
Still restarting
08:05
Ruslan
08:05 AM
what is the problem?
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
08:06 AM
Check logs of otel collector by running: docker logs -f &lt;container-id&gt;
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
08:11 AM
In the logs, there is a error in these lines.
is this wrong?
Image 1 for In the logs, there is a error in these lines.
is this wrong?
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
08:11 AM
What’s the error?
Please share logs
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
08:14 AM
Image 1 for
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
08:14 AM
Check line 39
08:15
vishal-signoz
08:15 AM
Use a yaml file validator: https://www.yamllint.com/
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
08:18 AM
Image 1 for
08:18
Ruslan
08:18 AM
the error occured in "cors:"
08:24
Ruslan
08:24 AM
what is the problem there, vishal-signoz
08:24
Ruslan
08:24 AM
?
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
08:27 AM
Have you used tabs?
Can you copy and share you config here?
08:28
vishal-signoz
08:28 AM
endpoint should have colon :
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
08:29 AM
ahh
08:29
Ruslan
08:29 AM
Ok, let me fix it and restart again
08:38
Ruslan
08:38 AM
Yes. It works
08:38
Ruslan
08:38 AM
Image 1 for
08:38
Ruslan
08:38 AM
But still same error
[book@stage stage.bookretreats.com]$ php htdocs/signoz.php
Endpoint: http://194.140.199.96:4318/v1/traces
Service Name: BookRetreats-PHP-Server
Insecure: true
Starting OTLP example[2023-09-14T13:24:41.005846+00:00] php-otlp-example.ERROR: Export failure {"exception":"[object] (RuntimeException(code: 0): Export retry limit exceeded at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php:114)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Psr18NetworkException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"http://194.140.199.96:4318/v1/traces\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Psr18Client.php:130)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"http://194.140.199.96:4318/v1/traces\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Chunk/ErrorChunk.php:65)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"http://194.140.199.96:4318/v1/traces\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Response/CurlResponse.php:324)","source":"OpenTelemetry\\Contrib\\Otlp\\SpanExporter"} []
[2023-09-14T13:24:41.217725+00:00] php-otlp-example.ERROR: Export failure {"exception":"[object] (RuntimeException(code: 0): Export retry limit exceeded at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php:114)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Psr18NetworkException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"http://194.140.199.96:4318/v1/traces\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Psr18Client.php:130)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"http://194.140.199.96:4318/v1/traces\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Chunk/ErrorChunk.php:65)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"http://194.140.199.96:4318/v1/traces\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Response/CurlResponse.php:324)","source":"OpenTelemetry\\Contrib\\Otlp\\SpanExporter"} []
[2023-09-14T13:24:41.513919+00:00] php-otlp-example.ERROR: Export failure {"exception":"[object] (RuntimeException(code: 0): Export retry limit exceeded at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php:114)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Psr18NetworkException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"http://194.140.199.96:4318/v1/traces\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Psr18Client.php:130)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"http://194.140.199.96:4318/v1/traces\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Chunk/ErrorChunk.php:65)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"http://194.140.199.96:4318/v1/traces\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Response/CurlResponse.php:324)","source":"OpenTelemetry\\Contrib\\Otlp\\SpanExporter"} []
[2023-09-14T13:24:41.796673+00:00] php-otlp-example.ERROR: Export failure {"exception":"[object] (RuntimeException(code: 0): Export retry limit exceeded at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php:114)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Psr18NetworkException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"http://194.140.199.96:4318/v1/traces\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Psr18Client.php:130)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"http://194.140.199.96:4318/v1/traces\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Chunk/ErrorChunk.php:65)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\TransportException(code: 0): Failed to connect to 194.140.199.96 port 4318: Connection refused for \"http://194.140.199.96:4318/v1/traces\". at /var/www/html/bookretreats.com/stage.bookretreats.com/vendor/symfony/http-client/Response/CurlResponse.php:324)","source":"OpenTelemetry\\Contrib\\Otlp\\SpanExporter"} []

OTLP complete!
08:38
Ruslan
08:38 AM
from my php server
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
09:52 AM
Only explanation I have is that your machine’s port is not open
10:15
vishal-signoz
10:15 AM
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
12:42 PM
thanks, so I tried it.
what is this error?
Image 1 for thanks, so I tried it.
what is this error?
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
12:48 PM
It's unable to connect to your server
Ruslan
Photo of md5-1ffe02e844665affd08380a1a93fa7dc
Ruslan
02:46 PM
then what should I do?
Sep 16, 2023 (2 months ago)
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
11:46 PM
Expose the ports of your machine correctly

SigNoz Community

Built with ClickHouse as datastore, SigNoz is an open-source APM to help you find issues in your deployed applications & solve them quickly | Knowledge Base powered by Struct.AI

Indexed 1023 threads (61% resolved)

Join Our Community