View Issue Details

IDProjectCategoryView StatusLast Update
0000579bareos-core[All Projects] webuipublic2021-09-14 12:18
ReportertuxmasterAssigned Tofrank 
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSFedoraOS Version22
Product Version 
Fixed in Version 
Summary0000579: Unable to connect to the director from webui via ipv6
DescriptionThe web ui and the director are running on the same system.
After enter the password the error message "Error: , director seems to be down or blocking our request." will presented.
Steps To ReproduceOpen the website enter the credentials and try to log in.
Additional Informationgetsebool httpd_can_network_connect
httpd_can_network_connect --> on

Error from the apache log file:
[Sun Dec 06 12:37:32.658104 2015] [:error] [pid 2642] [client ABC] PHP Warning: stream_socket_client(): unable to connect to tcp://[XXX]:9101 (Unknown error) in /usr/share/bareos-webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php on line 521, referer: http://CDE/bareos-webui/

XXX=ip6addr of the director.

connect(from the web server) via telnet ip6addr 9101 will work.
bconsole will also work.
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-19.2: impact
bareos-19.2: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

Relationships

related to 0001383 closedarogge Release Bareos 18.2.12 
related to 0001384 closedarogge_adm Release Bareos 19.2.11 
related to 0001361 closedarogge Release Bareos 20.0.3 

Activities

frank

frank

2016-07-15 16:07

manager   ~0002323

Note: When specifying a numerical IPv6 address (e.g. fe80::1), you must enclose the IP in square brackets—for example, tcp://[fe80::1]:80.

http://php.net/manual/en/function.stream-socket-client.php

You could try setting your IPv6 address in your directors.ini into square brackets until we provide a fix, that might already work.
tuxmaster

tuxmaster

2016-07-15 17:04

reporter   ~0002324

I have try to set it to:
diraddress = "[XXX]"
XXX are the ipv6 address

But the error are the same.
tuxmaster

tuxmaster

2016-11-06 12:09

reporter   ~0002439

Same on Fedora 24 using php 7.0
pete

pete

2021-06-23 12:41

reporter   ~0004159

Last edited: 2021-06-23 12:55

View 3 revisions

This is still present in version 20 of the Bareos WebUI, on all RHEL variants I tested (CentOS 8, AlmaLinux 8).

It results from a totally unnecessary "bindto" configuration in line 473 of /usr/share/bareos-webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php:

      $opts = array(
          'socket' => array(
              'bindto' => '0:0',
          ),
      );

This unnecessarily limits PHP socket binding to IPv4 interfaces as documented in https://www.php.net/manual/en/context.socket.php. The simplest solution is to just comment out the "bindto" line:

      $opts = array(
          'socket' => array(
              // 'bindto' => '0:0',
          ),
      );

Restart php-fpm and now IPv6 works perfectly

frank

frank

2021-06-29 17:22

manager   ~0004167

Fix committed to bareos bareos-19.2 branch with changesetid 15043.

Related Changesets

bareos: master b2e8e740

2021-06-28 15:45:06

frank

Ported: N/A

Details Diff
webui: remove default stream socket context options

Do not enforce a specific bindto (ipv4/ipv6) by stream context options.

See:

https://www.php.net/manual/en/context.socket.php
https://www.php.net/manual/de/function.stream-context-create.php

Fixes 0000579: Unable to connect to the director from webui via ipv6
Affected Issues
0000579
mod - webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php Diff File

bareos: bareos-18.2 18330c03

2021-06-28 15:45:06

frank

Ported: N/A

Details Diff
webui: remove default stream socket context options

Do not enforce a specific bindto (ipv4/ipv6) by stream context options.

See:

https://www.php.net/manual/en/context.socket.php
https://www.php.net/manual/de/function.stream-context-create.php

Fixes 0000579: Unable to connect to the director from webui via ipv6

(cherry picked from commit b2e8e7406704f95dc8dbf6289347a7e81e0ddc2e)
Affected Issues
0000579
mod - webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php Diff File

bareos: bareos-19.2 da30d4b8

2021-06-28 15:45:06

frank

Ported: N/A

Details Diff
webui: remove default stream socket context options

Do not enforce a specific bindto (ipv4/ipv6) by stream context options.

See:

https://www.php.net/manual/en/context.socket.php
https://www.php.net/manual/de/function.stream-context-create.php

Fixes 0000579: Unable to connect to the director from webui via ipv6

(cherry picked from commit b2e8e7406704f95dc8dbf6289347a7e81e0ddc2e)
Affected Issues
0000579
mod - webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php Diff File

Issue History

Date Modified Username Field Change
2015-12-06 12:41 tuxmaster New Issue
2015-12-06 12:41 tuxmaster Status new => assigned
2015-12-06 12:41 tuxmaster Assigned To => frank
2015-12-18 12:23 frank Status assigned => confirmed
2016-07-15 16:07 frank Note Added: 0002323
2016-07-15 17:04 tuxmaster Note Added: 0002324
2016-11-06 12:09 tuxmaster Note Added: 0002439
2021-06-23 12:41 pete Note Added: 0004159
2021-06-23 12:45 pete Note Edited: 0004159 View Revisions
2021-06-23 12:55 pete Note Edited: 0004159 View Revisions
2021-06-28 15:51 frank Summary Unable to connect to the director via ipv6 => Unable to connect to the director from webui via ipv6
2021-06-29 17:22 frank Changeset attached => bareos master b2e8e740
2021-06-29 17:22 frank Changeset attached => bareos bareos-18.2 18330c03
2021-06-29 17:22 frank Changeset attached => bareos bareos-19.2 da30d4b8
2021-06-29 17:22 frank Note Added: 0004167
2021-06-29 17:22 frank Status confirmed => resolved
2021-06-29 17:22 frank Resolution open => fixed
2021-09-13 10:37 arogge Relationship added related to 0001383
2021-09-14 10:54 arogge_adm Relationship added related to 0001384
2021-09-14 12:18 arogge_adm Relationship added related to 0001361