q2190991 发表于 2022-11-5 19:46:21

ip配置工具 报错

REQUEST_DATE: 2022-11-05 04:02:34
PAN_VERSION: 7.9.5
OS_VERSION: Ubuntu 20.04 LTS x86_64(Py3.7.9)
REMOTE_ADDR: xxxx
REQUEST_URI: POST /plugin%3Faction%3Da%26amp%3Bname%3Dip_configuration%26amp%3Bs%3Dset_ip_address
REQUEST_FORM: {'dev_name': 'enp2s0f0', 'ip_address_add': '45.92.126.115', 'netmask_add': '255.255.255.248'}
USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Traceback (most recent call last):
File "pluginAuth.py", line 449, in pluginAuth.Plugin.exec_fun
File "/www/server/panel/plugin/ip_configuration/ip_configuration_main.py", line 393, in set_ip_address
    if self.ubuntu_ip_set(dev_name=get.dev_name,ip_address_add=get.ip_address_add,netmask_add=new_net_num) == False:
File "/www/server/panel/plugin/ip_configuration/ip_configuration_main.py", line 860, in ubuntu_ip_set
    tmp_data = data['network']['ethernets']['addresses']
KeyError: 'enp2s0f0'

IP信息

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp2s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether xxxxx ff:ff:ff:ff:ff:ff
    inet xxxx brd xxxx scope global enp2s0f0
       valid_lft forever preferred_lft forever
    inet6 xxxx/64 scope link
       valid_lft forever preferred_lft forever
3: enp2s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/etherxxxx brd ff:ff:ff:ff:ff:ff

宝塔用户_kqiiyg 发表于 2024-8-8 15:36:55

同样遇到,作者处理好了吗
页: [1]
查看完整版本: ip配置工具 报错