barcus / bareos

Docker image for Bareos
https://hub.docker.com/r/barcus
MIT License
116 stars 55 forks source link

DNS error ? #15

Closed vdeville closed 5 years ago

vdeville commented 5 years ago

Hello, i have a error when in launch my first Job, the director do not contact the storage ?

Error Job:

22-Dec 00:07 bareos-dir JobId 4: Start Backup JobId 4, Job=labs.valentin.ovh_CustomLinux.2018-12-22_00.07.19_20
22-Dec 00:07 bareos-dir JobId 4: Secure connection to Storage daemon at bareos-sd:9103 with cipher PSK-AES256-CBC-SHA established
22-Dec 00:07 bareos-dir JobId 4: Using Device "FileStorage" to write.
22-Dec 00:07 bareos-dir JobId 4:
Try to establish a secure connection by immediate TLS handshake:
22-Dec 00:07 bareos-dir JobId 4: Secure connection with cipher PSK-AES256-CBC-SHA
22-Dec 00:07 labs-fd JobId 4: Error: lib/bsock_tcp.cc:192 BnetHost2IpAddrs() for host "bareos-sd" failed: ERR=Name or service not known
22-Dec 00:07 labs-fd JobId 4: Fatal error: Failed to connect to Storage daemon: bareos-sd:9103
22-Dec 00:07 bareos-dir JobId 4: Fatal error: Bad response to Storage command: wanted 2000 OK storage
, got 2902 Bad storage

Resolve Ok:

root@2727d7f99817:~# ping bareos-sd
PING bareos-sd (172.20.0.6): 56 data bytes
64 bytes from 172.20.0.6: icmp_seq=0 ttl=64 time=0.101 ms
64 bytes from 172.20.0.6: icmp_seq=1 ttl=64 time=0.088 ms
^C--- bareos-sd ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.088/0.095/0.101/0.000 ms

Thanks

vdeville commented 5 years ago

My bad, wrong server It's my labs serveur that not connect to storage deamon.

vdeville commented 5 years ago

But i don't know where he find "bareos-sd", no specified in any configuration

vdeville commented 5 years ago

FYI, for use in public environement IP you need to modify the modify the File.conf in storage dir of director.

barcus commented 5 years ago

But i don't know where he find "bareos-sd", no specified in any configuration

this is a docker-compose feature (v3+ i think). Docker creates NS entrie of each container, based on container name and IP. So you don't need to create link between container inside your docker-compose stack.