Page 1 of 1

Machine modification problem

Published: April 18, 2024 - 12:47 PM
by Duster
Hello,
We're experiencing a small issue with our Waptserver configuration.

Here's the configuration in question:
Installed on a Windows 10 machine - Enterprise version 2.4.0.14143 - agent deployed via GPO.

We recently attempted an update to version 2.5, but on the first launch, all the machines appeared as "disconnected."
Our technician therefore downgraded by reinstalling version 2.4.0.14143, the most recent version unless I'm mistaken. The computers now connect correctly, but when we try to "edit the machine," the right-hand panel is empty, and it's now impossible to modify the packages assigned to the machine.

Similarly, we have a second problem: when starting the server (which we manually reboot from time to time for OS updates), we sometimes have to manually run `net start waptserver` for the services to start correctly and for the console to connect.

Can you advise us on how to resolve these issues? Do we need to start from scratch? :(

Thank you.

Re: Machine modification problem

Published: April 18, 2024 - 1:00 PM
by sfonteneau
Duster wrote: Apr 18, 2024 - 12:47 We recently attempted an update to version 2.5, but on the first launch, all machines appeared as "disconnected."
Our technician therefore downgraded by reinstalling version 2.4.0.14143
Hello, for this see:

https://www.wapt.fr/fr/doc/wapt-server- ... 2-x-to-2-5

Code: Select all

Le protocole websocket ayant changé entre les versions 2.X et 2.5, les Agents WAPT apparaîtront comme DISCONNECTED jusqu’à ce qu’ils aient été mis à niveau vers la version 2.5.

La tâche de mise à niveau de l’Agent WAPT peut être retardée de 2 heures.
Did you assign the waptupgrade package to the machine and wait the 2 hours as indicated in the documentation?

Re: Machine modification problem

Published: April 22, 2024 - 09:26
by Duster
Good morning,

Thank you for your feedback. Actually, I'm now getting this error when installing the latest version (2.5.4.15342):

Code: Select all

2024-04-22 09:14:40,711 - waptwinsetup - INFO - Installing PostgreSQL as a service managed by itself
2024-04-22 09:14:40,711 - waptwinsetup - INFO - Install postgres database
2024-04-22 09:14:40,711 - waptwinsetup - INFO - About to build database directory
2024-04-22 09:14:40,711 - waptwinsetup - INFO - Stopping waptserver
2024-04-22 09:14:46,618 - waptwinsetup - INFO - Database server data dir already instanciated, doing nothing
2024-04-22 09:14:46,633 - waptwinsetup - INFO - Start postgresql database
2024-04-22 09:14:55,352 - waptwinsetup - INFO - Starting postgresql
2024-04-22 09:15:06,274 - waptwinsetup - INFO - Checking 'wapt' database
2024-04-22 09:15:18,150 - waptwinsetup - INFO - Creating/upgrading wapt db tables
2024-04-22 09:15:28,665 - waptwinsetup - CRITICAL - Traceback (most recent call last):
  File "c:\wapt\waptserver\winsetup.py", line 624, in <module>
    install_postgresql_service(options, conf)
  File "c:\wapt\waptserver\winsetup.py", line 402, in install_postgresql_service
    run(r'"%s\waptpython.exe" "%s\waptserver\model.py" init_db -c "%s"' % (wapt_root_dir, wapt_root_dir, options.configfile))
  File "c:\wapt\waptutils.py", line 2176, in run
    raise CalledProcessErrorOutput(proc.returncode, cmd, ''.join(output))
waptutils.CalledProcessErrorOutput: Command '"c:\\wapt\\waptpython.exe" "c:\\wapt\\waptserver\\model.py" init_db -c "c:\\wapt\\conf\\waptserver.ini"' returned non-zero exit status 1.
Output:initializing missing wapt tables without dropping data.

Traceback (most recent call last):

  File "c:\wapt\lib\site-packages\peewee.py", line 3144, in execute_sql

    cursor.execute(sql, params or ())

psycopg2.errors.UndefinedFunction: ERREUR:  la fonction string_to_array(character varying[], unknown) n'existe pas

LINE 1: ...kages ALTER COLUMN target_os TYPE varchar[] USING string_to_...

                                                             ^

HINT:  Aucune fonction ne correspond au nom donnÚ et aux types d'arguments.

Vous devez ajouter des conversions explicites de type.





During handling of the above exception, another exception occurred:



Traceback (most recent call last):

  File "c:\wapt\waptserver\model.py", line 2907, in <module>

    init_db(False,server_config=conf)

  File "c:\wapt\waptserver\model.py", line 2191, in init_db

    upgrade_db_structure(server_config=server_config)

  File "c:\wapt\waptserver\model.py", line 2680, in upgrade_db_structure

    wapt_db.execute_sql("ALTER TABLE packages ALTER COLUMN target_os TYPE varchar[] USING string_to_array(target_os,',');")

  File "c:\wapt\lib\site-packages\peewee.py", line 3151, in execute_sql

    self.commit()

  File "c:\wapt\lib\site-packages\peewee.py", line 2917, in __exit__

    reraise(new_type, new_type(exc_value, *exc_args), traceback)

  File "c:\wapt\lib\site-packages\peewee.py", line 190, in reraise

    raise value.with_traceback(tb)

  File "c:\wapt\lib\site-packages\peewee.py", line 3144, in execute_sql

    cursor.execute(sql, params or ())

peewee.ProgrammingError: ERREUR:  la fonction string_to_array(character varying[], unknown) n'existe pas

LINE 1: ...kages ALTER COLUMN target_os TYPE varchar[] USING string_to_...

                                                             ^

HINT:  Aucune fonction ne correspond au nom donnÚ et aux types d'arguments.

Vous devez ajouter des conversions explicites de type.






Re: Machine modification problem

Published: April 23, 2024 - 09:16
by dcardon
Hi Arnaud,

the problem is quite strange because it was fixed a while ago... When you reverted to version 2.4, did you reinstall 2.4 over 2.5 or did you restore a machine snapshot?

Regards,

Denis

Re: Machine modification problem

Published: April 23, 2024 - 09:59
by Duster
Hello,

thank you for the feedback. A reinstall of version 2.4 was performed.