Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeException: Failed to write to socket: fwrite(): #145

Open
sanoopuio opened this issue Apr 5, 2023 · 2 comments
Open

RuntimeException: Failed to write to socket: fwrite(): #145

sanoopuio opened this issue Apr 5, 2023 · 2 comments

Comments

@sanoopuio
Copy link

try to connect Greylog via TCP shows below error

RuntimeException: Failed to write to socket: fwrite(): Send of 2897 bytes failed with errno=32 Broken pipe (8) in Gelf\Transport\StreamSocketClient->write() (line 226 of /app/vendor/graylog2/gelf-php/src/Gelf/Transport/StreamSocketClient.php).

@dakorpar
Copy link

See #154 if it helps.

@AdvermaMarkenkommunikation

It is not #154

root@dea892f5a17c:/var/www/importer-command# bin/console products:import -vvv

In StreamSocketClient.php line 139:
                                                                                                       
  [RuntimeException]                                                                                   
  Failed to write to socket: fwrite(): Send of 368 bytes failed with errno=111 Connection refused (8)  
                                                                                                       
Exception trace:
  at /var/www/importer-command/vendor/graylog2/gelf-php/src/Gelf/Transport/StreamSocketClient.php:139
 Gelf\Transport\StreamSocketClient->write() at /var/www/importer-command/vendor/graylog2/gelf-php/src/Gelf/Transport/UdpTransport.php:86
 Gelf\Transport\UdpTransport->send() at /var/www/importer-command/vendor/graylog2/gelf-php/src/Gelf/Publisher.php:63
 Gelf\Publisher->publish() at /var/www/importer-command/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php:48
 Monolog\Handler\GelfHandler->write() at /var/www/importer-command/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:44
 Monolog\Handler\AbstractProcessingHandler->handle() at /var/www/importer-command/vendor/monolog/monolog/src/Monolog/Logger.php:390
 Monolog\Logger->addRecord() at /var/www/importer-command/vendor/monolog/monolog/src/Monolog/Logger.php:593
 Monolog\Logger->debug() at /var/www/importer-command/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:280
 Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->postProcess() at /var/www/importer-command/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:133
 Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() at /var/www/importer-command/vendor/symfony/console/Application.php:1053
 Symfony\Component\Console\Application->doRunCommand() at /var/www/importer-command/vendor/symfony/framework-bundle/Console/Application.php:123
 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /var/www/importer-command/vendor/symfony/console/Application.php:316
 Symfony\Component\Console\Application->doRun() at /var/www/importer-command/vendor/symfony/framework-bundle/Console/Application.php:77
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/importer-command/vendor/symfony/console/Application.php:167
 Symfony\Component\Console\Application->run() at /var/www/importer-command/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:49
 Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at /var/www/importer-command/vendor/autoload_runtime.php:29
 require_once() at /var/www/importer-command/bin/console:15

Configuration in monolog.yml

            graylog:
                type: gelf
                publisher:
                    hostname: "%env(GRAYLOG_HOST)%"
                    port: "%env(GRAYLOG_PORT)%"

Graylog is running and is reachable:
echo 'test' | nc graylog 5555
works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants