向mikrotik客户端发送配置文件更改命令时出错

时间:2019-04-08 10:10:59

标签: java command mikrotik

我无法向路由器发送配置文件交换命令。

public void alterProfile(String name) throws Exception {

    ApiConnection con = null;
    String stmt = "/ppp/secret/set profile=default " + name;

    try {           
        con = ConnectionFactoryMikrotik.connect();          
        con.execute(stmt);           
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        ConnectionFactoryMikrotik.disconnect(con);
    }
}

您知道我是否计算错误的语法?

Exception:
me.legrange.mikrotik.MikrotikApiException: unknown parameter
at me.legrange.mikrotik.impl.ApiConnectionImpl$SyncListener.getResults(ApiConnectionImpl.java:476)
at me.legrange.mikrotik.impl.ApiConnectionImpl$SyncListener.access$100(ApiConnectionImpl.java:430)
at me.legrange.mikrotik.impl.ApiConnectionImpl.execute(ApiConnectionImpl.java:114)
at me.legrange.mikrotik.impl.ApiConnectionImpl.execute(ApiConnectionImpl.java:72)

0 个答案:

没有答案