Skip to content

Portmap issue? #44

@mharj

Description

@mharj

When checking portmapper from Linux I see something strange on service list

# rpcinfo -p 10.10.10.20
   program vers proto   port  service
    100004    1   udp  51014  ypserv
    100004    24294967295  64916  ypserv
    100004    2   udp  51014  ypserv
    100000    2   tcp    111  portmapper
    100007    2   tcp  64833  ypbind
    100004    14294967295  64916  ypserv
    100004    2   tcp  64916  ypserv
    100004    1   tcp  64916  ypserv
    100000    2   udp    111  portmapper
    100007    2   udp  51010  ypbind
    100007    24294967295  64833  ypbind

Also command fails to connect to actual services

# rpcinfo -u 10.10.10.20 ypserv 1
rpcinfo: RPC: Remote system error
program 100004 version 1 is not available

Code is just simple stub classes running on Windows NetBeans

public class YpService {
    private final static int RPC_YPPROG = 100004;
    private final static int RPC_YPBIND = 100007;

    public static void main(String[] args) {
        new OncRpcEmbeddedPortmap(); 
        YpBindProg ypBind = new YpBindProg();
        YpProg ypProg = new YpProg();
        OncRpcSvc ypBindService = new OncRpcSvcBuilder()
                .withUDP()
                .withTCP()
                .withAutoPublish()
                .withSameThreadIoStrategy()
                .withRpcService(new OncRpcProgram(RPC_YPBIND, 2),ypBind)
                .build();
        OncRpcSvc ypService = new OncRpcSvcBuilder()
                .withUDP()
                .withTCP()
                .withAutoPublish()
                .withSameThreadIoStrategy()
                .withRpcService(new OncRpcProgram(RPC_YPPROG, 1),ypProg)
                .withRpcService(new OncRpcProgram(RPC_YPPROG, 2),ypProg)
                .build();       
        try {
            ypBindService.start();
            ypService.start();
            System.in.read();
        } catch (IOException ex) {
            Logger.getLogger(YpService.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}

Libs are
core-2.5.3
guava-19.0
grizzly-framework-2.3.25
(slf4+auth deps)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions