We are using Symfony 2.2 with the OldSound RabbitMqBundle. A rabbitmq server is running on another instance. The server configuration is fine as everything is working on localhost and messages are sent and retrieved from/by the server.
On our managed server we get following error by starting a rabbitmq:consumer. This must result from any missing permissions, closed ports or some other circumstances, which are different on the managed server (hetzner) than on the localhost.
Do you have any idea how to analyse or fix this problem?
Executed Command:
:~/../app$ php console rabbitmq:consumer -m 100 transfer_data
Error message:
[PhpAmqpLib\Exception\AMQPRuntimeException]
Error Connecting to server(111): Connection refused
rabbitmq:consumer [-m|--messages[="..."]] [-r|--route[="..."]] [-l|--memory-limit[="..."]] [-d|--debug] [-w|--without-signals] name
Related
I am using the Laravel Framework and BrainSocket to open up a websocket service in a port via the following command line:
php artisan brainsocket:start --port=7778
Afterwards, I connect to the websocket on the client-side, like so:
var websocket = new WebSocket('ws://127.0.0.1:7778/');
At first I was developing this application on my local machine and everything was working fine. However, on the production server (CentOS 7 + Nginx), when I run the above line the following error message appears:
WebSocket connection to 'ws://127.0.0.1:7778/' failed: Connection
closed before receiving a handshake response
I tried changing the IP for the server's IP address, I have already checked if the port was being used and I made sure socket support was enabled. But whatever I do the same error message appears.
It worked once I used port 443 instead.
No connection could be made because the target machine actively refused it. [tcp://127.0.0.1:6379] in laravel 4.
My code is:
$redis = Redis::connection();
$redis->set('name', 'Taylor');
$name = $redis->get('name');
$values = $redis->lrange('names', 5, 10);
After Installing redis server(you can download it form redis) you should simply run file redis-server.exe often located in C:\Program Files\Redis\
and refresh your page!
The problem could be that your redis instance either isn't running at all or is running on different host and/or port address (or port 6379 is closed by firewall).
I also got the same error below:
No connection could be made because the target machine actively refused it.
Because I didn't start RabbitMQ so after starting RabbitMQ, the error was solved.
So, your case with Redis will be the same. You should start Redis to solve the error.
I'm trying to access to my Heroku Postgres database from a php code that runs locally.
pg_connect("host=myhost port=5432 dbname=mydb user=me password=*** sslmode=require options='--client_encoding=UTF8'")
works well when the code runs on Heroku, but not locally. (the value are those given by Heroku)
I get this error :
Unable to connect to PostgreSQL server: sslmode value "require"
invalid when SSL support is not compiled in
If I delete sslmode, I get this error :
Network is unreachable Is the server running on host "myhost" and
accepting TCP/IP connections on port 5432?
Does someone has a clue ? It would help a lot !
Heroku Postgres requires sslmode for external connections. You likely need to compile PHP with the --with-openssl[=dir] compile flag. See here for more information: http://www.php.net/manual/en/book.openssl.php
Can you verify your installation of PHP has openssl compiled in with it? The only way I know to check this is with a phpinfo() page and look for the --with-openssl flag.
My project uses PHP JavaBridge, I have installed WAMP, JRE 6.0, and Tomcat 6.0.32
I can now access http://localhost:8080/ successfully but when I run my PHP site it gives me the following error
warning: fsockopen() [function.fsockopen]: unable to connect to localhost:8080 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. )
Can anyone please help me with this issue?
EDIT
Forgot to mention that I am using Windows 7
My comment above worked as a solution and hence this answer, so that in future others get it.
Can you 127.0.0.1:8080 instead of localhost:8080? See what do you get?
fsocketopen takes the hostname and it should be a valid domain, in your case, (in general) it could be a valid domain as long as you have an entry for localhost in your hosts file (C:\Windows\System 32\drivers\etc\hosts). See if you have something similar to that.
I'm running Windows, having installed IIS 7.5, PHP 5.3 (FastCGI). Trying to connect to MySQL and getting an error "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.".
Started to develop a project with XAMPP, but had the requirement to move it to IIS (because of AD auth). MySQL is running from XAMPP stack. I've mapped IIS to the same docroot as Apache2's, but to another port. When accessing test page server with Apache2 host - there is no problem, but when accessing IIS + PHP FCGI page - I get this error.
will the standalone installation of MySQL help?
what are your advises?
In your script, try using "127.0.0.1" instead of "localhost" as MySQL host.
If this solves your problem you can add the following line to your hosts file in /Windows/System32/drivers/etc/hosts:
127.0.0.1 localhost
After that you will able to use "localhost".
try using "127.0.0.1" instead of "localhost" as MySQL host.
Just saved my life XD XD XD