.. Reminder for header structure: Parts (H1) : #################### with overline Chapters (H2) : ******************** with overline Sections (H3) : ==================== Subsections (H4) : -------------------- Subsubsections (H5) : ^^^^^^^^^^^^^^^^^^^^ Paragraphs (H6) : """"""""""""""""""""" .. meta:: :description: Frequent problems and questions :keywords: lost password, lost private key, stolen private key, BIOS bug, waptdeploy, WAPT, documentation, the WAPT Deployment utility .. _wapt_faq: ############################### Frequent problems and questions ############################### ********************************** WAPT Server behind a reverse proxy ********************************** .. attention:: The support of reverse proxy (WAF, etc.) doing TLS interceptions or TLS terminaison is no longer supported. If you have a reverse proxy in front of the WAPT server, it has to be configured as a simple TLS forwarding proxy based on SNI (cf. ngx_stream_core_module on nginx server for example). * First you need to check if the stream module package (libnginx-mod-stream on Debian/Ubuntu, nginx-mod-stream on RedHat and derivatives) is installed on the NginX Reverse Proxy server. * Then you can insert the following content into /etc/nginx/modules-enabled/80-stream.conf of the NginX Reverse Proxy server: .. code-block:: ini stream { tcp_nodelay on; map $ssl_preread_server_name $https_upstream { wapt.mydomain.com 192.168.2.5:443; # 192.168.2.5 is the local IP address of the WAPT server } server { listen 443; resolver 127.0.0.1; proxy_pass $https_upstream; ssl_preread on; } } Similar configuration is possible using HAProxy TLS Passthrough module but we do not provide support. Please refer to the corresponding documentation for details. ************************************************ Updating WAPT packages from Python 2 to Python 3 ************************************************ .. _python2to3: .. attention:: With WAPT 2.0, the WAPT internals have switched to python3. WAPT packages **MUST** follow the new python3 syntax. .. list-table:: The principal syntax differences :header-rows: 1 :widths: 80, 10, 10 * - Syntax - Python 2 - Python 3 * - print - :code:`print'Hello'` - :code:`print('Hello')` * - unicode string - :code:`ur` - :code:`r` * - operators - :code:`<> <=> !=` - :code:`!=` * - Windows registry access - :code:`_winreg` - :code:`winreg` .. hint:: For more details, visit: * https://python-future.org/compatible_idioms.html. * https://blog.couchbase.com/tips-and-tricks-for-upgrading-from-python-2-to-python-3/. **************************************** Resetting the WAPT Linux Server password **************************************** It sometimes happens to setup a WAPT Server and then forget its password. To reset the WAPT Console :term:`SuperAdmin` password you have to relaunch the post-configuration process on the WAPT Server: * Connect to the WAPT Server with SSH. * Connect with user root (or use sudo). * Launch the :ref:`post-configuration script `. .. _lost_private_key: ************************** I lost my WAPT private key ************************** WAPT security and its correct functioning rely on sets of private keys and public certificates. Losing a private key thus requires to :ref:`generate a new key ` and its associated certificates, and then to deploy the new keys and the new certificates on the Organization's computers. Therefore, losing a key bears some consequences, the process to recover from a lost key is not trivial, although it is relatively simple. Generating or renewing a private key ==================================== The procedure is: * :ref:`Generate a new private key/ public certificate `. You will then keep the private key (file :mimetype:`.pem`) in a safe location; * Deploy, manually, using a :abbr:`GPO (Group Policy Object)` or using an Ansible role (not documented), the new certificate :mimetype:`.crt` on your clients in the **ssl** folder. * :file:`C:\\Program Files (x86)\\ssl` on Windows; * :file:`/opt/wapt/ssl` on Linux and macOS. Re-signing packages in the repositories ======================================= WAPT packages hosted on the repositories were signed using the former private key, so you **MUST** re-sign every package of the repository using the new key: * :ref:`Using the WAPT Console `, or * :ref:`Using the command line `. ****************************** My private key has been stolen ****************************** .. attention:: **WAPT security relies on protecting your private keys.** WAPT does not handle key revocation yet using a :abbr:`CRL (Certificate Revocation List)`. The solution consists in deleting every :mimetype:`.crt` certificate associated to the stolen private key, located in the **ssl** folder: * :file:`C:\\Program Files (x86)\\ssl` on Windows; * :file:`/opt/wapt/ssl` on Linux and macOS. That operation can be done using a GPO, manually, with a WAPT package or with an Ansible role (not documented). Finally, you will have to follow the same steps as for :ref:`the loss of your private key `. .. _my_bios_uuid_bugs: ***************** My BIOS UUID bugs ***************** * Some problems happen sometimes with some BIOSes. WAPT uses the :term:`UUID` of the host as the host identifier. * The :term:`UUID` is supposed to be unique. Unfortunately, for some :abbr:`OEMs (Original Equipment Manufacturers)` and some manufacturing batches, BIOS :term:`UUID` are identical. * The host will register in the WAPT Console but it will replace an existing device, considering that the host has only changed its name. Solving the BIOS UUID issue =========================== WAPT allows to generate a random :term:`UUID` to replace the one retrieved from the BIOS. .. code-block:: bash wapt-get generate-uuid The WAPT Agent :abbr:`FQDN (Fully Qualified Domain Name)` may be used instead of the :abbr:`UUID (Universal Unique IDentifier)`. In the :file:`wapt-get.ini` configuration file, define in the :guilabel:`[global]` section: .. code-block:: bash use_fqdn_as_uuid = True ************************************* The WAPT Deploy utility does not work ************************************* The the WAPT Deployment utility does not succeed in installing the WAPT agent. Launching the WAPT Deployment utility locally ============================================= Launching the WAPT Deployment utility locally can be a good method for showing errors explicitly. .. attention:: You **MUST** launch the command prompt using a :term:`Local Administrator` account. Example of command to launch: .. code-block:: bash C:\Program Files (x86)\wapt\waptdeploy.exe --hash=2a9971aad083d6822b6e4d1ccfb9886be9429ec58bb13246810ff3d6a56ce887 --minversion=2.1.0.10550 --wait=15 --waptsetupurl=https://srvwapt.mydomain.lan/wapt/waptagent.exe In our case the hash for the WAPT Deploy utility is not correct. .. figure:: wapt-resources/wapt_deploy_hash-error_text-terminal-window.png :align: center :alt: Error with the WAPT Deploy utility hash in a text terminal window Error with the WAPT Deploy utility hash in a text terminal window The WAPT Deploy utility works manually but does not work with GPO ----------------------------------------------------------------- Check that port 8088 is listening correctly on the host: .. code-block:: bash gpresult /h gpo.html & gpo.html To force the application of the GPO: .. code-block:: bash gpupdate /force If the WAPT Deployment utility does not show up you will have to double check the GPO settings: * You may be using an old WAPT Deployment utility version, then :download:`download the latest version ` of the WAPT Deployment utility from the WAPT Server web page. * Thanks to Emmanuel EUGENE from French public research institution `INSERM `_ who submitted this possible cause for the WAPT Deployment utility not functioning properly, if you are replicating domain controllers, ensure that the GPOs are correctly synchronized between your DCs and that :abbr:`ACLs (Access Control Lists)` are identically applied on the :file:`Sysvol` directories. ************************************************************** Windows does not wait for the network to be running on startup ************************************************************** By default Windows does not wait for the network to be up at computer startup. This can cause problems during the WAPT Deployment utility execution because the WAPT Deployment utility requires network connectivity to retrieve the new WAPT Agent. There are **2** solutions: 1. We recommend adding :file:`waptdeploy.exe` to the startup and shutdown scripts :ref:`on the GPO `. 2. You can enable the GPO: **Always wait for the network at computer startup and logon** with :menuselection:`Computer Configuration --> Administrative Templates --> System --> Logon --> Always wait for the network at computer startup and logon` .. figure:: wapt-resources/wapt_deploy_gpo-wait-network_browser-window.png :align: center :alt: GPO to wait network startup GPO to wait network startup ************************************* The WAPT Exit utility will not launch ************************************* Despite the script actually being registered in the local security shutdown strategy, the :program:`waptexit` script does not launch at computer shutdown. Hybrid shutdown =============== Windows 10 hybrid shutdown **MUST** be disabled because it causes many problems and strange behaviors, disabling Hybrid Shutdown will restore the WAPT Exit script execution at shutdown. Hybrid shutdown can be disabled by setting a value in :file:`wapt-get.ini` file :ref:`of the WAPT Agent `. It is possible to set this value when :ref:`creating the WAPT Agent `. A WAPT package exists to solve the Hybrid Shutdown problem: `tis-disable-hybrid-shutdown `_. Windows Home edition ==================== Local security policies are not available when using a Windows Home edition computer, so it is normal that the script will not launch. The workaround consists in using a scheduled task that will launch :file:`C:\\Program Files (x86)\\wapt\\wapt-get.exe` with the argument :code:`upgrade`. Corrupted local GPO =================== It sometimes happens that local security policies on a computer are corrupted. One of the possible solutions is to: * Remove local security strategies by deleting the file :file:`C:\\Windows\\System32\\GroupPolicy\\gpt.ini`; * Restart the computer; * Re-install the shutdown scheduled tasks with: .. code-block:: bash wapt-get add-upgrade-shutdown If the problem occurs again, this may mean that another application also manipulates the local GPO. ********************************************************************************************* The WAPT Exit utility halts after 15 minutes and does not finish installing the WAPT packages ********************************************************************************************* By default, Windows shutdown scripts are only allowed to run for 15 minutes. If a script has not finished before that limit, Windows will interrupt the script. To solve that problem, increase the :code:`pre_shutdown_timeout` value and the :code:`max_gpo_script_wait` value in the :file:`wapt-get.ini` file of the WAPT Agent. Define :ref:`these values ` to change the default behavior. .. code-block:: ini max_gpo_script_wait = 360 pre_shutdown_timeout = 360 The WAPT package `tis-wapt-conf-policy `_ sets this configuration. The other solution may be to use the GPO :file:`File.ini`. .. figure:: wapt-resources/wapt_deploy_gpo-ini-file_dialog-box.png :align: center :alt: Using a GPO ini File to configured the script execution delay Using a GPO ini File to configured the script execution delay .. _msg_error_open: ******************************************* Error message when opening the WAPT Console ******************************************* Version check ============= .. image:: wapt-resources/wapt_console_version-error_dialog-box.png :align: center :alt: Window showing that the WAPT Console version is out of date The WAPT Console version is not the same as the version of the WAPT Server. Upgrading the WAPT Console to the same version of the WAPT Server is the recommanded course of action. Connection refused ================== The WAPT Console can not contact the WAPT Server on port 443: * Check whether the :program:`Nginx` web service is running on the WAPT Server. .. code-block:: bash systemctl status nginx * If :program:`Nginx` is not running, restart the :program:`Nginx` service. .. code-block:: bash systemctl restart nginx * If :program:`Nginx` still does not start, you will need to analyze the journal logs in: * :file:`/var/log/nginx/` on Linux; * :file:`C:\\Program Files (x86)\\wapt\\waptserver\\nginx\\logs` on Windows. Service unavailable =================== It is possible that the WAPT Server service is stopped: * Check whether :program:`waptserver` is running. .. code-block:: bash systemctl status waptserver * If the command returns an error, then start the :program:`waptserver`. .. code-block:: bash systemctl start waptserver Error connecting with SSL ... verify failed =========================================== The WAPT Console seems not to be able to verify the WAPT Server's HTTPS certificate. .. attention:: Before doing anything, be sure that your are not facing a :abbr:`MITM (Man in the Middle)` attack! .. note:: If you have just rebuilt your WAPT Server and that you use a self-signed certificate, you can recover the old keys of your old WAPT Server in :file:`/opt/wapt/waptserver/apache/ssl`. * Close your WAPT Console. * Delete the folder :file:`%appdata%\\..\\Local\\waptconsole`. * Launch the command :code:`wapt-get enable-check-certificate`. * Be sure that the previous command has gone well. * Restart the WAPT service with :code:`net stop waptservice && net start waptservice`. * Restart the WAPT Console. In case you do not use the certificate pinning method, this tells you that the certificate sent by the WAPT Server can not be verified with the python :program:`certifi` bundle of certificates. Be sure to have the full chain of certificates on the WAPT Server. I can't do anything in the WAPT Console, everything is greyed ============================================================= The WAPT Console seems locked, you can not execute any action, everything is greyed. If you are connected with another user than the *Superadmin*, the ACL rules applied to your profile may not be set properly. To fix this, close the WAPT Console and open it with the *Superadmin* account. Then, go to :menuselection:`Tools --> Manage Wapt users and rights`. Here, you will see the user in the list, give the user the appropriate permissions, then save and close the WAPT Console. Re-open the WAPT Console using your login. .. _msg_error_package: *********************************************** Error message about package on the WAPT Console *********************************************** Error when uploading package ============================ .. figure:: wapt-resources/wapt_error_trusted_signer_certificate.png :align: center :alt: Window showing that the uploaded package has signer certificate issue Window showing that the uploaded package has signer certificate issue The WAPT Console shows this error : :code:`Error when uploading package : EWaptForbidden('Host matching package UUID_HOST does not trusted signer certificate)`. You have this error when you try to upload a WAPT package but the used certificate which signed package is not present in your computer's ssl WAPT install location folder. Be reminded, if you have a WAPT Server running on Windows to **not lauch the WAPT Console on the server**. Add the WAPT certificate which signed the package in your computer's ssl WAPT install location folder then retry. Error locale ============ .. figure:: wapt-resources/wapt_console_local-error-dialog-box.png :align: center :alt: Window showing that the WAPT Console does not find a package Window showing that the WAPT Console does not find a package The WAPT Console shows this error in two situations. Package does not exist in the repository anymore, yet a host needs it --------------------------------------------------------------------- There are two possible solutions: * Try to get package anew from Tranquil IT's store. * Delete the package from the host dependencies. When you try to install a package with a locale that is unknown to the host --------------------------------------------------------------------------- There are two possible solutions: * Download the WAPT package having the matching locale from Tranquil IT's store. * Edit your WAPT package and set in the :file:`control` file the option :code:`locale` with the correct locale (:code:`locale=en,fr`). ****************************************** Problems with registering a host with WAPT ****************************************** If you do a :command:`wapt-get register` and it returns: .. code-block:: bash FATAL ERROR : ConnectionError: HTTPSConnectionPool(host='XXX.XXX.XXX.XXX', port=443): Max retries exceeded with url: /add_host You need to check that the 443 port is correctly forwarded to the WAPT Server and not blocked by a firewall. .. _error_run_check_cert: *********************************************** Problems when enabling enable-check-certificate *********************************************** Message "Certificate CN ### sent by the WAPT Server does not match URL host ###" ================================================================================ This means that the :abbr:`CN (Common Name)` in the certificate sent by the WAPT Server does not match the value of the :code:`wapt_server` attribute in the :file:`wapt-get.ini` file of the WAPT Agent. * There are **2** solutions: 1. Check the value of :code:`wapt_server` in the :file:`wapt-get.ini` file of the WAPT Agent. If the value is correct, this surely means that an error has happened during the generation of the self-signed certificate during the WAPT Server post-configuration (typing error, ...). You **MUST** then regenerate your self-signed certificates. 2. On the WAPT Server, delete the content of the :file:`/opt/wapt/waptserver/apache/ssl/` folder. Then, relaunch the post-configuration script (the same as the one used during initial installation, with the same arguments and values). Then, be sure that the value of *FQDN for the WAPT Server* is correct. * You may now retry :command:`enable-check-certificate`. ************************************* Problems when creating a WAPT package ************************************* Problems with access rights and PyScripter ========================================== When trying to install a package from :program:`PyScripter`, if the following message appears: .. image:: wapt-resources/windows_pyscripter_read-only-install-package_dialog-box.png :align: center :alt: OperationnalError: attempt to write a read-only database Launch :program:`PyScripter` using a :term:`Local Administrator` account and redo the desired action. .. _package_too_big: The WAPT package is too big and I can not upload it on the repository ===================================================================== When a package is too big, it is necessary to build the WAPT package locally then to upload it with :program:`WinSCP` or an equivalent utility. * Build the WAPT package with :program:`PyScripter` or manually :ref:`build the package `. .. hint:: The WAPT package in :file:`C:\\waptdev`. * Download and install :program:`WinSCP` * Using :program:`WinSCP`, upload the WAPT package in the correct :ref:`repository location ` according to the version of the WAPT repository. * Once the upload has finished, recreate the :file:`Packages` index file on the WAPT repository using the following command and remplacing **repository** by the :ref:`repository location ` according to the version of the WAPT repository. .. code-block:: bash wapt-scanpackages repository Access violation error while re-signing a WAPT package ====================================================== .. image:: wapt-resources/wapt_console_package-resign-error_screen-item.png :align: center :alt: Signature processing has not ended successfully If the **Access violation** error appear, it may mean that the WAPT package is too big. Manually edit the package and visit :ref:`this procedure for signing large WAPT packages `. WAPT package in error ===================== .. _common_problems_installing_a_package: Problem installing a WAPT package --------------------------------- I have a WAPT package that returns in error and the software is not installed on the computer when I physically go to check on the computer. Explanation ^^^^^^^^^^^ An error has occurred during the execution of the :file:`setup.py`. You can read and analyze error messages returned in the WAPT Console and try to understand and solve them. The installation of the package will be retried at each :command:`upgrade` cycle until the package does not return an error. Solution ^^^^^^^^ * If WAPT returns an error code, research the error code on the Internet. Example for a MSI: *1618*: another installation in already running. Restarting the computer should solve the problem. .. note:: MSI error codes are available by visiting `this website `_. * Go to the computer and try to install the package with the WAPT command line utility. Then check that the software has installed. .. attention:: Once the silent installation has finished, do nothing else. The objective is to reproduce the behavior of the WAPT Agent. * If the package installs silently in user context, this may mean that the software installer does not work in *SYSTEM* context. * If it is still not working, launch the installation manually. It is possible for an error to appear explicitly describing the problem (ex: missing dependency, etc). * It is possible that the installer does not support installing over an older version of the software, so you will have to explicitly remove older versions of the application before installing the new one. Error "timed out after seconds with output '600.0'" --------------------------------------------------- Some packages return the following error in the WAPT Console: .. code-block:: bash "Error timed out after seconds with output '600.0'" Explanation ^^^^^^^^^^^ By default, when installing a WAPT package embedding a :command:`run` and a :command:`install_msi_if_needed` command, WAPT will wait 600 seconds for the installer to finish its task. If the installer has not finished in this delay, WAPT will stop the running installation. Solution ^^^^^^^^ If the software to be installed is known to be big (Microsoft Office, Solidworks, LibreOffice, Katia, Adobe Creative Suite), it is possible that the 600 second delay will be too short. You will have to increase the timeout value, ex: :code:`timeout` = ``1200``. .. code-block:: bash run('"setup.exe" /adminfile office2010noreboot.MSP', timeout = 1200) Error "has been installed but the uninstall key can not be found" ----------------------------------------------------------------- Some WAPT packages return the following error in the WAPT Console: .. code-block:: bash XXX has been installed but the uninstall key can not be found. Explanation ^^^^^^^^^^^ WAPT relies on Windows to install :mimetype:`.msi` binaries with :code:`install_msi_if_needed` and :mimetype:`.exe` binaries with :command:`install_exe_if_needed`. By default, WAPT accepts return codes *0* (OK) and *3010* (computer restart required) and it verifies that the *uninstall key* is present. Unfortunately, we can not fully trust these return codes, so WAPT does additional checks after completing the installation to make sure that all has gone well: * It checks the presence of the *uninstall key* on the host. * It checks that the version number of the software is equal or greater than the version number in the :file:`control` file. * If this is not the case, it infers that the software may not be present on the host. The function returns the WAPT package in error. The installation will be retried at every *upgrade* cycle until the WAPT package returns no error. Solution ^^^^^^^^ .. attention:: Before doing anything, it is advisable to go physically to the computer returning in error and to **manually check whether the software has correctly installed**. If the software has not installed correctly, refer to the :ref:`section of this documentation on installing a package `. * If the software has installed correctly, this may mean that the uninstall key or the software version in the package is not correct. * Retrieve the correct *uninstall key* and make changes to the WAPT package accordingly. * If the error happens when using the :code:`install_msi_if_needed` function, this means that the MSI installer is badly packaged and that it is returning an incorrect *uninstall key*. Error "has been installed and the uninstall key found but version is not good" ------------------------------------------------------------------------------ Some WAPT packages return the following error in the WAPT Console: .. code-block:: bash XXX has been installed and the *uninstall key* found but version is not good. Explanation ^^^^^^^^^^^ When using :code:`install_msi_if_needed` or :code:`install_exe_if_needed` functions, additional checks are performed to make sure that all has gone well. .. attention:: Before doing anything, it is advisable to go physically to the computer returning in error and to **manually check whether the software has correctly installed**. If the software has not installed correctly, refer to the :ref:`section of this documentation on installing a package `. Solution: with ``install_msi_if_needed`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The informations being extracted from the MSI installer, this means that the MSI file does not return correct values or that the *uninstall key* is incorrect. You can check using the Windows Command Line utility. .. code-block:: bash wapt-get list-registry If the returned key is not that which has been entered in the install section of the :file:`setup.py`, it is not possible to use :code:`install_msi_if_needed`. You **MUST** review the install section of your :file:`setup.py`, use the :code:`run()` function and manually manage exceptions. Solution: with ``install_exe_if_needed`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This probably means that the version number entered in the :program:`install_exe_if_needed` function is not correct. Make corrections to the WAPT package accordingly. .. note:: If the :code:`min_version` argument has not been entered, WAPT will try to retrieve the version automatically from the :mimetype:`.exe` installer. You can check the *uninstall key* and the version number using the command: .. code-block:: bash wapt-get list-registry If no version is provided with the :command:`wapt-get list-registry` command, this means that the software installer does not provide an *uninstall key*. There are **2** solutions: * Use the argument :code:`get_version` to provide the path to another :code:`uninstallkey`. .. code-block:: python def install(): def versnaps2(key): return key['name'].replace('NAPS2 ','') install_exe_if_needed('naps2-5.3.3-setup.exe',silentflags='/VERYSILENT',key='NAPS2 (Not Another PDF Scanner 2)_is1',get_version=versnaps2) * Providing an empty value for :code:`min_version` tells WAPT not to check for versions. .. code-block:: ini min_version=' ' .. attention:: With this method, **versions are no longer checked during updates!** *********************************************** Frequent problems caused by Anti-Virus software *********************************************** Some Anti-Virus software falsely raise errors when checking some internal components of WAPT. Among the components is :program:`nssm.exe` used by WAPT as a service manager for starting, stopping and restarting the WAPT service. Below is a list of useful exceptions to declare in your central :abbr:`AV (Anti-Virus)` interface to solve false positives related to WAPT: .. code-block:: ini "C:\Program Files (x86)\wapt\waptservice\win32\nssm.exe" "C:\Program Files (x86)\wapt\waptservice\win64\nssm.exe" "C:\Program Files (x86)\wapt\waptagent.exe" "C:\Program Files (x86)\wapt\waptconsole.exe" "C:\Program Files (x86)\wapt\waptexit.exe" "C:\wapt\waptservice\win32\nssm.exe" "C:\wapt\waptservice\win64\nssm.exe" "C:\wapt\waptagent.exe" "C:\wapt\waptconsole.exe" "C:\wapt\waptexit.exe" "C:\Windows\Temp\waptdeploy.exe" "C:\Windows\Temp\waptagent.exe" "C:\Windows\Temp\is-?????.tmp\waptagent.tmp" .. _error_with_proxy: ********************************************************************** I have an issue with my proxy - THttpClientSocket.SockRecv(1) read = 0 ********************************************************************** If you have this issue: .. figure:: wapt-resources/wapt_console_proxy-error-timeout_dialog-box.png :align: center :alt: Window showing a proxy timeout error in the WAPT Console Window showing a proxy timeout error in the WAPT Console The error comes from a :code:`timeout` option in the :file:`waptconsole.ini`. Indeed, since WAPT 2.1 version, timeout is defined in milliseconds and not in seconds like before. You will need to remove the :code:`timeout` option in the :file:`waptconsole.ini` file located in :file:`%localappdata%\\waptconsole`. *************** Common mistakes *************** How to move my repository to another partition ============================================== For any reason, you may to need move the repository to another partition. Your repository contains **3** folders which can be quite large: * :file:`wapt`; * :file:`wapt-host`; * :file:`waptwua`. .. TABS Linux ----- On Linux, create a mount point on :file:`fstab`. For this example, the second partition is named `part2`. `part2` is an **ext4 formated partition**. Debian and derivatives ^^^^^^^^^^^^^^^^^^^^^^ * Create a temporary folder. .. code-block:: bash mkdir /mnt/tmp * Create a temporary mount point. .. code-block:: bash mount /dev/part2 /mnt/tmp * Move the folders. .. code-block:: bash mv /var/www /mnt/tmp * Unmont the partition. .. code-block:: bash umount /dev/part2 * Edit the :file:`fstab` file. .. code-block:: bash vi /etc/fstab * Add the following line to the :file:`fstab` file. .. code-block:: bash # /dev/part2 /var/www ext4 defaults 0 0 * Mount the partition. .. code-block:: bash mount -a .. hint:: If there is no error, the partition is mounted. * You can check by running. .. code-block:: bash df -h #Result Filesystem 1K-blocks Used Available Use% Mounted on dev/part2 15G 944M 14G 7% /var/www * Remove the temporary folder. .. code-block:: bash rm -rf mnt/tmp RedHat and derivatives ^^^^^^^^^^^^^^^^^^^^^^ * Create a temporary folder for copying the folders. .. code-block:: bash mkdir /mnt/tmp * Create a temporary mount point. .. code-block:: bash mount /dev/part2 /mnt/tmp * Move the folders. .. code-block:: bash mv /var/www/html /mnt/tmp * Unmont the partition. .. code-block:: bash umount /dev/part2 * Edit the :file:`fstab` file. .. code-block:: bash vi /etc/fstab * Add the following line to the :file:`fstab` file. .. code-block:: bash # /dev/part2 /var/www/html ext4 defaults 0 0 * Mount the partition. .. code-block:: bash mount -a .. hint:: If there is no error, the partition is mounted. * You can check by running. .. code-block:: bash df -h #Result Filesystem 1K-blocks Used Available Use% Mounted on dev/part2 15G 944M 14G 7% /var/www * Remove the temporary folder. .. code-block:: bash rm -rf mnt/tmp Windows ------- On Windows, the best method is to :ref:`backup ` and :ref:`restore ` the WAPT Server on the new partition. .. note:: It is possible to install the WAPT Server on another partition than :file:`C:`. Using a network drive to store and deliver WAPT packages ======================================================== The standard way WAPT works is with a secure web server delivering WAPT packages to the WAPT Clients. **Tranquil IT advises against using a network drive for delivering WAPT packages** for several reasons: * A web server is extremely easy to setup, secure, maintain, backup and monitor. * To work correctly, a WAPT package needs to be self-contained. Indeed, we do not know if the network will be available at the time of the installation launch (for example if we have a :program:`waptexit` that starts when the workstation is shutting down on a network with 802.1x user authentication, there will no longer be a network available at the time of installation). The self-contained nature of WAPT makes it more deterministic than other deployment solutions. * Network congestion may result from downloading large packages on large fleets of devices because you have less control over bandwidth rates or you may not be able to finish a partial download. * This method breaks or at least weakens the security framework of WAPT. * This method does not allow you to expose your repositories to Internet for your traveling personnel. .. attention:: Even though WAPT *can work* independently of the transport mode, **Tranquil IT will not officially support using a network drive to store and deliver WAPT packages**. Using the register() function in your audit scripts =================================================== The register() function forces the sending to the WAPT Server of the WAPT Agent's hardware and software inventory. This function is very taxing on the WAPT Server's performance because it forces the WAPT Server to parse a relatively large :abbr:`JSON (Java Script Object Notation)` :abbr:`BLOB (Binary Large OBject)` and to inject the result into the PostgreSQL database. The function is by default triggered manually or when a new WAPT package upgrade is applied. When you use the :code:`register()` function in a WAPT audit script, it will run every time the audit script is triggered so it will load the WAPT Server with no apparent benefit. Therefore, **we do not recommend the use of the :code:`register()` function in audit scripts**. EWaptBadControl: 'utf8' codec can not decode byte ================================================= If you get this message, it may mean that you have not set up correctly your development environment. Visit this :ref:`section of the documentation on setting up UTF-8 (no BOM) `. I have a lot more hosts in the WAPT Console than I have host packages on my Server? =================================================================================== Following a remark from Philippe LEMAIRE from the `Lycée Français Alexandre Yersin `_ in Hanoï, if you use the Enterprise version of WAPT and you make heavy use of the :ref:`unit packages ` or :ref:`profile packages `, you may realize that you will have many more hosts in your WAPT Console than :ref:`host packages ` on you WAPT sSrver. **This is normal**. In fact, WAPT *unit* and *profile* packages are not explicitly assigned to the host (i.e. as dependencies in the *host package*) but are implicitly taken into account by the WAPT Agent dependency engine during the WAPT upgrade. So one might have no *host* package on the WAPT Server if only *unit packages* are used for managing a fleet of devices.