OCS Inventory NG Forums

OCS Inventory NG, an OpenSource computer inventory and package deployement system for Windows and Unix

You are not logged in.

#1 2008-01-21 21:43:47

Gabriel G
New member
Registered: 2008-01-21
Posts: 2

Cannot transmit inventory. Response Code: 500

Hi,

        I've just install a OCS Inventory management on a Windows XP machine.  We already have a inventory soft for our PCS.  Working just fine...everything being inventoried into a SQL DB. 
We were searching for a inventory soft for our MAC OS X machines. We could have done it with remote desktop and import the infos but we wanted something that could be run by an agent that we could deploy.  Think we found that with OCS We are in a test tryouts. Works fine for our Windows PCs but we don't need it for them anyway, maybe for our Linux box PC. 

Now for our MACS not so good.

       By running in TERMINAL sudo /usr/local/sbin/ocs_mac_agent.php

       First try was on a Leopard Powerbook G4  didn't worked....something with SPApplicationDataType not parse in XML.

       Went on to X.4 test machines to see if the problem was only with the X.5 machine...

       Next one a Mac OS X.4 Server....everything went without any problems.
       Next one a Mac OS X.4 iBook....everything OK again.

       Now a X.3 test machine...

       On a Mac OS X.3 iBook....problems with SPSerialATADataType....error and program stopped.

           I've commented the "$this->_doDrivesAndStorages() and $this->_doControllers();  in the OCS_mac_agent.php  and it pass thru and got inventoried but without the controllers and hard drive infos. Good infos to have but we could go without it.
      Returning on my Leopard Powerbook G4 one....I've commented the "$this->_doSoftwares();" which was stopping the program. We don't need that info anyway Hoping that it will pass thru and at least give me the rest....but nope...at the end it's giving me "Cannot transmit inventory.  Response Code: 500"   ? NOW WHAT?  any idea.

     Has someone running it on a Leopard yet?  Is it on that piece of material specifically or what?    Any ideas welcome.

Offline

#2 2008-01-23 22:17:41

knowtown
New member
Registered: 2007-12-11
Posts: 8

Re: Cannot transmit inventory. Response Code: 500

I am getting the same error: "Cannot transmit inventory.  Response Code: 500" on an OS X.4 server. No problems at all on an Intel iMac or PPC iBook running 10.4.x though. We are not running any Leopard machines yet. I am not sure where to look for the problem on this server but I am more than willing to get info from the box if it will be helpful in troubleshooting.

Offline

#3 2008-01-28 00:11:52

saxjazman9
Member
Registered: 2007-11-25
Posts: 23

Re: Cannot transmit inventory. Response Code: 500

I get teh same error on 10.5. The apache logs complain about: "not well-formed (invalid token) at line 1063. Looks like XML::Parser (line 187) doesn't like the XML leopards version of PHP spits out.

Offline

#4 2008-01-28 00:16:38

saxjazman9
Member
Registered: 2007-11-25
Posts: 23

Re: Cannot transmit inventory. Response Code: 500

...and I verified that it works FINE in Tiger. It's gatta be the php+xml generation that's throwing it off.

Offline

#5 2008-01-28 00:27:09

saxjazman9
Member
Registered: 2007-11-25
Posts: 23

Re: Cannot transmit inventory. Response Code: 500

Looks like it's just a name change with the "parallel scsi" devices. I bet if you went into those functions and translated the output on the way back from the system profiler, you'd be OK.

Offline

#6 2008-01-31 15:45:55

martinfe
New member
Registered: 2008-01-31
Posts: 8

Re: Cannot transmit inventory. Response Code: 500

Same Problem with Leopard. Dont know how to fix it.

Please help.

Offline

#7 2008-02-01 14:30:33

gebura
Member
Registered: 2007-12-06
Posts: 10

Re: Cannot transmit inventory. Response Code: 500

Hi

I've got the same problem.

I found a way to have it running. It is not very clean but it work.

You should activate "remote access" (ssh) on system preferences > shares.

Next open a term and type:

ssh 127.0.0.1
sudo /usr/local/sbin/ocs_mac_agent.php
[Type your password here]


I 'm not sure but it must be a problem with env var witch can be different if you just open a term on the desktop or use a remote connection.
If you want investigate more, you could see it with "set" command or "set | less " for the human readable version

I'll try to do a diff of the output of this command or investigate a bit more when i'll find time for smile

Feel free to contact me at gebura AT evilkittens DOT org

Regards,
Mathieu Goessens

Last edited by gebura (2008-02-01 16:47:01)

Offline

#8 2008-02-01 14:39:28

martinfe
New member
Registered: 2008-01-31
Posts: 8

Re: Cannot transmit inventory. Response Code: 500

Yeahhh this Works!!!!!!
Thanks gebura!!!!

Anyone knows how to automate this for getting work without doing manually???

any other fix too???

Thanks again gebura good work.

Offline

#9 2008-02-01 15:08:51

gebura
Member
Registered: 2007-12-06
Posts: 10

Re: Cannot transmit inventory. Response Code: 500

I'm happy if that helped you.

I don't understand why but it don't work on all macs that i tested. sad
('ll try to check what is different on those macs)
Edit: It doesn't work on macpro G5 (and maybe also G4 etc )

Please note that if you activate remote access, you or others users may be able to do remote login on your mac.
That must be important if you have a security policy and/or if you password is empty.
( So the better way, must be to unactivate it after informations was send )

(sorry for my poor english !)

Edit: I think Remote access can be activated / unactivated automaticaly with a short script shell. Any mac guru here can tell us how ? big_smile

Bye,
Mathieu Goessens

Last edited by gebura (2008-02-01 16:17:45)

Offline

#10 2008-02-01 19:19:09

Gabriel G
New member
Registered: 2008-01-21
Posts: 2

Re: Cannot transmit inventory. Response Code: 500

Well it is not working for me on a Powerbook G4 with mac os x.5.1   

Still got the error 500 at the end and no inventory

Offline

#11 2008-02-04 09:00:29

gebura
Member
Registered: 2007-12-06
Posts: 10

Re: Cannot transmit inventory. Response Code: 500

Hi

Asked a mac guru and he tell me that:
sudo service ssh start
sudo service ssh stop
can be used instead of using graphical interface.

Edit:
I must be possible to make a short script like (not tested):

#!/bin/sh
sudo service ssh start
ssh 127.0.0.1 sudo /usr/local/sbin/ocs_mac_agent.php
sudo service ssh stop

I should be possible to automate entire process, for that you have to
1) download the .dmg (with wget)
2) mount the .dmg (with mount ?)
3) launch the installer (don't know how, it must be great if there is a kind of quiet installation)

If somebody has some time to loose...

Don't have any idea about a G5/G4 hack.

Regards,
Mathieu Goessens

Last edited by gebura (2008-02-04 16:25:06)

Offline

#12 2008-02-04 17:00:23

knowtown
New member
Registered: 2007-12-11
Posts: 8

Re: Cannot transmit inventory. Response Code: 500

Great work gebura! I am glad to see that there is progress being made with this error. Unfortunately for me, however, this is still not working on an OS X.4.x server.  I am getting the same error: "Cannot transmit inventory.  Response Code: 500"

Offline

#13 2008-02-27 14:30:54

felimwhiteley
Member
From: Lyon, France
Registered: 2008-02-04
Posts: 19
Website

Re: Cannot transmit inventory. Response Code: 500

I get a bug in the local import(from apache):
DBD::mysql::db do failed: Unknown column 'N' in 'field list'
at /usr/local/share/perl/5.8.8/Apache/Ocsinventory/Server/Inventory.pm line 167.

This is the line in question:
$dbh->do("UPDATE hardware SET USERAGENT=".$dbh->quote($ua).",

Alas I don't know how to fix it, but I've also spotted an issue I get on all versions of OS X.

The bit of code causing the problem was it not finding
the 'SPSerialATADataType' section in the system_profiler data dump. So not
being a PHP developer I tried the following code tweak and it works now. I
can import into OCS no problem, well except the above error on a Xserve RackServe.

if (!$result && $in_required && $in_required!='SPSerialATADataType') {
            $this->message("Could not find $in_nodeName in system_profiler
XML.  Corrupted output?", 'error');
            die();

Gabriel G maybe this can give your storage info you are missing.

Last edited by felimwhiteley (2008-02-27 14:32:19)

Offline

#14 2008-03-13 15:05:30

Darkomen
New member
Registered: 2008-03-11
Posts: 2

Re: Cannot transmit inventory. Response Code: 500

Where did you type it ? In the Mac Agent ? Line number ?

if (!$result && $in_required && $in_required!='SPSerialATADataType') {
            $this->message("Could not find $in_nodeName in system_profiler
XML.  Corrupted output?", 'error');
            die();

Offline

#15 2008-03-24 19:34:18

Manuel Collazo
New member
Registered: 2008-03-24
Posts: 3

Re: Cannot transmit inventory. Response Code: 500

Getting an error under Mac OS X 10.5.2 Leopard.  The script runs and I end up with [ ERROR ] Could not find SPApplicationsDataType in system_profiler XML.  Corrupted output?

It appears that the System Profiler is not returning a column that the agent is looking for.  Any work arounds or release of a new package is appreciated.

Thanks

Offline

#16 2008-03-26 17:21:03

themroc
Member
From: Bruxelles
Registered: 2007-11-20
Posts: 17
Website

Re: Cannot transmit inventory. Response Code: 500

Same error with quite some OS 10.5 Leopard. The environment variable LC_CTYPE seems to raise the problem. So another workaround is following :

unset LC_CTYPE
sudo /usr/local/sbin/ocs_mac_agent.php

Offline

#17 2008-03-26 17:33:49

Manuel Collazo
New member
Registered: 2008-03-24
Posts: 3

Re: Cannot transmit inventory. Response Code: 500

</array>
</plist>[ ERROR ] Could not find SPApplicationsDataType in system_profiler XML.  Corrupted output?

Still the same error occurs after the run completes.  These are the last lines of the output.

Offline

#18 2008-03-26 17:47:14

themroc
Member
From: Bruxelles
Registered: 2007-11-20
Posts: 17
Website

Re: Cannot transmit inventory. Response Code: 500

Manuel Collazo : what is the result of ?

env

Offline

#19 2008-03-26 17:55:11

Manuel Collazo
New member
Registered: 2008-03-24
Posts: 3

Re: Cannot transmit inventory. Response Code: 500

These are the results:

Last login: Wed Mar 26 12:31:49 on ttys001
tizona:~ Manny$ env
MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/man
TERM_PROGRAM=Apple_Terminal
TERM=xterm-color
SHELL=/bin/bash
TMPDIR=/var/folders/eM/eMqzEdE2HgSxRezK-x0oqE+++TI/-Tmp-/
Apple_PubSub_Socket_Render=/tmp/launch-YvLXt2/Render
TERM_PROGRAM_VERSION=240
USER=Manny
COMMAND_MODE=unix2003
SSH_AUTH_SOCK=/tmp/launch-SZXpNl/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0:0
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
PWD=/Users/Manny
LANG=en_US.UTF-8
SHLVL=1
HOME=/Users/Manny
LOGNAME=Manny
DISPLAY=/tmp/launch-NMy4sb/:0
SECURITYSESSIONID=8a48e0
_=/usr/bin/env


Thanks for your help

Manny

Offline

#20 2008-03-28 11:49:24

themroc
Member
From: Bruxelles
Registered: 2007-11-20
Posts: 17
Website

Re: Cannot transmit inventory. Response Code: 500

unset LC_CTYPE
sudo /usr/local/sbin/ocs_mac_agent.php

Indeed its seems that it is not functionnal on G5+Leopard, but works on Core+Leopard.
No G5 with OS X 10.5 have been inventoried ...

Offline

#21 2008-04-02 15:44:44

adrianmarsh
Member
Registered: 2007-05-31
Posts: 20

Re: Cannot transmit inventory. Response Code: 500

I just saw this thread....

I get 500, and tried the unset command, but still get error code 500.
Mac is running 10.5.2

Offline

#22 2008-04-02 15:52:17

adrianmarsh
Member
Registered: 2007-05-31
Posts: 20

Re: Cannot transmit inventory. Response Code: 500

Ah...

if I su to root first, then do the unset and run the script directly as root, then it works ok. The sudo method doesn't though...

Offline

#23 2008-04-16 20:04:21

brooks_lt
New member
From: Springfield, MO, USA
Registered: 2008-04-16
Posts: 4
Website

Re: Cannot transmit inventory. Response Code: 500

FWIW, I'm having trouble with the following setups:

C2D iMac, running 10.5.2 -- Receive Response Code: 500 whenever I try to run the agent manually via the terminal or SSH, but it executes successfully after install (custom post-install script) and on reboot.

G5 iMac, running 10.5.2 -- Agent receives Response Code: 500, no matter how the script is executed (part of install, or reboot).

After spending most of my day working on this, the only theory I can come up with is that there is a bug in either the agent or PHP5 (both?) that is triggered, regardless, on a G5 system and by a unknown environment variable on Intel-based systems. That probably doesn't make any sense, but it's all I can come up with right now. Any thoughts?

Offline

#24 2008-04-17 09:11:14

adrianmarsh
Member
Registered: 2007-05-31
Posts: 20

Re: Cannot transmit inventory. Response Code: 500

which user are you running as when you run it?  Like I said, for me, it wouldnt run until I switched to root. That indicates a permissions issue somewhere.

Offline

#25 2008-04-17 13:46:21

brooks_lt
New member
From: Springfield, MO, USA
Registered: 2008-04-16
Posts: 4
Website

Re: Cannot transmit inventory. Response Code: 500

Root.

Offline

Board footer

Powered by FluxBB