How to change the port of a client?

246 views
Skip to first unread message

animateur...@gmail.com

unread,
Feb 15, 2019, 6:00:05 PM2/15/19
to bareos-users
Hello everybody,

All my hosts run on Debian 9.
I have 2 clients behind a firewall.

I setup the first in passive mode and default port 9102, it is ok.
I setup the second with port 9104 but it does not work.
My client : /etc/bareos/bareos-fd.d/client/myself.conf :
Client {
Name = es2-fd
# FD Address = 9104
FD Port = 9104
}
I change also : /etc/init.d/bareos
...
NETWORK_PORT=9104
...

But I do not succeed to start the service : service bareos-fd start ->
Job for bareos-filedaemon.service failed because a timeout was exceeded.

and journalctl ->
bareos-filedaemon.service: PID file /var/lib/bareos/bareos-fd.9102.pid not readable (yet?) after start: No such file or directory

It seems that the port 9102 is still used for my second client... where is-it configured?

Thanks in advance.

Balázs Hegedüs

unread,
Feb 18, 2019, 10:05:14 AM2/18/19
to bareos-users
Debian 9 use SystemD!

systemctl edit bareos-filedaemon

[Service]
PIDFile=/var/lib/bareos/bareos-fd.9102.pid

animateur...@gmail.com

unread,
Feb 18, 2019, 1:56:22 PM2/18/19
to bareos-users
Sorry, but it does not work (for me)

Andreas Haase

unread,
Feb 19, 2019, 2:26:34 AM2/19/19
to bareos...@googlegroups.com
Hello,

I wouldn't change the port, but recommend to use client initiated
connections. So both clients behind the firewall would be able to
connect to the bareos director.

Bye,

Andreas

Am 16.02.19 um 00:00 schrieb animateur...@gmail.com:

animateur...@gmail.com

unread,
Feb 20, 2019, 4:02:04 AM2/20/19
to bareos-users
Thanks Andreas,
I had not seen this option in the documentation before, but it is wirtten in the doc that this method has disadvantages.
I do not understand why we cannot change the port since it's a paramameter in the confid. Is-it hard coded somewhere in the source? For a special reason?
Philippe

Andreas Haase

unread,
Feb 20, 2019, 4:10:22 AM2/20/19
to bareos...@googlegroups.com
Hello Philippe,

every method has disadvantages, so why not give it a try? ;-) ... one
dis of this method is, that the client constantly keeps a connection to
the director open. If this connection dies for some reason, it has to be
reestablished. But this should happen automatically. I use this setup
internally for > 20 clients, which cannot be contacted by the director
directly, and all works as expected.

Of course, you also can change the client port in bareos-fd, but as
mentioned before, you also have to notify systemd to check another port
after starting the daemon. Missing this, systemd will always throw an
error. Also you will have to change firewall rules or NAT settings
involved in your setup. In my opinion this is much more complicated than
simply using client initiated connections.

Bye,

Andreas


Am 20.02.19 um 10:02 schrieb animateur...@gmail.com:

animateur...@gmail.com

unread,
Feb 20, 2019, 4:52:19 AM2/20/19
to bareos-users
I succeed by updating the port number in /lib/systemd/system/bareos-filedaemon.service

animateur...@gmail.com

unread,
Feb 20, 2019, 10:46:23 AM2/20/19
to bareos-users
Hello Andreas,

You are totaly right : every method has disadvantages,
Now, that the 2 methods work, it is well for everybody.

Regards
Philippe.

Balázs Hegedüs

unread,
Mar 8, 2019, 10:40:34 AM3/8/19
to animateur...@gmail.com, bareos-users
It's work:

systemctl edit bareos-filedaemon
no bareos-fd

[Service]
PIDFile=/var/lib/bareos/bareos-fd.9199.pid
9199: your port  

systemctl daemon-reload

Conf:
FD Port = 9199

systemctl restrat bareos-filedaemon

--
You received this message because you are subscribed to a topic in the Google Groups "bareos-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bareos-users/o1QdQqjwIkE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bareos-users...@googlegroups.com.
To post to this group, send email to bareos...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages