Redis Connection Failed

Debug using your logs. Mainly the Apache log
Also, I know you get a white screen, but What happens in the address bar??

when you enter you address, does it automatically re-writes it to: "domain.name/?site=default "?

Openemr is definitely compatible with php72

does domain.name/admin.php work?

What about domain.name/setup.php ?

Have you tried domain.name/interface/login/login.php?site=default ?

Do all these links give you a white page?

Sandra

Hi @gutiersa

Thanks for the reply.

When I type in the address it redirects to
Domain.name/interface/login/login.php?site=default
But displays a white screen.

The domain.name/setup.php and domain.name/admin.php seems to work fine.

I am still unable to see anything in the error log but if this gives you any insight please let me know.

Kind regards
John

Hello @stephenwaite @gutiersa @brady.miller

Thank you for your support so far.
If you can provide additional support, I would appreciate it.

The error message is as follows. (with webspace and domain name removed)

Please advise if you know of a solution.

Kind regards,
John

Warning: Redis::connect(): connect() failed: Connection refused in /var/www/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php on line 138

Fatal error: Uncaught RedisException: Redis server went away in /var/www/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php:47 Stack trace: #0 /var/www/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/emr/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php(47): Redis->setOption(1, 1) #1 /var/www/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(140): Doctrine\Common\Cache\RedisCache->setRedis(Object(Redis)) #2 /var/www/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(71): Doctrine\ORM\Tools\Setup::createConfiguration(false, ‘/tmp’, Object(Doctrine\Common\Cache\RedisCache)) #3 /var/www/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/common/database/Connector.php(154): Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration(Array, false, NULL, NULL, false) #4 /var/www/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/httpdocs/m in /var/www/xx/1xxxxxxxx/webspace/httpdocs/domain.name/openemr/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php on line 47

What does “/var/www/xx/1xxxxxxxx/webspace/httpdocs/domain.name/openemr/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php” line 47 say?

Hi Sandra

This is the line of code starting on line 47
any suggestions?

    $redis->setOption(Redis::OPT_SERIALIZER, $this->getSerializerValue());
    $this->redis = $redis;
}

This line is $redis->connect(‘IP address’);

I am not sure why the ip address might be causing an issue

just to clarify line 138 is $redis->connect(127.0.0.1)…again I don’t see why there is an issue with that.

all help appreciated, thanks again @gutiersa

Are you in the mood to modify code?

try this in line 48:

print_r ($redis, \n, $this);

and run the program. See if you get an output to the screen.

Hi Sandra,

Thanks for the code suggestion. Unfortunately, I am still redirected to a white screen ( interface/login/login.php?site=default)

This is the modified code.

{
$redis->setOption(Redis::OPT_SERIALIZER, $this->getSerializerValue());
print_r ($redis, \n, $this);
}

Please let me know if this is what you had in mind and whether you have something else we could try.

Thanks
John

Hello @gutiersa @brady.miller @robert.down @alexvolin

It looks as if these two conversations are connected. Was anybody able to find a solution to your problem Alex?

Thanks in advance,

John

connected with this one!

Hi all,

I have just had a chat with the server technicians who have stated that Redis is not supported on the server.

They suggested that Redis was “on already” or “triggered” by the installation and suggested turning it off in order to make it work.

Please let me know your thoughts and insight.

Thanks

John

what do your logs say?

I am not sure what Redis is. It sounded to me like it is your connector to the database. I use ADODB. If Redis is not supported, then you need a connector to your database.
What is your stack?

Operating system
web server
database
PHP version

Sandra

Ps: add this to the bottom of “php.ini” and it will print errors to the screen:
display_errors = On

thanks @gutiersa. I got it working. I appreciate the support

What was the problem?

It was a server issue which has been fixed. thanks again

1 Like

Hi,

This is interesting. I also just picked up on a related bug when configuring redis for a docker stack setup. It turns out if:

  1. PHP redis extension installed
  2. And if there is no localhost redis server

Then doctrine throws an error, which is not an uncommon occurrence (for example, if using a redis server rather than on the same server as php server).

I fixed this bug here and will get it in the next 5.0.1 patch:

-brady

Thanks for the update @brady.miller

Hello everybody,

I almost missed this thread but am really grateful to you all for the solution. Special thanks to @brady.miller . Your bug fix really solved my problem. I have had the exact situation you described. There is a php-redis module on my server but Redis itself has not been installed on the localhost.

So now I am able to upgrade to 5.0.1. And it was a good idea to include Patch 4 in the initial upgrade package download otherwise I would have to correct the code manually before any patches. Thank you all once again!

1 Like