OCSInventory-NG / OCSInventory-Docker-Stack

Docker stack for OCSInventory Server
GNU General Public License v3.0
42 stars 38 forks source link

Problem with the deploy with docker compose #1

Closed miguelfrancisco85 closed 7 years ago

miguelfrancisco85 commented 7 years ago

when i deploy with docker-compose docker-compose up It It fail, the docker ocsinventoryngstack_web_1 doesn't have access to docker ocsinventoryngstack_db_1, I had to add manually the docker address in /etc/hosts 172.22.0.2 efddd461ed48 ocsinventoryngstack_db_1

once i done that the website works, but other problem appears when an agent try to send the inventory to the server.

[Fri Dec 23 12:41:08.709908 2016] [perl:error] [pid 175] [client 172.22.0.1:54954] Can't call method "do" on an undefined value at /usr/local/share/perl/5.20.2/Apache/Ocsinventory/Server/System.pm line 189.\n

this problem i don't have any idea how to fix it. it seems to be a problem with the DB connection. because the code is

my $dbh = DBI->connect("DBI:mysql:database=$database;host=$host;port=$port", $user, $password, \%params); $dbh->do("SET NAMES 'utf8'") if($dbh && $ENV{'OCS_OPT_UNICODE_SUPPORT'}); $dbh->do("SET sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"); return $dbh;

damienbelliard commented 7 years ago

Hi,

You need to check your DB configuration I think it's your z-ocsinventory-server.conf.

Regards