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.

Cannot establish communication : 301 Moved Permanently


I install Ocsinventory_Agent_MacOSX-2.1.1 to a Macintosh with Mavericks 10.9.4. I have my server with Ubuntu 14.04.1 and OCSNG_UNIX_SERVER-2.1.2.

The agent doesn't send inventory to server.

I read tne documentation/Errors : This error means that you already have a directory named "/ocsinventory" in your apache server, and this name conflicts with apache <location> directive of apache_config file.

But I don't on my server a directory "/ocsinventory", I have a directory "ocsinventory-server " and "OCSNG_UNIX_SERVER-2.1.2"  in var > www, a directory "ocsinventory-reports" in usr > share.


[Mon Sep 22 15:07:49 2014][error] Cannot establish communication : 301 Moved Permanently
[Mon Sep 22 16:17:54 2014][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1
[Mon Sep 22 16:17:54 2014][debug] Log system initialised (File)
[Mon Sep 22 16:17:54 2014][debug] --scan-homedirs missing. Don't scan user directories
[Mon Sep 22 16:17:54 2014][debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__10.104.100.29_ocsinventory/ocsinv.adm
[Mon Sep 22 16:17:54 2014][debug] OCS Agent initialised
[Mon Sep 22 16:17:54 2014][debug] Turns hooks on for /etc/ocsinventory-agent/modules.conf
[Mon Sep 22 16:17:54 2014][debug] Calling handlers : `start_handler'
[Mon Sep 22 16:17:54 2014][debug] Compress::Zlib is available.
[Mon Sep 22 16:17:54 2014][debug] Calling handlers : `prolog_writer'
[Mon Sep 22 16:17:54 2014][debug] sending XML
[Mon Sep 22 16:17:54 2014][debug] sending: <?xml version="1.0" encoding="UTF-8"?>

my ocsinventory-agent.cfg


error.log from Apache

PHP Warning:  Module 'zip' already loaded in Unknown on line 0
[Sun Sep 21 06:31:50.181032 2014] [mpm_prefork:notice] [pid 42636] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.3 mod_perl/2.0.8 Perl/v5.18.2 configured -- resuming normal operations
[Sun Sep 21 06:31:50.181085 2014] [core:notice] [pid 42636] AH00094: Command line: '/usr/sbin/apache2'


<Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied

<Directory /usr/share>
    AllowOverride None
    Require all granted

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted

AccessFileName .htaccess

<FilesMatch "^\.ht">
    Require all denied

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf


000-default.conf from etc > apache2 >sites-available

<VirtualHost *:80>
   ServerAdmin webmaster@localhost
    DocumentRoot /var/www/OCSNG_UNIX_SERVER-2.1.2/ocsreports

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined


# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Alias /ocsinventory "/usr/share/ocsinventory-reports/ocsreports/"
   <Directory "/usr/share/ocsinventory-reports/ocsreports/">
       Options Indexes MultiViews FollowSymLinks
       AllowOverride None
       Order allow,deny
       Allow from all

I don't know what i can do, thanks for your help.

Best regards



in OCS Inventory NG agent for MacOS X by (140 points)

1 Answer

0 votes
How do you have install OCS Inventory NG ?

Because the file 000-default.conf has never exist in OCS and it can be normal that it not work if you don't use the normal configuration.
by (22k points)

thanks for your answer,

I' m surprised, I haven't had any problems during the install, I try again to re-install.
Powered by Question2Answer