简体   繁体   English

getHardwareAddress不适用于Orienti的IBMi(iSeries)

[英]getHardwareAddress not working on IBMi (iSeries) reqd for OrientDB

I am actually trying to run OrientDB on IBMi (iSeries, AS/400, V540, JDK6-32-bit last CUM PTFs applied). 我实际上是在IBMi上运行OrientDB(应用iSeries,AS / 400,V540,JDK6-32位最后一个CUM PTF)。 One of the things that OrientDB does early on (so to speak) is try to find at least one mac address (not entirely sure why as I am using it purely in local embedded mode for now). OrientDB早期做的事情之一(可以这么说)是尝试找到至少一个mac地址(不完全确定为什么我现在纯粹在本地嵌入模式下使用它)。 I have made my own test method which has the same results: 我制作了自己的测试方法,结果相同:

LogIt.log(Level.INFO,"About to list mac addresses.");
final Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
while (networkInterfaces.hasMoreElements()) {
    NetworkInterface networkInterface = networkInterfaces.nextElement();
    final byte[] mac = networkInterface.getHardwareAddress();
    if (mac == null) {
        LogIt.log(Level.INFO,"Mac address is null.");
        continue;
    }  // if
    String hex = Utils.convertBytesToHexString(mac);
    LogIt.log(Level.INFO,"Mac address found {0}.",hex);
}  // while

The system output shows a message: 系统输出显示一条消息:

getkerninfo 1: A system call received a parameter that is not valid.

and it fails to retrieve any mac addresses using the call getHardwareAddress() (actually it returns null 3 times). 并且它无法使用调用getHardwareAddress()检索任何mac地址(实际上它返回null 3次)。 I have run it as a 'programmer' type user and as a security officer (like 'root'), with the same results. 我将它作为“程序员”类型用户和安全官(如“root”)运行,具有相同的结果。 It works fine on my Ubuntu 12.04 PC and laptop. 它在我的Ubuntu 12.04 PC和笔记本电脑上工作正常。

I would like to know if anyone else has come across this problem and found a solution. 我想知道是否有其他人遇到过这个问题并找到了解决方案。

Since getkerninfo() is a generally undocumented C system call on Unix/Linux, are you running this in PASE on your iSeries? 由于getkerninfo()是Unix / Linux上一般未记录的C系统调用,您是否在iSeries上的PASE中运行它? I would first suspect that that's the only likely environment that might give success. 我首先怀疑这是唯一可能成功的环境。 Otherwise, a Linux partition seems called for. 否则,似乎需要一个Linux分区。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM