SnapinClient Unknown Module ID passed to server.
-
Could you open a browser tab and go to the address: [url]http://172.29.0.1/fog/service/servicemodule-active.php?mac=XX:XX:XX:XX:XX&moduleid=snapin[/url] (Insert a valid mac address) and paste the output here (you can filter out any sensitive data)
-
LOL - I’m not a PHP guy, so I would not even begin to know where to troubleshoot.
[COLOR=#000000][CODE]#!um[/CODE][/COLOR][COLOR=#000000]in servicemodule-active.php:[/COLOR]
[CODE] // Get the true module ID for comparing what the host has.
$moduleID = current($FOGCore->getClass(‘ModuleManager’)->find(array(‘shortName’ => $_REQUEST[‘moduleid’])));
// get the module id
if (empty($_REQUEST[‘moduleid’]) || !$moduleID || !$moduleID->isValid())
throw new Exception(‘#!um’);
// Associate the moduleid param with the global name.
$moduleName = array(
‘dircleanup’ => $FOGCore->getSetting(‘FOG_SERVICE_DIRECTORYCLEANER_ENABLED’),
‘usercleanup’ => $FOGCore->getSetting(‘FOG_SERVICE_USERCLEANUP_ENABLED’),
‘displaymanager’ => $FOGCore->getSetting(‘FOG_SERVICE_DISPLAYMANAGER_ENABLED’),
‘autologout’ => $FOGCore->getSetting(‘FOG_SERVICE_AUTOLOGOFF_ENABLED’),
‘greenfog’ => $FOGCore->getSetting(‘FOG_SERVICE_GREENFOG_ENABLED’),
‘hostnamechanger’ => $FOGCore->getSetting(‘FOG_SERVICE_HOSTNAMECHANGER_ENABLED’),
‘snapin’ => $FOGCore->getSetting(‘FOG_SERVICE_SNAPIN_ENABLED’),
‘clientupdater’ => $FOGCore->getSetting(‘FOG_SERVICE_CLIENTUPDATER_ENABLED’),
‘hostregister’ => $FOGCore->getSetting(‘FOG_SERVICE_HOSTREGISTER_ENABLED’),
‘printermanager’ => $FOGCore->getSetting(‘FOG_SERVICE_PRINTERMANAGER_ENABLED’),
‘taskreboot’ => $FOGCore->getSetting(‘FOG_SERVICE_TASKREBOOT_ENABLED’),
‘usertracker’ => $FOGCore->getSetting(‘FOG_SERVICE_USERTRACKER_ENABLED’),
[/CODE]Maybe something is wrong with my $FOGCore?
-
Anyone else having the same issue ?
-
Does the snapin module exist in the database?
-
Yes, - name: Spapins, short_name: snapinclient.
I have updated to SVN 2325 and it has taken care of the problem. However it also broke the host search. When searching for hosts - always comes up with 0 results. Everything else seems stable.
Group search, image search is working correctly.
Apache LOG:
172.24.5.22 - - [23/Sep/2014:13:24:41 +0900] “POST /fog/management/index.php?node=host&sub=search HTTP/1.1” 200 821 “[url]http://172.29.0.11/fog/management/index.php?node=host[/url]” “Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36”
-
Make sure the hosts table is okay in MySQL with [code] REPAIR TABLE hosts[/code]. Also try clearing cache to see if all is still okay.
-
Hi, I falled into the same issue.
I found a mismatch in servicemodule-active.php, db and snapin exe.
The snapin exe asks for the “snapin” module.
The “module” db table has “snapinclient” short name.
The servicemodule-active.php script check the “snapin” module.
I workarounded (< is mine) the script (awful) because I don’t want to change the db or the snapin exe.13,15d12
< if (($_REQUEST[‘moduleid’]==“snapin”)) {$_REQUEST[‘moduleid’]=“snapinclient”;}
<
29c26
< ‘snapinclient’ => $FOGCore->getSetting(‘FOG_SERVICE_SNAPIN_ENABLED’),'snapin' => $FOGCore->getSetting('FOG_SERVICE_SNAPIN_ENABLED'),
(works)
-
What version of FOG are you using?
-
I’m attempting a new thought process on how to tell if the module is correct or not.
2443 should correct for this, but I don’t know. If you’re willing to try it please do.
Thank you,
-
Sorry to reply so late now … the problem with the later version of FOG - as I painfully discovered - is that they have difficult time to migrate the schema. The schema said it “migrated successfully” but not in actuality.
I ended up using PHPmyadmin to manually export the hosts, change a few table names, export the mac addresses, match them up with host IDs, etc. etc. etc. … painful process, but once the correct fields were entered, the whole thing was smooth !