`
laughingchs
  • 浏览: 67841 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

null buffer || null address

    博客分类:
  • JAVA
阅读更多

         今天有同事搭建项目的冒烟环境,搭建了快一天一直没搭建成功。后来,晚上我帮忙查看的时候,发现系统在启动的时候大部分的service都启动失败,这些service都在通过log4j打log的时候就开始抛出异常,异常信息如下:

   Caused by: java.lang.NullPointerException: null buffer || null address

        at java.net.PlainDatagramSocketImpl.send(Native Method)

        at java.net.DatagramSocket.send(DatagramSocket.java:612)

        at org.apache.log4j.helpers.SyslogWriter.write(SyslogWriter.java:69)

        at org.apache.log4j.helpers.QuietWriter.write(QuietWriter.java:39)

        at org.apache.log4j.helpers.SyslogQuietWriter.write(SyslogQuietWriter.java:45)


        第一反应是不可思议,竟然通过log4j写日志出现异常了。后来发现当我们通过一个不可解析的SocketAddress来发送DatagramPacket信息时会抛出上诉的异常,这个异常信息太烂了,这是jdk的一个bug。查出这个问题之后就好办了,在对应的log4j.xml配置文件里面有配置了一个Appender来将日志写到一台远程机器上;而对应的机器名并没有加入DNS解析中,导致对应的主机找不到,抛出上述异常;后添加DNS解析后,应用恢复正常。
       
        怕日后忘记,在此做个小记~~

          上面说的JDK的bug链接见http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5021519

 

 

 

 

分享到:
评论
1 楼 fabulasia 2019-07-10  
一字不漏的抄过来,有意思?

相关推荐

    mysql 断电不能启动

    InnoDB: Failing assertion: addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB...

    网络编程 socket关键字

    using System; using System.Collections.Generic;...=null) { clientSocket.Send(buffer); } else MessageBox.Show("something you forgetted"); clientSocket.Shutdown(SocketShutdown.Both); } } }

    System Hardware Information Finder

    LPDWORD lpType, // address of buffer for value type LPBYTE lpData, // address of data buffer LPDWORD lpcbData // address of data buffer size ); Before making this call, it is necessary to ...

    基于DOS的多任务系统

    #include<stdio.h>#include <stdlib.h>#include /*线程的四个状态*/#define finished 0#define running 1#define ready 2#define blocked 3#define null 0#define NTCB 5 /*.../*get the address of CRIT_ERR flag*/

    KISDJ语音聊天

    EndPoint remoteEP = (EndPoint)(new IPEndPoint(IPAddress.Any, 0)); byteData = new byte[1024]; //Receive data asynchornously. clientSocket.BeginReceiveFrom(byteData, 0, byteData.Length, Socket...

    SocketAsyncServer3.5

    ListenerSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); ListenerSocket.Bind(e); ListenerSocket.Listen(10); //异步socket事件 Args = new SocketAsyncEventArgs()...

    jsp探针 ver0.1

    java.text.ParseException ex = new java.text.ParseException("cannot read MAC address from [" + ipConfigResponse + "]", 0); ex.printStackTrace(); throw ex; } private final boolean windowsIsMacAddress...

    虚拟网卡驱动源代码(原版)

    * Assign the hardware address of the board: use "\0SNULx", where * x is 0 or 1. The first byte is '\0' to avoid being a multicast * address (the first byte of multicast addrs is odd). */ memcpy...

    使用C#实现基于TCP和UDP协议的网络通信程序的基本示例

    C#中使用TCP通信 TCP通信需要通信双方都在线,所以需要先启动服务端进行监听,客户端才能... byte[] buffer = null; string receiveString = null; IPAddress localIP = IPAddress.Parse(127.0.0.1); int localPo

    数位板压力测试

    While the tablet interface design must address the technical problems stated above, it must also be useful to the programmers who will write tablet programs, and ultimately, to the tablet users....

    收发数据包源代码

    // This routine copies these fields to a temporary buffer and computes // the checksum from that. // void ComputeUdpPseudoHeaderChecksumV4( void *iphdr, UDP_HDR *udphdr, char *payload, int ...

    Oracle9i的init.ora参数中文说明

    (ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(PORT=5000)(HOST=zeus)) (ADDRESS=(PROTOCOL=decnet)(OBJECT=outa)(NODE=zeus)) 此参数在 8.1.3 版中已废弃。 值范围: TRUE | FALSE 默认值: FALSE mts_servers: 说明 : ...

    基于sniffer做的一个抓包监控软件

    FALSE // sort by IP address ) == NO_ERROR ) { if( pIpAddrTable->dwNumEntries > 2 ) // Second is MS TCP loopback IP ( 127.0.0.1 ) { m_Multihomed = TRUE ; char szIP[16]; ...

    黑客反向工程

    OidData->Oid = OID_802_3_CURRENT_ADDRESS; OidData->Length = 6; memset(OidData->Data, 0, 6); BOOLEAN Status = PacketRequest(lpAdapter, FALSE, OidData); if(Status) { memcpy(mac,(u_char*)(OidData-...

    可以仿造ip

    s=WSASocket(AF_INET, SOCK_RAW, IPPROTO_UDP, NULL, 0, WSA_FLAG_OVERLAPPED); ret = setsockopt(s, IPPROTO_IP, IP_HDRINCL, (char *)bopt, sizeof(bopt); 四、实例 为帮助大家尽快地...

    LCTF软件备份VariSpec™ Liquid Crystal Tunable Filters

    The VariSpec always processes each command to completion before starting on the next command, and it has a 256 byte input buffer, so there is no problem issuing several commands at once; they will all...

    servlet2.4doc

    Returns the object bound with the specified name in this session, or null if no object is bound under the name. getAttributeNames() - Method in interface javax.servlet.ServletContext Returns an ...

    微软内部资料-SQL性能优化5

    The only source of any storage location information is the sysindexes table, which keeps track of the address of the root page for every index, and the first IAM page for the index or table....

    c# 加密和解密相关代码

    public byte[] ComputeHash(byte[] buffer,int offset,int count) ComputeHash 方法中的参数及说明如表19.1 所示。 表19.1 ComputeHash方法中的参数及说明 参 数 说 明 buffer 要计算其哈希代码的输入 offset 字节...

    uboott移植实验手册及技术文档

    @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 NULL s3c24x0 fs2410_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm920t fs2410 NULL s3c24x0 arm: CPU的架构(ARCH) arm920t: CPU的类型(CPU),其...

Global site tag (gtag.js) - Google Analytics