SOLVED! It was a proxy problem. Necessary to include a line in systemd bacula-sd.service: ... [Service] Type=simple User=root Group=disk Environment="https_proxy=http://<proxy-server-addr>:<port>" ExecStart=/opt/bacula/bin/bacula-sd -fP -c /opt/bacula/etc/bacula-sd.conf SuccessExitStatus=15 LimitMEMLOCK=infinity ...
When running bacula-sd from login shell command line it uses http_proxy yet defined in the environment, this is because things go well. Unfortunately, bacula-sd debug (level 500 or more) did not show any clue about the problem' s cause. Thanks to all for the assistance. Otaci Martins Em seg., 20 de set. de 2021 às 16:27, Otaci Martins <otaci.mart...@gmail.com> escreveu: > bacula-sd can't upload volumes to AWS S3 if running as systemd daemon, but > if called directly by terminal cli the upload works perfectly. > > 1. Steps to reproduce the upload error: > --------------------------------------- > $ sudo systemctl start bacula-sd > > $ ps -ef | grep bacula > root 12573 1 0 15:39 ? 00:00:00 /opt/bacula/bin/bacula-sd > -fP -c /opt/bacula/etc/bacula-sd.conf > root 13555 1 0 Sep15 ? 00:00:01 /opt/bacula/bin/bacula-fd > -fP -c /opt/bacula/etc/bacula-fd.conf > bacula 29641 1 0 10:58 ? 00:00:00 /opt/bacula/bin/bacula-dir > -fP -c /opt/bacula/etc/bacula-dir.conf > > $ echo "cloud list storage=S3CLOUD" | bconsole > Connecting to Director 192.168.10.12:9101 > 1000 OK: 10002 BACULA11-DIR Version: 11.0.5 (03 June 2021) > Enter a period to cancel a command. > cloud list storage=S3CLOUD > Automatically selected Catalog: BACULA11-CA > Using Catalog "BACULA11-CA" > Connecting to Storage daemon S3CLOUD at 192.168.10.12:9103 ... > 3900 Error cannot get cloud Volume list. ERR=S3_list_bucket > ERR=FailedToConnect CURL Effective URL: > https://mybucket.s3.sa-east-1.amazonaws.com/?delimiter=%2F CURL OS Error: > 110 CURL Effective URL: > https://mybucket.s3.sa-east-1.amazonaws.com/?delimiter=%2F CURL OS Error: > 110 > > 2. Steps to reproduce the upload success: > ----------------------------------------- > $ sudo systemctl stop bacula-sd > > $ sudo /opt/bacula/bin/bacula-sd -fP -c /opt/bacula/etc/bacula-sd.conf > > $ ps -ef|grep bacula > root 13362 11959 0 15:53 pts/1 00:00:00 sudo > /opt/bacula/bin/bacula-sd -fP -c /opt/bacula/etc/bacula-sd.conf > root 13364 13362 0 15:53 pts/1 00:00:00 /opt/bacula/bin/bacula-sd > -fP -c /opt/bacula/etc/bacula-sd.conf > root 13555 1 0 Sep15 ? 00:00:01 /opt/bacula/bin/bacula-fd > -fP -c /opt/bacula/etc/bacula-fd.conf > bacula 29641 1 0 10:58 ? 00:00:00 /opt/bacula/bin/bacula-dir > -fP -c /opt/bacula/etc/bacula-dir.conf > > $ echo "cloud list storage=S3CLOUD" | bconsole > Connecting to Director 192.168.10.12:9101 > 1000 OK: 10002 BACULA11-DIR Version: 11.0.5 (03 June 2021) > Enter a period to cancel a command. > cloud list storage=S3CLOUD > Automatically selected Catalog: BACULA11-CA > Using Catalog "BACULA11-CA" > Connecting to Storage daemon S3CLOUD at 192.168.10.12:9103 ... > > +--------------------+-----------+----------------------+----------------------+---------------+ > | Volume Name | Status | Media Type | Pool > | VolBytes | > > +--------------------+-----------+----------------------+----------------------+---------------+ > | AWSS3-0076 | Full | CloudAWS | > AWSS3-PO | 8.528 MB | > | BACKUP-CATALOGO | Append | CloudAWS | > AWSS3-PO | 1.015 MB | > > +--------------------+-----------+----------------------+----------------------+---------------+ > > 3. My question: > --------------- > So, once the config files are exactly the same in the two scenarios, what > can i search for? > > 4. My specs: > ------------ > Bacula CE 11.0.5 (installed from official rpm repos) > > SO: > > CentOS Linux release 7.9.2009 (Core) > Linux 3.10.0-1160.15.2.el7.x86_64 #1 SMP Wed Feb 3 15:06:38 UTC 2021 > x86_64 x86_64 x86_64 GNU/Linux > > bacula-dir.conf: > > Storage { > Name = S3CLOUD > Address = 192.168.10.12 > SDPort = 9103 > Password = "bacula" > Device = AWSS3-DRIVE-01 > Media Type = CloudAWS > Maximum Concurrent Jobs = 10 > } > > bacula-sd.conf: > > Device { > Name = AWSS3-DRIVE-01 > Device Type = Cloud > Cloud = AWSS3 > Archive Device = /tmp/hdd03 > Maximum Part Size = 1 GB > Maximum File Size = 1 GB > Media Type = CloudAWS > LabelMedia = yes > Random Access = yes > AutomaticMount = yes > RemovableMedia = no > AlwaysOpen = no > } > > Cloud { > Name = AWSS3 > Driver = "S3" > HostName = "s3.sa-east-1.amazonaws.com" > BucketName = "MyBucket" > AccessKey = "MyAccessKey" > SecretKey = "MySecretKey" > Protocol = HTTPS > UriStyle = VirtualHost > Truncate Cache = No > Upload = EachPart > Region = "sa-east-1" > MaximumUploadBandwidth = 5MB/s > } > > Systemd bacula-sd.service: > > [Unit] > Description=Bacula Storage Daemon service > Requires=network.target > After=network.target > RequiresMountsFor=/opt/bacula/working /opt/bacula/etc /opt/bacula/bin > > [Service] > Type=simple > User=root > Group=disk > ExecStart=/opt/bacula/bin/bacula-sd -fP -c /opt/bacula/etc/bacula-sd.conf > SuccessExitStatus=15 > LimitMEMLOCK=infinity > > [Install] > WantedBy=multi-user.target > --- > > Thanks, > > Otaci Martins >
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users