Skip to content

tools: fix tools not starting up on windows #1549

Merged
BareosBot merged 4 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/fix-tools-startup-on-windows
Oct 1, 2023
Merged

tools: fix tools not starting up on windows #1549
BareosBot merged 4 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/fix-tools-startup-on-windows

Conversation

@alaaeddineelamri
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri commented Sep 13, 2023

Description

On windows, tools that require configuration parsing are not able to startup, with socket errors showing up. This is because using sockets on windows requires some special initialization that tools do not have (but main daemons do).

This was introduced when we added checks for IPv4 and IPv6 family availability. The check is done during the config parsing part, which tools use, but on windows, they do not have the socket initialization necessary to do it, so they fail.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Required backport PRs have been created
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/fix-tools-startup-on-windows branch from 534dfd5 to d335bda Compare September 13, 2023 15:21
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/fix-tools-startup-on-windows branch 2 times, most recently from 83a460b to f312701 Compare September 15, 2023 08:05
@alaaeddineelamri alaaeddineelamri marked this pull request as ready for review September 15, 2023 08:09
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/fix-tools-startup-on-windows branch 2 times, most recently from 29edf5d to e19aee5 Compare September 18, 2023 10:05
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/fix-tools-startup-on-windows branch from e19aee5 to 5c00296 Compare September 19, 2023 09:14
@alaaeddineelamri alaaeddineelamri marked this pull request as draft September 19, 2023 09:15
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/fix-tools-startup-on-windows branch 3 times, most recently from a4db43f to 15b7cef Compare September 20, 2023 13:40
@alaaeddineelamri alaaeddineelamri marked this pull request as ready for review September 20, 2023 13:43
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/fix-tools-startup-on-windows branch from 15b7cef to 421e990 Compare September 21, 2023 08:54
@bruno-at-bareos
Copy link
Contributor

bruno-at-bareos commented Sep 21, 2023

While commit 421e990 was giving good results in testing on Windows Server 2022 the commit 15b7cef show again trouble in initialization

C:\Program Files\Bareos>bscan -d50 --dt --verbose -V Full-0001 FileStorage
21-Sep 16:28 bscan: Warning: Cannot open IPv4 stream socket. ERR=The operation completed successfully.

21-Sep 16:28 bscan: Warning: Cannot open IPv6 stream socket. ERR=The operation completed successfully.

21-Sep 16:28 bscan: Warning: Can't add default IPv4 address (IPv4 address wanted but IPv4 is disabled!)
21-Sep 16:28 bscan: Warning: Can't add default IPv6 address (IPv6 address wanted but IPv6 is disabled!)
bscan: ERROR TERMINATION at lib/address_conf.cc:509
Can't add default IPv6 and IPv4 addresses

C:\Program Files\Bareos>bscan --version 
23.0.0~pre918.421e99063

@BareosBot BareosBot force-pushed the dev/alaaeddineelamri/master/fix-tools-startup-on-windows branch from 59ee7b2 to 574c269 Compare October 1, 2023 18:52
@BareosBot BareosBot merged commit fb95cf5 into bareos:master Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants