Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

DNP3 polling not working with 'non-standard' port settings


  • Hi. I am having issues with a Mango unit on site that is acting as a DNP3 master. The setup is such that the Mango is a secondary master (to the main SCADA system) and hence needs different port settings to what would be considered standard.
    Using the usual port 20,000 works fine (however this needs to be reserved for the SCADA system), but using port 20002 (and some other ports) results in the polling failing after a few minutes. Altering the DNP3 ID of the master and slave doesn't seem to be related. It seems only port 20,000 will work reliably.

    It also seems to only apply to a single unit (from 4) that is experiencing the problem, so unlikely to be caused by our PLC.

    Is there a default setting somewhere that we can override? Or something we can check in more detail?


  • Hi tom_buzink,

    While the DNP3 module is in a private repo, the source code for the underlying protocol implementation is available: https://github.com/infiniteautomation/DNP34J

    The only use of the port in our code is setting up classes in DNP34J, like,

    @Override
        public void initialize() {
            EthernetParameters params = new EthernetParameters(configuration.getHost(), configuration.getPort());
            DNPConfig config = new DNPConfig(params, configuration.getSourceAddress(), configuration.getSlaveAddress());
            super.initialize(config);
        }
    

    which is then calling

    protected boolean initialize(DNPConfig config) {
            config.setRequestTimeout(vo.getTimeout());
            config.setRequestRetries(vo.getRetries());
            //        dnp3Master.setStaticPollMultiplier(vo.getStaticPollPeriods());
    
            user = new DNPUser(config);
    
            try {
                user.init();
                initialized = true;
                returnToNormal(DATA_SOURCE_EXCEPTION_EVENT, System.currentTimeMillis());
            }
            catch (Exception e) {
                raiseEvent(DATA_SOURCE_EXCEPTION_EVENT, System.currentTimeMillis(), true, new TranslatableMessage(
                        "event.exception2", vo.getName(), e.getMessage()));
                LOG.debug("Error while initializing data source", e);
                this.initialized = false;
                try {
                    user.stop();
                } catch(Exception e2) {} //munch
                return false;
            }
    
            super.initialize(); //com.serotonin.m2m2.rt.dataSource.PollingDataSource
            return true;
        }
    

    While I do not have much experience with DNP3 devices in particular, it is odd to me that you would say it works and then stops working. What version of Mango are you using? Does disabling and re-enabling the data source cause it to start working again if it is on a non-20000 port?

    If you observe it not polling anymore (but had been) when not using the standard port, I would be curious to see the output of going to the /rest/v1/threads?asFile=true&stackDepth=40 endpoint in your browser, which you could email into support@infiniteautomation.com and I would take a look at it