Unable to connect to site

Hi all, yesterday I installed spryker and made some tests, everything worked good.

Today when I tried to continue, I cannot access to site, it shows errors as below:

# ZED Exception

**ErrorException - stream_socket_client(): unable to connect to tcp://127.0.0.1:10009 (Connection refused)**

in /data/shop/development/current/vendor/predis/predis/src/Connection/StreamConnection.php (127)

**Url:** /

**Trace:**

#0 [internal function]: Spryker\Shared\ErrorHandler\ErrorHandlerEnvironment->Spryker\Shared\ErrorHandler\{closure}(2, 'stream_socket_c...', '/data/shop/deve...', 127, Array) #1 /data/shop/development/current/vendor/predis/predis/src/Connection/StreamConnection.php(127): stream_socket_client('tcp://127.0.0.1...', 111, 'Connection refu...', 5, 4) #2 /data/shop/development/current/vendor/predis/predis/src/Connection/StreamConnection.php(178): Predis\Connection\StreamConnection->createStreamSocket(Object(Predis\Connection\Parameters), 'tcp://127.0.0.1...', 4) #3 /data/shop/development/current/vendor/predis/predis/src/Connection/StreamConnection.php(100): Predis\Connection\StreamConnection->tcpStreamInitializer(Object(Predis\Connection\Parameters)) #4 /data/shop/development/current/vendor/predis/predis/src/Connection/AbstractConnection.php(81): Predis\Connection\StreamConnection->createResource() #5 /data/shop/development/current/vendor/predis/predis/src/Connection/StreamConnection.php(258): Predis\Connection\AbstractConnection->connect() #6 /data/shop/development/current/vendor/predis/predis/src/Client.php(215): Predis\Connection\StreamConnection->connect() #7 /data/shop/development/current/vendor/spryker/session/src/Spryker/Shared/Session/Business/Handler/SessionHandlerRedisLocking.php(57): Predis\Client->connect() #8 /data/shop/development/current/vendor/spryker/session/src/Spryker/Shared/Session/Business/Model/SessionFactory.php(118): Spryker\Shared\Session\Business\Handler\SessionHandlerRedisLocking->__construct(Object(Predis\Client), Object(Spryker\Shared\Session\Business\Handler\Lock\Redis\RedisSpinLockLocker), Object(Spryker\Shared\Session\Business\Handler\KeyGenerator\Redis\RedisSessionKeyGenerator), 31536000) #9 /data/shop/development/current/vendor/spryker/session/src/Spryker/Zed/Session/Communication/SessionCommunicationFactory.php(73): Spryker\Shared\Session\Business\Model\SessionFactory->createRedisLockingSessionHandler('tcp://127.0.0.1...') #10 /data/shop/development/current/vendor/spryker/session/src/Spryker/Zed/Session/Communication/SessionCommunicationFactory.php(51): Spryker\Zed\Session\Communication\SessionCommunicationFactory->createSessionHandlerRedisLocking() #11 /data/shop/development/current/vendor/spryker/session/src/Spryker/Zed/Session/Communication/SessionCommunicationFactory.php(30): Spryker\Zed\Session\Communication\SessionCommunicationFactory->createSessionStorageHandlerPool() #12 /data/shop/development/current/vendor/spryker/session/src/Spryker/Zed/Session/Communication/Plugin/ServiceProvider/SessionServiceProvider.php(38): Spryker\Zed\Session\Communication\SessionCommunicationFactory->createSessionStorage() #13 /data/shop/development/current/vendor/spryker/session/src/Spryker/Zed/Session/Communication/Plugin/ServiceProvider/SessionServiceProvider.php(27): Spryker\Zed\Session\Communication\Plugin\ServiceProvider\SessionServiceProvider->setSessionStorageOptions(Object(Spryker\Shared\Kernel\Communication\Application)) #14 /data/shop/development/current/vendor/spryker/silexphp/src/Silex/Application.php(156): Spryker\Zed\Session\Communication\Plugin\ServiceProvider\SessionServiceProvider->register(Object(Spryker\Shared\Kernel\Communication\Application)) #15 /data/shop/development/current/vendor/spryker/application/src/Spryker/Zed/Application/Communication/ZedBootstrap.php(119): Silex\Application->register(Object(Spryker\Zed\Session\Communication\Plugin\ServiceProvider\SessionServiceProvider)) #16 /data/shop/development/current/vendor/spryker/application/src/Spryker/Zed/Application/Communication/ZedBootstrap.php(91): Spryker\Zed\Application\Communication\ZedBootstrap->registerServiceProvider() #17 /data/shop/development/current/src/Pyz/Zed/Application/Communication/ZedBootstrap.php(30): Spryker\Zed\Application\Communication\ZedBootstrap->setUp() #18 /data/shop/development/current/vendor/spryker/application/src/Spryker/Zed/Application/Communication/ZedBootstrap.php(63): Pyz\Zed\Application\Communication\ZedBootstrap->setUp() #19 /data/shop/development/current/public/Zed/index.php(21): Spryker\Zed\Application\Communication\ZedBootstrap->boot() #20 {main}

Hi @valon,
seems like you need to follow https://documentation.spryker.com/docs/troubleshooting#exception-connecting-to-redis in order to solve this problem.

Best,
Spryker Support Team

I am using Mac, when I run command:
sudo redis-check-aof --fix /data/shop/development/shared/redis/appendonly.aof
I got this error :
sudo: redis-check-aof: command not found

You need to run these commands inside vagrant devvm.

Best,
Spryker Support Team

I am running inside devvm folder but nothing, the same error

You need to run this not in the folder with vagrant devvm but inside the virtual machine.
For getting inside you need to run vagrant ssh from the folder where you have installed the devvm following the installation guide like https://documentation.spryker.com/docs/installation-guide-b2c#2--install-spryker-virtual-machine.

Best,
Spryker Support Team

Thanks. It is fixed. Admin panel seems fine, the front shows me error:

**Error - Class 'Generated\Shared\Search\PageIndexMap' not found**
in /data/shop/development/current/src/Pyz/Client/Catalog/Plugin/Elasticsearch/Query/FeaturedProductsQueryPlugin.php (53)

Try to run console search:setup:index-map inside devvm.

Best,
Spryker Support Team

Response from that command:
Store: DE | Environment: development

I did a restart, It is OK now. Thanks for your time and for help

Thank you for the feedback and you are welcome!
From time to time things like this happens due to incorrect sleep state or something like this. So files are being corrupted due to this. We can do nothing about it unfortunately.

Best,
Spryker Support Team

Well it happens. But thank you again for fast responses.
I have a little question. Can you tell me step by step commands to start project after mac shut down ?

vagrant halt for stopping the VM.
vagrant up for starting the VM.
vagrant ssh to login inside VM.

But usually it’s safe just to close the lid and open it back and VM shouldn’t be affected at all. It should go sleep and wake as everything else.

Best,
Spryker Support Team

1 Like