When I start redis on OSX, it exits because it says it can't handle RDB format version 7. Here's the output:
Server started, Redis version 3.0.7
Can't handle RDB format version 7
Fatal error loading the DB: Invalid argument. Exiting.
The redis gem version in the gemfile was 3.2.2, but I changed it to 3.0.7 to see if that would make it work. It didn't.
How do I fix this? I don't have anything important in there so I'm fine with resetting it to another version or uninstall and reinstall redis.
I SOLVED the problem by deleting the /home/marco/dump.rdb file from redis folder.
Thanks Itamar. I ended up uninstalling and reinstalling via Homebrew. That was easiest solution for me since I didn't have any important info in the db.
brew uninstall redis
brew install redis
3.0.x is incompatible with 3.2.x so upgrading to 3.2.4 fixed it for me.
The same issue happened to me on 6.2.4 & I solved using this process
Search the Dump.rdb file
sudo find / -name *.rdb
For Ubuntu20 You'll find it under /var/lib/redis/dump.rdb
Delete the file dump.rdb
sudo rm /var/lib/redis/dump.rdb
Restart Redis & Check the Status
sudo systemctl restart redis-server
systemctl status redis-server.service
I had this in docker upon changing redis versions. Had to completely stop the container and remove volumes and restart it.
docker-compose.yml
services:
redis:
image: redis:6.2.6-alpine
docker-compose down -v redis
docker-compose up redis
Related
I was using Docker Desktop on my Mac for a long time. Currently Docker desktop causing a huge issues related to starting up. Everytime it needs some tweak to run or uninstall and install it again, that takes several hours to fix every time I start working.
So I started using other Docker Desktop alternative for mac that is Colima (Container on Linux on Mac) installed with the help of the Git link.
And I am using Docker client for Docker runtime by installing it using:
brew install docker and I have logged in using docker login via terminal.
The important note here is that all the above configuration works well with Docker Desktop but after uninstalling everything related to docker and start using Colima.
While I run docker info I got the following message:
$ docker info
Client:
Context: default
Debug Mode: false
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
Here are few other information that might need:
$ colima version
colima version 0.4.2
git commit: f112f336d05926d62eb6134ee3d00f206560493b
runtime: docker
arch: x86_64
client: v20.10.17
server: v20.10.11
kubernetes
Client Version: v1.24.1
Kustomize Version: v4.5.4
Server Version: v1.23.6+k3s1
Operating System: macOS Monterey
Version: 12.3.1 (21E258)
Any help would be highly appreciated.
After posting the question on StackOverflow I was non stop searching for a solution. Finally it took a day to fixed it (for me). While searching on google I have found a solution in this link.
Basically Colima usage $HOME/.colima/docker.sock, so first I checked if there is anything in the ~/.colima by running ls -la ~/.colima and I have found that docker.sock is there.
So I set up the DOCKER_HOST by running the following command:
$ export DOCKER_HOST="unix://$HOME/.colima/docker.sock"
and then run:
$ docker info
Now it shows everything related to Docker Server :)
Client:
Context: default
Debug Mode: false
Server:
Containers: 29
Running: 19
Paused: 0
Stopped: 10
Images: 19
Server Version: 20.10.11
.....
I have same problem, because i start colima before install docker, i run
$ colima delete
$ colima start
terminal print:
INFO[0000] starting colima
INFO[0000] runtime: docker
and colima docker worked!
Best is to add docker-host in .zshrc file
export DOCKER_HOST="unix://$HOME/.colima/docker.sock"
Note that in case you uninstall colima, then again install docker-desktop, then just comment above line of .zshrc file
I'm trying to work with Windows WLS.
I have installed ruby and rails and they work (apart the annoying warning).
I've installed postgresql client on Ubuntu/WLS, and postgresql server on windows.
When i try to connect via:
psql -p 5432 -h localhost -U postgres
all run correctly.
When i try to launch:
rails db:create
i have this error:
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"
The error can means that the Postgresql server is not running. Try starting it
sudo systemctl start postgresql
and Make sure that the server starts on boot:
sudo systemctl enable postgresql
or
This issue can comes from installing the postgres package without a version number.
sudo apt-get remove --purge postgresql
and reinstall
sudo apt-get install postgresql-(what is the current version)
Resolved. If someone needs, in the configuration file we need to add host: localhost
On Windows Subsystem for Linux running Ubuntu 16.04, I've installed InfluxDB 1.4.2 according to the Influx documentation. I can't run it as a service or with systemctl, probably because WSL doesn't support that (see GitHub issues 994 and 1579), so neither of these work:
$ sudo service influxdb start
influxdb: unrecognized service
$ sudo systemctl start influxdb
Failed to connect to bus: No such file or directory
If I run $ sudo influxd, Influx starts, but then crashes with the message
run: open server: open tsdb store: cannot allocate memory
How do I fix the "cannot allocate memory" error?
On Win10 Spring 2018 Update, I ran the following:
sudo apt install influxdb influxdb-client -y
Installed fine.
As per the docs …
… started the service using:
sudo service influxdb start
Started fine:
Let's connect, examine and create a database:
Please let me know if I've done anything wrong here to repro, otherwise, looks like this issue has been resolved.
I just had this problem when installing in WSL but systemd was installed. When installing the influxdb package it registered a systemd unit so I was unable to start it using init.d. I solved this using this guide. Instead of the dead link to the init.sh script i searched for an older version and found this.
Steps to get InfluxDB working in WSL (at least when systemd is installed):
Install influxdb using sudo apt install influxdb
Copy the content of this file into a new file at location /etc/init.d/influxdb
You can now start influxdb using sudo service influxdb start.
For me it showed an error message while starting but it still started correctly.
I am using the latest Ubuntu build 15.10 and have gone through the install of ElasticSearch here: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-service.html
However, even after executing the command that adds the service to the start up process.
sudo update-rc.d elasticsearch defaults 95 10
sudo /etc/init.d/elasticsearch start
Rebooting the computer, then going to localhost:9200 gives a 404.
And every single morning I run the sudo /etc/init.d/elasticsearch start, then the sudo update-rc.d elasticsearch defaults 95 10 in hopes that tomorrow will be a different day, to find my machine in the exact same state as yesterday.
On a side note, my machine at work uses the same version of Ubuntu and the steps described above worked on the first try.
If anyone has overcome this issue, your insight would be very appreciated!
Thanks you!
Ubuntu, since version 15.04, is using systemd by default instead of the older upstart for handling services and init scripts. I think you need to initialize elasticsearch differently, as described in the ES docs.
Something like:
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo /bin/systemctl start elasticsearch.service
When I run
sudo mate /opt/nginx/conf/nginx.conf
my nginx.conf file opens but is blank, what did i do wrong?
trying to deploy my rails app to a ubuntu 10.04 lucid with passenger, nginx, and REE
On which machine are you running "sudo mate ..."? If you're trying to deploy, you should be on the Ubuntu server. I suspect you're using a Mac for development and the command you've issued is to edit the local nginx installation on your Mac, not on the deployment server.
You can check where you are with command:
$ uname -a
Are you sure you're not looking for:
sudo nano /etc/nginx/nginx.conf
on your server?