jodis遇到的问题
1.
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper

java找jar包的网址 http://search.maven.org/

按照ArtifactId查询

2.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

网上搜了一下下面是官方的解答http://www.slf4j.org/codes.html#StaticLoggerBinder:
This error is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J binding could be found on the class path. Placing one (and only one) of slf4j-nop.jar,slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.
You can download SLF4J bindings from the project download page.
大意是org.slf4j.impl.StaticLoggerBinder 无法载入到内存,原因是没有找到合适的绑定SLF4J,需要添加所列举的包中的某一个。
解决方法如下:
下载slf4j-nop.jar,添加到路径中,就解决问题了
3.
Caused by: java.net.UnknownHostException: bogon
连接虚拟机连接不上,试了下主机和虚拟机之间能ping通,而且CentOs防火墙关闭了 还是提示该错误,在虚拟机里启动tomcat主机也访问不了,修改/etc/下 hosts文件,
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1 bogon.localdomain bogon
加上了最后一行,感觉bogon是java的应用的主机名,加上后重启主机可以访问tomcat了,但是报了
Caused by: java.net.UnknownHostException: localhost.localdomain 错误
从新看了下 执行hostname 命令得到的主机名是localhost.localdomain 在网上找了修改主机名的命令
hostnamectl set-hostname localhost #修改成了localhost主机名
网上有修改/etc/hosts文件和修改/etc/sysconfig/network文件的貌似都不好使
4.
Caused by: java.net.ConnectException: Connection refused: connect

java报错最上面是异常 下面有Caused by 看到异常先猜下啥问题,看第一个Caused by 有个报错 Connection.java:148 下面那个Caused by 最后 是 Connection.java:142 下面的是引起错误的原因 其实找错误特别是导入的jar包里的错误 应该先把你导的jar包的源文件的jar也下载下来,然后用eclipse载入进来,这 样,查错更方便,不要瞎猜。
然后找到出错的这段代码
public InetSocketAddress(String hostname, int port) {
checkHost(hostname);
InetAddress addr = null;
String host = null;
try {
addr = InetAddress.getByName(hostname);
} catch(UnknownHostException e) {
host = hostname;
}
holder = new InetSocketAddressHolder(host, addr, checkPort(port));
}
可以看到 UnknownHostException 这是之前报的错误 这回报错的是 InetAddress.getByName(hostname),所以还是和hostname有关系 看了下自己的host文件


咨询了下@韦爵爷
修改成了这样
还有你自己Windows本地hosts也得加上这一行
韦爵 2015/5/8 16:21:43
要不他那知道weiguoyuan是什么
于是又修改了 C:\Windows\System32\drivers\etc 下的hosts文件 加上后面一行# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host # localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost 192.168.253.128 weiguoyuan
运行程序 终于搞定了
jodis遇到的问题的更多相关文章
- <codis><jodis>
Overview For codis and jodis. Codis TBD... Jodis Java client for codis. Jodis is a java client for c ...
- Codis——分布式Redis服务的解决方案
Codis——分布式Redis服务的解决方案 之前介绍过的 Twemproxy 是一种Redis代理,但它不支持集群的动态伸缩,而codis则支持动态的增减Redis节点:另外,官方的redis 3. ...
- codis集群安装
在网上找了很多codis的集群安装方法,看起来都是大同小异,本人结合了大多种方法完成了一套自己使用的codis的集群安装,可以供大家学习使用,如果有什么问题或者不懂的地方欢迎指正 1.集群规划: 三台 ...
- 伪集群zookeeper模式下codis的部署安装
1,zookeeper伪集群部署 部署在192.168.0.210服务器上 下载 去官网将3.4.6版本的zookeeper下载下来到/app目录下解压 首先 ...
- Ping CAP CTO、Codis作者谈redis分布式解决方案和分布式KV存储
此文根据[QCON高可用架构群]分享内容,由群内[编辑组]志愿整理,转发请注明出处. 苏东旭,Ping CAP CTO,Codis作者 开源项目Codis的co-author黄东旭,之前在豌豆荚从事i ...
- [转载] Codis作者黄东旭细说分布式Redis架构设计和踩过的那些坑们
原文: http://mp.weixin.qq.com/s?__biz=MzAwMDU1MTE1OQ==&mid=208733458&idx=1&sn=691bfde670fb ...
- Codis 集群搭建
Codis 集群搭建 1 安装go1.3.1 CentOS 7.0 安装go 1.3.1 1.1 下载go安装包 golang中国上下载 下载到Downloads下 1.2 解压 tar -zxf g ...
- static 静态代码块 动态代码块 单例
1. 共享,不属于对象,属于类,类成员变量,任何一个类的对象都有该属性,一旦被修改,则其他对象中的该属性也被更改. 2. 类中方法是static的,可以通过类名直接访问,不用new一个该类的对象. 3 ...
- codis3.1集群搭建
Codis31搭建 codis 3.1 安装搭建 一.基本信息 1. 服务器基本信息 ip地址 安装服务 172.16.200.71 zk1.codis-dashboard.codis-fe.codi ...
随机推荐
- Laravel 5系列教程六:表单 Forms
免费视频教程地址https://laravist.com/series/laravel-5-basic 在开始之前,我们把界面先美化一点点先: 首先到https://github.com/JellyB ...
- Coincidence (动态规划求最长公共子序列)(王道)
题目描述: Find a longest common subsequence of two strings. 输入: First and second line of each input case ...
- Python 获取图片文件大小并转换为base64编码
import os import base64 fileSize = os.path.getsize(文件路径) with open(文件路径, 'rb') as f: data = base64.b ...
- Extjs grid 遍历store
var projectMemberGrid = Ext.getCmp("projectMemberGrid"); var selFuns = []; projectMemberGr ...
- paypal - 支付所遇到的问题,编码等等
1.ipn支付方式编码问题,paypal默认编码为 gb2312,需要登录paypal后台,进入用户信息设置>销售工具>更多销售工具>paypal按钮编码设置>更多选项,全部修 ...
- C语言中函数调用过程(如何管理栈空间)
ps:先做草稿,以后有时间再整理并贴图,:) 主要是利用栈底寄存器(ebp).栈顶寄存器(esp)跟eax寄存器(存储返回值)来实现. 假设P调用Q: P() { Q(1,2); } (跟实际情况可能 ...
- silverlight计时器
引用using System.Windows.Threading; DispatcherTimer dispatchertimer = new DispatcherTimer();//创建一个新的计时 ...
- lucene 索引中文档的属性建立与不建立带来的影响总结
索引中文档的属性建立与不建立带来的影响总结 1.依据文档的某属性去查找索引的话,只会返回带有此属性(如果你对当前属性设定了条件,那么需要满足当前条件)的所有文档,没有建立此属性的文档是不会在返回结 ...
- Mac+docker+flask
1.先要保证mac电脑安装docker 安装的话可以通过命令brew install docker 安装成功后启动,docker 然后在终端执行docker version 或者docker info ...
- 各种broker对比
broker的主要职责是接受发布者发布的所有消息,并将其过滤后分发给不同的消息订阅者.如今有很多的broker,下面就是一张关于各种broker对比的图片: 在使用mosquitto时,如果想使用集群 ...