Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

WOL ne fonctionne pas (OCS 2.3) LINUX/UNIX / Wake On Lan not Working

Bonjour à tous, [English version at the end]  (DESOLE POUR LE PAVE, J'AI ESSAYE D'ETRE PRECIS :-) )

J'ai une installation d'OCS serveur avec des clients, tout fonctionne correctement excepté le Wake On Lan.

  • PHP Version :5.6.30 (apache2handler)
  • Web Server :Apache/2.4.25 (FreeBSD) PHP/5.6.30 mod_perl/2.0.10 Perl/v5.24.1
  • Database Server :Source distribution version 5.7.17-log
  • Version OCSReports:2.3

Même sous réseau pour le serveur et le client à réveiller.

 Après avoir testé avec WakeOnLANGUI.exe, je reçois bien mes trames sur ma machine distante (via WAKEONLANMONITOR.exe).

Lorsque je vais sur la page de ma machine en question (Je vérifie MAC + IP, c'est OK) et que je clique sur WOL, j'ai bien la fenêtre de confirmation, je valide  et j'ai le message : Wake On Lan order sent=>EC:F4:BB:14:61:3B/192.168.2.90

Sauf que je ne reçois rien sur mon monitor et n'ai rien dans les logs.

(A savoir qu'au début j'avais une erreur dû à l'oubli d'installation de la lib Socket de PHP).

J'ai recherché sur le forum OCS et ai trouvé ceci : https://ask.ocsinventory-ng.org/5459/wol-ne-fonctionne-pas-ocs-server-windows-2-1-2?show=5459#q5459

Mais cela ne résout pas mon problème. Lorsque j'applique la méthode, j'ai l'erreur suivante :

PHP Warning:  Missing argument 2 for Wol::wake(), called in /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/ms_computer/ms_computer.php on line 72 and defined in /usr/share/ocsinventory-reports/ocsreports/require/function_wol.php on line 59, referer: http://srv-ocs/ocsreports/index.php?function=computer&head=1&systemid=4
[Tue Mar 07 09:09:44.191380 2017] [:error] [pid 2041] [client 192.168.2.90:61289] PHP Warning:  socket_sendto(): Host lookup failed [-10003]: Unknown server error in /usr/share/ocsinventory-reports/ocsreports/require/function_wol.php on line 92, referer: http://srv-ocs/ocsreports/index.php?function=computer&head=1&systemid=4


J'ai tenté de modifié le fichier "function_wol.php" ainsi :

socket_sendto($s, $this->pacquet($mac), strlen($this->pacquet($mac)), 0, "255.255.255.255", $v);

est devenu :

socket_sendto($s, $this->pacquet($mac), strlen($this->pacquet($mac)), 0, "192.168.2.90", $v);

Et lorsque j'ai testé, j'ai bien reçu les trames sur mon client (vu avec le monitor).

Niveau développement PHP, je suis un peu "limité" mais j'ai tenté d'appeler une variable de l'adresse IP récupérée dans le fichier ms_computer.php, mais cela ne fonctionne pas.

Ma question est : y-a t'il quelqu'un qui puisse me dire comment appeler la variable de l'adresse IP pour l'appliquer ainsi :

socket_sendto($s, $this->pacquet($mac), strlen($this->pacquet($mac)), 0, $ip, $v);

?

Je vous remercie.

Bonne journée.


English Version :

I have a working installation of OCS 2.3 and my Wake on lan is not working.

My problem is  in the "function_wol.php", when i set :

socket_sendto($s, $this->pacquet($mac), strlen($this->pacquet($mac)), 0, "255.255.255.255", $v);

The WOL is notworking (no log output)

But when i set :

socket_sendto($s, $this->pacquet($mac), strlen($this->pacquet($mac)), 0, "192.168.2.90", $v);

I correctly receive the WOL frame.

Is anyone could say me how can i retrieve the IP variable of  "ms_computer.php" to put it into my "function_wol.php" like :

socket_sendto($s, $this->pacquet($mac), strlen($this->pacquet($mac)), 0, $ip, $v);

Thanks in advance.

Have a good day.

Aurélien.

in OCS Inventory NG server for Unix by (160 points)
edited by

2 Answers

0 votes
Hi,

did u found a solution for this problem? - I have the same issues with WOL..
by (210 points)
0 votes
Hello,

Sorry, still no solution.
by (160 points)
 
Powered by Question2Answer
...