Spring Boot,gradle,redis

Source: Internet
Author: User
Tags redis version redis server

Today to do spring Boot/gradle/redis related projects, encountered a number of issues, recorded as follows:

  1. Spring Boot Org.springframework.session.data.redis.RedisFlushMode

    This error is connected to the Redis server problem, to see if the Redis server IP written in application.properties is wrong, correct, or Redis server enabled Protected-mode, Use the command when running Redis:

    Nohup redis-server--protected-mode No & turn off Protected-mode when Redis is started;

    may also use the wrong package, carefully look at the official network of the respective Redis server version of the package, the Redis server used here is 3.2.6, the corresponding jar package is used

  2. Compile ' Org.springframework.boot:spring-boot-starter-redis '//compile ' org.springframework.session: Spring-session:1.0.1.release ' compile group: ' Org.springframework.session ', Name: ' Spring-session ', version: ' 1.3.0. RELEASE '
  3. How to set JVM parameters in Gradle by creating a new file Gradle.properties, setting JVM parameters within the file

    Org.gradle.jvmargs=-xmx2048m-xx:maxpermsize=512m-xx:+heapdumponoutofmemoryerror-dfile.encoding=utf-8

    Only one parameter is set here: Org.gradle.jvmargs=-dspring.profiles.active=redis

  4. Error encountered while booting on server gradle Test executor 1 ' finished with Non-zero exit value 137

    Exceptions that are typically encountered on the server end up with this information, but if you only report this exception, it may be because the server is running low on memory, causing the startup to fail.

  5. Installation of Redis

    git clone-b 3.2 https://github.com/antirez/redis.git; This command will download the latest 3.2 version of the source to the local Redis folder

    CD Redis

    Make;make Install; The official recommendation is to execute the make test,make test times with 2 errors and check them without causing the installation to fail and install them forcibly.

    Nohup redis-server--protected-mode No &;

    REDIS-CLI shutdown

    The default installed directory is located at:/usr/local/bin/

    If you want to use a configuration file,

    Redis-server/path/to/redis.conf General installation is a configuration file that places Redis within the/etc/redis/folder.

  6. Do not use the Windows version of the Redis,redis version of Windows compared to Linux, the version number lag is very serious.

    This hint may be because the version number is too low: ERR unsupported CONFIG parameter:notify-keyspace-events, which causes some of spring's tags to not be recognized.

This article from "Dream do not know is a guest" blog, reproduced please contact the author!

Spring Boot,gradle,redis

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.