opsiconfd doesn't communicate with the clients?!

Antworten
huebers
Beiträge: 8
Registriert: 04 Nov 2009, 12:14

opsiconfd doesn't communicate with the clients?!

Beitrag von huebers »

Hello,

I recently installed Opsi-server with the opsi-server CD. We wanne test the hardware and software inventories.
So I've set up a second lan with the opsi-server and a existing windows XP client. In the webinterface I added the client and in the tab netbook products I set the action of the first product on action : setup. When i boot with PXE it says, trying to load and after that it's says boot local disk.
- Question 1 : The opsiconfd decides to boot with PXE (Installation of something) or when nothing to do boot local disk right?

I download the PXE-Client bootcd and tried that one as a debug, because you can see the config dhcp sends(maybe that is wrong right?!) I made an configuration error so I could see the rest of the configuration. Everything whas right except the last option (configuration server) It was set as 0.0.0.0
- Question 2 : The last option (configuration server) must be the IP from the opsi-server right?
- Question 3 : Where can i change that setting?
- Question 4 : Does this solve the problem or have i done something else wrong?

Thanks in advance,
Anthony Huebers
Benutzeravatar
j.schneider
uib-Team
Beiträge: 1810
Registriert: 29 Mai 2008, 15:14

Re: opsiconfd doesn't communicate with the clients?!

Beitrag von j.schneider »

Hi!
huebers hat geschrieben:Hello,
- Question 1 : The opsiconfd decides to boot with PXE (Installation of something) or when nothing to do boot local disk right?
Yes, but more precise it is the opsipxeconfd which makes this decision.
huebers hat geschrieben:Hello,
I download the PXE-Client bootcd and tried that one as a debug, because you can see the config dhcp sends(maybe that is wrong right?!) I made an configuration error so I could see the rest of the configuration. Everything whas right except the last option (configuration server) It was set as 0.0.0.0
- Question 2 : The last option (configuration server) must be the IP from the opsi-server right?
- Question 3 : Where can i change that setting?
- Question 4 : Does this solve the problem or have i done something else wrong?
Question 2 : Yes, it has to be the ip address of the opsi-server.
Question 3 : You have to configure your dhcp server to pass a tftp-server (boot server/nextserver) to the clients.
Are you running a linux dhcp server or windows dhcp?
Question 4 : It should
huebers
Beiträge: 8
Registriert: 04 Nov 2009, 12:14

Re: opsiconfd doesn't communicate with the clients?!

Beitrag von huebers »

Hello J.Schneider,

Thanks for your fast reply. I'm using OPSI as a DHCP server. I saved the configuration files, as you can see below.

Code: Alles auswählen

opsiserver:~# cat /etc/dhcp3/dhcpd.conf
# DHCP Server 
ddns-update-style none;

# option definitions common to all supported networks...
option domain-name "maastricht.nlcom.nl";
option domain-name-servers 172.17.6.123;
option netbios-name-servers 172.17.6.123;
option netbios-node-type 8;

default-lease-time 600;
max-lease-time 7200;

# zelf toegevoegt
#
subnet 172.17.6.0 netmask 255.255.255.0 {
        range 172.17.6.10 172.17.6.20;
        option subnet-mask 255.255.255.0;
        option routers 172.17.6.254;
        option broadcast-address 172.17.6.255;

        # Group the PXE bootable hosts together
        group {
                # PXE-specific configuration directives
                #option dhcp-class-indentifier "PXEClient";
                next-server 172.17.6.123;
                filename "linux/pxelinux.0";

        #       host stage_pc01 {
        #               hardware ethernet 00:1a:92:35:3a:25;
        #               fixed-address stage_pc01;
        #               next-server 172.17.6.123;
        #       }

        }
        default-lease-time 600;
        max-lease-time 7200;

}

# Fixed IP addresses can also be specified for hosts.   These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host stage_pc01{
#  hardware ethernet 00:1a:92:35:3a:25;
#  fixed-address stage_pc01.maastricht.nlcom.nl;
#}

# You can declare a class of clients and then do address allocation
# based on that.   The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
#  subnet 10.17.224.0 netmask 255.255.255.0 {
#    option routers rtr-224.example.org;
#  }
#  subnet 10.0.29.0 netmask 255.255.255.0 {
#    option routers rtr-29.example.org;
#  }
#  pool {
#    allow members of "foo";
#    range 10.17.224.10 10.17.224.250;
#  }
#  pool {
#    deny members of "foo";
#    range 10.0.29.10 10.0.29.230;
#  }
#}

# This will tell the box its hostname while booting:
use-host-decl-names on;

Code: Alles auswählen

opsiserver:~# cat /etc/opsi/opsiconfd.conf
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
; =     configuration file for opsiconfd                                =
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =


; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     global settings                                                 -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[global]

        # Location of the backendManager config file/dir.
        # Opsiconfd needs to be restarted for changes to take effect.
        #
        # Default:
        #   bm config = /etc/opsi/backendManager.d

        bm config = /etc/opsi/backendManager.d

        # Location of the pid file.
        # Opsiconfd needs to be restarted for changes to take effect.
        #
        # Default:
        #   pid file = /var/run/opsiconfd/opsiconfd.pid

        pid file = /var/run/opsiconfd/opsiconfd.pid

        # Location of the log file.
        # The macro %m can be used to create use a separate log file for
        # each client. %m will be replaced by <client-ip>
        # Leave empty to use syslog.
        # Opsiconfd needs to be reloaded (SIGHUP) for changes to take effect.
        #
        # Default:
        #   log file =

        log file = /var/log/opsi/opsiconfd/%m.log

        # If separate log files are used and this option is enabled
        # opsiconfd will create a symlink in the log dir which points
        # to the clients log file. The name of the symlink will be the same
        # as the log files but %m will be replaced by <client-fqdn>.
        # Opsiconfd needs to be reloaded (SIGHUP) for changes to take effect.
        #
        # Default:
        #   symlink logs = yes

        symlink logs = yes

        # Set the log (verbosity) level
        # (0 <= log level <= 6)
        # 0: nothing, 1: critical, 2: errors, 3: warnings, 4: notices
        # 5: infos, 6: debug messages, 7: more debug messages, 9: passwords
        # Opsiconfd needs to be reloaded (SIGHUP) for changes to take effect.
        #
        # Default:
        #   log level = 2

        log level = 6

        # Set the log format
        # Macros:
        # %D: current time
        # %T: thread id
        # %l: log level (0..6)
        # %L: log level (name)
        # %M: the message
        # %F: filename
        # %N: linenumber
        # Opsiconfd needs to be reloaded (SIGHUP) for changes to take effect.
        #
        # Default:
        #   log format = [%l] [%D] %M (%F|%N)

        log format = [%l] [%D] %M (%F|%N)

        # Maximum number of execution statistics to store in memory.
        # Execution statistics can be written to the log file by sending
        # a SIGHUP to opsiconfd.
        # Opsiconfd needs to be reloaded (SIGHUP) for changes to take effect.
        #
        # Default:
        #   max execution statistics = 250

        max execution statistics = 250


; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     service settings                                                -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[service]

        # The network interfaces to bind to.
        # This must be the IP address of an network interface.
        # Use 0.0.0.0 to listen to all interfaces
        # Opsiconfd needs to be restarted for changes to take effect.
        #
        # Default:
        #   interface = 0.0.0.0

        interface = 172.17.6.123

        # The port where opsiconfd will listen for HTTP requests.
        # Use 0 to disable HTTP protocol
        # Opsiconfd needs to be restarted for changes to take effect.
        #
        # Default:
        #   http port = 0

        http port = 8080

        # The port where opsiconfd will listen for HTTPS requests.
        # Use 0 to disable HTTPS protocol
        # Opsiconfd needs to be restarted for changes to take effect.
        #
        # Default:
        #   https port = 4447

        https port = 4447

        # The location of the server certificate.
        # Opsiconfd needs to be restarted for changes to take effect.
        #
        # Default:
        #   ssl server cert = /etc/opsi/opsiconfd.pem

        ssl server cert = /etc/opsi/opsiconfd.pem

        # The location of the server private key
        # Opsiconfd needs to be restarted for changes to take effect.
        #
        # Default:
        #   ssl server key = /etc/opsi/opsiconfd.pem

        ssl server key = /etc/opsi/opsiconfd.pem


; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     session settings                                                -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[session]

        # Session name used in the session cookie.
        # Opsiconfd needs to be reloaded (SIGHUP) for changes to take effect.
        #
        # Default:
        #   session name = OPSISID

        session name = OPSISID

        # If a client connects to the service, opsiconfd will try to resolve
        # the ip address to a fqdn by a system call if this option is set.
        # The resolved fqdn will be stored in the session. If a client asks
        # for its id by calling getHostId() the hostname stored in the session
        # will be returned.
        # Opsiconfd needs to be reloaded (SIGHUP) for changes to take effect.
        #
        # Default:
        #   resolve ip = yes

        resolve ip = no

        # If a client uses its fqdn and opsi-host-key for authentication,
        # opsiconfd will try to resolve the fqdn (username) by a system call.
        # If there is no result or the resulting IP address does not match
        # the client's address, the access will be denied.
        # Opsiconfd needs to be reloaded (SIGHUP) for changes to take effect.
        #
        # Default:
        #   verify ip = no

        verify ip = no

        # The interval in seconds after an inactive session expires.
        # Opsiconfd needs to be reloaded (SIGHUP) for changes to take effect.
        #
        # Default:
        #   max inactive interval = 120

        max inactive interval = 120

; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; -     static directories                                              -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[directories]

        # Every option value pair (<resourcename> = <path>) has to consist
        # of a resourcename and a path to a local directory.
        # The URL http(s)://<server>:<port>/<resourcename> will give
        # access to the content of <path>.
        # Opsiconfd needs to be restarted for changes to take effect.

        / = /usr/share/opsiconfd/static
        configed = /usr/lib/configed
        opsi-depot = /opt/pcbin/install

Code: Alles auswählen

opsiserver:~# cat /etc/opsi/opsipxeconfd.conf
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
; =     configuration file for opsipxeconfd                             =
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

# Location of the backendManager config file/dir.
# Opsipxeconfd needs to be restarted for changes to take effect.
#
# Default:
#   bm config = /etc/opsi/backendManager.d

bm config = /etc/opsi/backendManager.d

# Location of the pid file.
# Opsipxeconfd needs to be restarted for changes to take effect.
#
# Default:
#   pid file = /var/run/opsipxeconfd/opsipxeconfd.pid

pid file = /var/run/opsipxeconfd/opsipxeconfd.pid

# Location of the log file.
# Leave empty to use syslog.
# Opsipxeconfd needs to be reloaded (SIGHUP) for changes to take effect.
#
# Default:
#   log file =

log file = /var/log/opsi/opsipxeconfd.log

# Set the log (verbosity) level
# (0 <= log level <= 6)
# 0: nothing, 1: critical, 2: errors, 3: warnings, 4: notices
# 5: infos, 6: debug messages, 7: more debug messages, 9: passwords
# Opsipxeconfd needs to be reloaded (SIGHUP) for changes to take effect.
#
# Default:
#   log level = 3

log level = 4

# Set the log format
# Macros:
# %D: current time
# %T: thread id
# %l: log level (0..6)
# %L: log level (name)
# %M: the message
# %F: filename
# %N: linenumber
# Opsipxeconfd needs to be reloaded (SIGHUP) for changes to take effect.
#
# Default:
#   log format = [%l] [%D] %M (%F|%N)

log format = [%l] [%D] %M (%F|%N)

# Set the directory where pxelinux config files are located.
# Opsipxeconfd needs to be reloaded (SIGHUP) for changes to take effect.
#
# Default:
#   pxe config dir = /tftpboot/linux/pxelinux.cfg

pxe config dir = /tftpboot/linux/pxelinux.cfg

# The location of the pxelinux config template.
# Opsipxeconfd needs to be reloaded (SIGHUP) for changes to take effect.
#
# Default:
#   pxe config template = /tftpboot/linux/pxelinux.cfg/install

pxe config template = /tftpboot/linux/pxelinux.cfg/install

# Number of maximum simultaneous control connections.
# Opsipxeconfd needs to be restarted for changes to take effect.
#
# Default:
#   max control connections = 5

max control connections = 5

# Number of maximum simultaneous pxe config writer threads.
# Opsipxeconfd needs to be reloaded (SIGHUP) for changes to take effect.
#
# Default:
#   max pxe config writers = 100

max pxe config writers = 100
Thanks in advance,
Anthony Huebers
Benutzeravatar
j.schneider
uib-Team
Beiträge: 1810
Registriert: 29 Mai 2008, 15:14

Re: opsiconfd doesn't communicate with the clients?!

Beitrag von j.schneider »

I can not find any host declarations in you dhcpd.conf.
Except that, the configuration is what you need (next-server, filename).

Code: Alles auswählen

        # Group the PXE bootable hosts together
        group {
                # PXE-specific configuration directives
                #option dhcp-class-indentifier "PXEClient";
                next-server 172.17.6.123;
                filename "linux/pxelinux.0";
                .........
        }
You have to create host entries for your clients within the PXE group.
Opsi can create these entries automatically when you add clients using opsi configed.
If that's what you want please edit the file:
/etc/opsi/backendManager.d/30_vars.conf
and set clientManagingBackend to:

Code: Alles auswählen

self.clientManagingBackend = [BACKEND_DHCPD, BACKEND_FILE31]
Then restart opsiconfd:

Code: Alles auswählen

/etc/init.d/opsiconfd restart
Now create a client with opsi configed (specify ip and mac in the new client dialog).
huebers
Beiträge: 8
Registriert: 04 Nov 2009, 12:14

Re: opsiconfd doesn't communicate with the clients?!

Beitrag von huebers »

Hello J.Schneider,

Thanks for your reply but I already solved the problem! Sorry for my late response.
When I posted the configurations I discovered my dhcpconfig file whas wrong. You are right my configuration whas not complete.
It's running right now in the test environment. We wanne implementate it tommorrow in our netwerk.

Thanks for your help!

Regards,
Anthony Huebers
Benutzeravatar
j.schneider
uib-Team
Beiträge: 1810
Registriert: 29 Mai 2008, 15:14

Re: opsiconfd doesn't communicate with the clients?!

Beitrag von j.schneider »

You're welcome
Antworten