I used sudo php bin/magento setup:upgrade command but get
[InvalidArgumentException]
There are no commands defined in the "deploy:mode" namespace.
after that tried list command but get We're sorry, an error occurred. Try clearing the cache and code generation directories. By default, they are: var/cache, var/di, var/generation, and var/page_cache
.
[CredisException]
Connection to Redis failed after 2 failures.Last Error : (111) Connection refused
Used rm -rf var/cache var/di var/generation var/page_cache
but still have error. no command works.