Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nut-scanner fails due to simulation mode if CONFPATH does not exist #2335

Closed
jimklimov opened this issue Mar 1, 2024 · 1 comment · Fixed by #2336
Closed

nut-scanner fails due to simulation mode if CONFPATH does not exist #2335

jimklimov opened this issue Mar 1, 2024 · 1 comment · Fixed by #2336
Assignees
Milestone

Comments

@jimklimov
Copy link
Member

jimklimov commented Mar 1, 2024

Fall-out from #2246 / #2242 :

   0.175520     [D1] nutscan_init: succeeded to load the library for NUT Client library
   0.175529     Scanning USB bus.
   0.175577     No start IP, skipping SNMP
   0.175580     Scanning XML/HTTP bus.
   0.175583     [D1] XML/HTTP SCAN: starting pthread_create with run_xml...
   0.175605     [D1] run_usb: using library default link_detail_level settings
   0.175623     No start IP, skipping NUT bus (old connect method)
   0.175627     Scanning NUT simulation devices.
   0.175629     [D1] NUT simulation devices SCAN: starting pthread_create with run_nut_simulation...
   0.175674     Scanning NUT bus (avahi method).
   0.175678     [D1] NUT bus (avahi) SCAN: starting pthread_create with run_avahi...
   0.175677     [D1] Scanning XML/HTTP bus using broadcast.
   0.175714     [D2] nutscan_scan_xml_http_generic() : scanning connected network segment(s) with a broadcast, attempt 1 of 3 with a timeout of 5000000 usec
   0.175724     Scanning IPMI bus.
   0.175728     [D1] IPMI SCAN: starting pthread_create with run_ipmi...
   0.175723     [D1] Scanning: /usr/local/ups/etc
   0.175749     Failed to open /usr/local/ups/etc: No such file or directory
   0.175873     [D5] nutscan_scan_xml_http_generic() : sent request to <broadcast>, loop #1/3, waiting for responses
nut$

Probably related to fatal_with_errno() below:

    upsdebugx(1, "Scanning: %s", CONFPATH);

    if ((dp = opendir(CONFPATH)) == NULL) {
        fatal_with_errno(EXIT_FAILURE, "Failed to open %s", CONFPATH);
        return NULL;
    }
@jimklimov
Copy link
Member Author

jimklimov commented Mar 2, 2024

Addressed by commit cd4e190 (issue link in comment botched)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants