Re: 'RedisException' with message 'Connection closed'

2,373 views
Skip to first unread message

Josiah Carlson

unread,
Jul 8, 2012, 11:46:06 PM7/8/12
to redi...@googlegroups.com
Can you run a PHP script on that same machine that connects to Redis?
Can you run redis-cli on that server to connect to Redis? Is this
error happening intermittently? Is it happening all the time?

You need to provide context for us to help you with a connection
error. Because as it stands, we can't tell you whether or not it is a
configuration error in PHP, a configuration error in Redis, etc.

- Josiah

On Sun, Jul 8, 2012 at 12:56 PM, aypepito <jeanmar...@gmail.com> wrote:
> Hello,
> I have an error when accessing a php file.
> I'm using nginx and ispconfig.
>
> 2012/07/08 21:42:56 [error] 27347#0: *1060 FastCGI sent in stderr: "PHP
> message: PHP Fatal error: Uncaught exception 'RedisException' with message
> 'Connection closed' in /usr/local/ispconfig/interface/web/js/scrigo.js.php:2
> Stack trace:
> #0 /usr/local/ispconfig/interface/web/js/scrigo.js.php(2): session_start()
>
> Can you help on that error ? I'm stuck on this since a couple of days !
>
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/redis-db/-/I8vnY0SEtAYJ.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to
> redis-db+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/redis-db?hl=en.

aypepito

unread,
Jul 10, 2012, 2:24:23 PM7/10/12
to redi...@googlegroups.com
Ok, I'm going to put some more information.
It's a totally new installation of the server, and I'm setting it up. Yes, the error happens all the time when executing a PHP script.

I can connect to redis-cli and have an answer to PING.

root@aguila:~# redis-cli
redis 127.0.0.1:6379> PING
PONG

The redis server seems OK because the Redis server listen on the default 6379 port.

root@aguila:~# lsof -i :6379 | grep -i listen
redis-ser 9044 redis    4u  IPv4 791433      0t0  TCP localhost:6379 (LISTEN)

I don't know what information more do I need to give to you. 
PHP is installed with FPM, maybe something is wrong with the installation ?

Jean-Marie


Le lundi 9 juillet 2012 05:46:06 UTC+2, Josiah Carlson a écrit :
Can you run a PHP script on that same machine that connects to Redis?
Can you run redis-cli on that server to connect to Redis? Is this
error happening intermittently? Is it happening all the time?

You need to provide context for us to help you with a connection
error. Because as it stands, we can't tell you whether or not it is a
configuration error in PHP, a configuration error in Redis, etc.

 - Josiah

On Sun, Jul 8, 2012 at 12:56 PM, aypepito 

> wrote:
> Hello,
> I have an error when accessing a php file.
> I'm using nginx and ispconfig.
>
> 2012/07/08 21:42:56 [error] 27347#0: *1060 FastCGI sent in stderr: "PHP
> message: PHP Fatal error:  Uncaught exception 'RedisException' with message
> 'Connection closed' in /usr/local/ispconfig/interface/web/js/scrigo.js.php:2
> Stack trace:
> #0 /usr/local/ispconfig/interface/web/js/scrigo.js.php(2): session_start()
>
> Can you help on that error ? I'm stuck on this since a couple of days !
>
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/redis-db/-/I8vnY0SEtAYJ.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to

aypepito

unread,
Jul 16, 2012, 3:23:01 PM7/16/12
to redi...@googlegroups.com
Anyone can help me ?
I'm stuck with this ...

Didier Spezia

unread,
Jul 16, 2012, 4:03:32 PM7/16/12
to redi...@googlegroups.com

Some questions:

Is your php server running on the same box as Redis?
If not, did you try to run redis-cli from the box hosting your php server?
What do you use to connect to Redis in the php script?
Which version of Redis server have you installed? Is it compatible with your php client?

Regards,
Didier.

aypepito

unread,
Jul 16, 2012, 4:21:04 PM7/16/12
to redi...@googlegroups.com
Hi, 
Yes, the php server is running on the same box.
The error occurs when at the  session_start() php command 

The redis version is 2.4.15
Php version is 5.3.14

Regards, 
Pepito

OZ

unread,
Jul 17, 2012, 12:52:08 AM7/17/12
to redi...@googlegroups.com
Show us your script and tell us what have you tried to fix this problem.
Write, which php-client you use.
To speed up, try to ask on stackoverflow.com also.
Reply all
Reply to author
Forward
0 new messages