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.jarslf4j-log4j12.jarslf4j-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文件

    

    咨询了下@韦爵爷

    

    韦爵爷(1249314359) 15:59:15
    你要把 虚拟机的ip和hostname写到 hosts里

      例如   192.168.11.11   hostname 
           你自己本地也叫localhost ,你原来那样整不就访问你的本地了么,根本访问不了 虚拟机
  修改成了这样
    

   

    韦爵 2015/5/8 16:21:23
    还有你自己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遇到的问题的更多相关文章

  1. <codis><jodis>

    Overview For codis and jodis. Codis TBD... Jodis Java client for codis. Jodis is a java client for c ...

  2. Codis——分布式Redis服务的解决方案

    Codis——分布式Redis服务的解决方案 之前介绍过的 Twemproxy 是一种Redis代理,但它不支持集群的动态伸缩,而codis则支持动态的增减Redis节点:另外,官方的redis 3. ...

  3. codis集群安装

    在网上找了很多codis的集群安装方法,看起来都是大同小异,本人结合了大多种方法完成了一套自己使用的codis的集群安装,可以供大家学习使用,如果有什么问题或者不懂的地方欢迎指正 1.集群规划: 三台 ...

  4. 伪集群zookeeper模式下codis的部署安装

    1,zookeeper伪集群部署     部署在192.168.0.210服务器上          下载     去官网将3.4.6版本的zookeeper下载下来到/app目录下解压     首先 ...

  5. Ping CAP CTO、Codis作者谈redis分布式解决方案和分布式KV存储

    此文根据[QCON高可用架构群]分享内容,由群内[编辑组]志愿整理,转发请注明出处. 苏东旭,Ping CAP CTO,Codis作者 开源项目Codis的co-author黄东旭,之前在豌豆荚从事i ...

  6. [转载] Codis作者黄东旭细说分布式Redis架构设计和踩过的那些坑们

    原文: http://mp.weixin.qq.com/s?__biz=MzAwMDU1MTE1OQ==&mid=208733458&idx=1&sn=691bfde670fb ...

  7. Codis 集群搭建

    Codis 集群搭建 1 安装go1.3.1 CentOS 7.0 安装go 1.3.1 1.1 下载go安装包 golang中国上下载 下载到Downloads下 1.2 解压 tar -zxf g ...

  8. static 静态代码块 动态代码块 单例

    1. 共享,不属于对象,属于类,类成员变量,任何一个类的对象都有该属性,一旦被修改,则其他对象中的该属性也被更改. 2. 类中方法是static的,可以通过类名直接访问,不用new一个该类的对象. 3 ...

  9. codis3.1集群搭建

    Codis31搭建 codis 3.1 安装搭建 一.基本信息 1. 服务器基本信息 ip地址 安装服务 172.16.200.71 zk1.codis-dashboard.codis-fe.codi ...

随机推荐

  1. Druid和Spark对比

    Druid和Spark对比 不是Spark专家, 如果描绘有错误, 请通过邮件列表或者其他方式告知我们 Spark实现弹性的分布式数据集概念的计算集群系统, 可以看做商业分析平台. RDDs能复用持久 ...

  2. 【云计算】Docker监控相关资料

    Cloud Insight 是东半球首款次世代系统监控工具:http://www.oneapm.com/ci/docker.html?utm_source=BaiduPaid&utm_medi ...

  3. infer 编译代码审查命令记录

    infer -- xcodebuild -target <target name> -configuration <build configuration> -sdk ipho ...

  4. iOS开发中经常使用的Xcode插件

    1.全能搜索家CodePilot 2.0 你要找的是文件?是目录?是代码?Never Mind,CMD+SHIFT+X调出CodePilot,输入不论什么你想到搜的东西吧! 想搜appFinishLa ...

  5. JSP页面的基本结构 及声明变量

    一.JSP页面的基本结构 在传统的HTML页面文件里增加Java程序片和JSP标签就构成了一个JSP页面文件. 一个JSP页面可由5种元素组合而成: 1.普通的HTML标记符 2.Jsp标签.如指令标 ...

  6. [转载]linux 更新yum源 改成阿里云源

    原文链接:https://www.cnblogs.com/bincoding/p/7892762.html 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc ...

  7. 微信小程序 - bindcontroltap和control的关系(map)

    听说最近要废弃control,用cover-image和cover-view替代它,层级问题(我们此等萌新们还在想图标怎么显示在地图上(-.-)) 粗略的来说,一个展示(control),一个触发(b ...

  8. centos 6.5 python2.6.6 zbar 安装

       经过数次折腾,终于搞明白了这个zbar的安装顺序.   1.先安装http://zbar.sourceforge.net/download.html 下的zbar,   2.python 安装z ...

  9. 插入数据返回插入的主键Id

    ADO.Net中Sql语句: insert into RoomType(TypeName,Price,AddBed,BedPrice,Remark)output inserted.ID values( ...

  10. 【CODEFORCES】 C. Captain Marmot

    C. Captain Marmot time limit per test 1 second memory limit per test 256 megabytes input standard in ...