hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-1178) NullPointer Exception in org.apache.hadoop.dfs.NameNode.isDir on namenode restart
Date Thu, 29 Mar 2007 00:35:25 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-1178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485040

Konstantin Shvachko commented on HADOOP-1178:

I have the same problem. The order of starting RPC and constructing FSNamespace() was changed
by HADOOP-1085.
For me it appears a little different, when I restart the name-node in the same process after
it failed to start first time.
Even with this patch I see

Address already in use
java.net.BindException: Address already in use
        at sun.nio.ch.Net.bind(Native Method)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
        at org.apache.hadoop.ipc.Server$Listener.<init>(Server.java:185)
        at org.apache.hadoop.ipc.Server.<init>(Server.java:626)
        at org.apache.hadoop.ipc.RPC$Server.<init>(RPC.java:323)
        at org.apache.hadoop.ipc.RPC.getServer(RPC.java:293)
        at org.apache.hadoop.dfs.NameNode.init(NameNode.java:164)
        at org.apache.hadoop.dfs.NameNode.<init>(NameNode.java:205)
        at org.apache.hadoop.dfs.NameNode.createNameNode(NameNode.java:820)
        at org.apache.hadoop.dfs.UpgradeUtilities.startCluster(UpgradeUtilities.java:144)
        at org.apache.hadoop.dfs.TestDFSUpgrade.testUpgrade(TestDFSUpgrade.java:157)

This means the socket has not been closed properly.
I think that hadoop.ipc.Server.Listener.doStop() should close the socket:
We can also interrupt the Listener thread in Server.stop()

> NullPointer Exception in org.apache.hadoop.dfs.NameNode.isDir on namenode restart
> ---------------------------------------------------------------------------------
>                 Key: HADOOP-1178
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1178
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: dhruba borthakur
>         Assigned To: dhruba borthakur
>             Fix For: 0.12.2
>         Attachments: namenodestart.patch
> On a namenode restart, I sometimes get the following exception. The problem is that the
RPC server is initialized before the namenode data structures are initialized. This means
that an RPC starts getting processed by the namenode before its data structures are consistent.
The fix is to first initialize the namesystem and then start the RPC server.
> NFO org.apache.hadoop.ipc.Server: IPC Server handler 1 on 50000 call error: java.io.IOException:
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.hadoop.dfs.NameNode.isDir(NameNode.java:438)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:339)
>         at org.apache.hadoop.ipc.Server$Handler.run(Server.java:564)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message