Welcome to Pandora FMS Community › Forums › Community support › Installation problems (Server on Windows) — NOT SUPPORTED
-
Installation problems (Server on Windows) — NOT SUPPORTED
Posted by Rob on September 16, 2006 at 16:17Dear reader(s),
I’m new to Pandora and it looks great!.
Unfortunate I have a problem with the installation of the server and get puzzeld with the installation manuals. Probably because I’m new to Perl.
What is the case?
I installed the PHP frontend and the SQL database and data.
Also I made a “Test Agent” and there it goes wrong.The log contain the following line:
“09-16-06 12:40:34: Pandora Agent: Failed when copying to 192.168.1.15”That’s understandable; I don’t get the server installed on my Windows XP system.
Now the manual said that I need to do the following;
Before running Pandora Server, you need to have Pandora DataBase running. In order to setup database configuration you’ll need to edit pandora_server.pl perl script and change this parameters (all are together, in the first lines of code):
my $dirname = “/opt/pandora/data_in”;
my $dbuser = “pandora”;
my $dbpass = “pandora”;
my $dbhost = “pandora”;
my $log_file = “/opt/pandora/pandora.log”;If you run Pandora Server in Windows, you need to use the backslash twice in $dirname, that is: “\”, for example:
my $dirname=”C:\pandora\pandora_server\data_in”;
Well, probably I’m very stupid but I don’t see this line “my $dirname” at all in the “pandora_server.pl” file.
I also get confused by the PERL installation and I’m not a 100% sure if I need the “Private key” as well. preferable I want to skip this part untill I have it running.
I hope you can help me out!
Thanks in advance,
Rob
raul replied 18 years, 3 months ago 5 Members · 22 Replies -
22 Replies
-
::
In the last version, the lines shown at the web had changed:
The configuration has moved to a file external to the perl file: conf/pandora_server.conf in the installation dir.
Also, if no default directory is configured, in the pandora_config.pm file you can see the line (aprox. 124):
$pa_config->{“incomingdir”}=$pa_config->{‘pandora_path’}.”/data_in”;
To run Pandora Server in Windows, after change several dir paths, you must hack some of the lines in the pandora_server.pl file, I don’t remember the changes I had to do, but were not so many, and you need some Perl knowledge. Good Luck!
The last version is more oriented to GNU/Linux, but still runs in Windows (more difficult to configure than the last version).
Also, remember to set up an SSH Server (Using Cygwin, for example).
Under GNU/Linux the setup is clearer and easier.
3-4
-
::
Yes, I have to update the install text (there were several changes in the server from Beta 1 to Beta 2), we are busy adapting the Operation & Administration Guide to the docbook format.
I think Hellraiser is running Pandora Server in Windows, maybe he can Post all the changes he had done 😀
Raúl
-
-
::
Hi crazybest, in windows intallation you need to modify some files
It’s non important if are W2k3 or XP.
I suggest to install XAMPP ( for DB,APACHE,and other prog )For the pandora server:
i unpack the PANDORA_SERVER in c:perllibpandora_server
copy pandora_server.pl
pandora_network.pl
pandora_smnpconsole.pl
in c:perllibmodify pandora_server.pl in a first part of file with:
my $dirname = “c:perllibpandora_serverdata_in”;
my $databasename = ‘PANDORA’;
my $dbuser = ‘Pandorademo’;
my $dbpass = ‘Demopan’;
my $dbhost = ‘PANDORADB’;
my $log_file = “c:perllibpandora_serverlogpandora_server.pl.log”;that’s all for PANDORA_SERVER
INFO for APACHE Server and PEAR:
Rename the FILE CONFIG.PHP under the dir PHPPEAR
—————
change config.php in the dir pandora_consoleincludeconfig.php with:// Database configuration
$dbname=”PANDORA”; // MySQL DataBase
$dbuser=”Pandorademo”; // DB User
$dbpassword=”demopan”; // Password
$dbhost=”PANDORADB”; // MySQL Host
$dbtype=”mysql”; // Type of Database, now only “mysql” its supported
$attachment_store=”C:\Program Files\xampp\htdocs\demo\”; //This is directory where placed “attachment” directory, to upload files stores. This MUST be writtable by wwwserver user, and should be in pandora root. Please append “/” to the end 🙂
$config_fontpath = “c:\windows\fonts\arial.ttf”;MY principal dir under HTDOCS ( apache ) is DEMO
if you have other question i hope to help you
Fabrizio 😉
-
::
First of all, i will introduce myself a bit.
ASL> 20, male, holland
I am educating IT. At the moment I have internship (so in a company for my education).
I have no experience with perl, open soucre, linux, apache… like everything 😛 but I am willing to learn (understand) all. On school I learned Java.I will try to ask my questions very specifics
first of all i cant find anyting like you wrote below in pandora_server.pl
modify pandora_server.pl in a first part of file with:
my $dirname = “c:perllibpandora_serverdata_in”;
my $databasename = ‘PANDORA’;
my $dbuser = ‘Pandorademo’;
my $dbpass = ‘Demopan’;
my $dbhost = ‘PANDORADB’;
my $log_file = “c:perllibpandora_serverlogpandora_server.pl.log”;I copied the file pandora_server.pl from the c:perllibpandora_serverbin folder to c:perllib
Then I wanted to edit this file (c:perllibpandora_server.pl). But i cant find anything with $dirname $databasename etc.
these are the first lines from my c:perllibpandora_server.pl
[code:1]#!/usr/bin/perl
##################################################################################
# Pandora Data Server
(…)# Includes list
use strict;
use warnings;use XML::Simple; # Useful XML functions
use Digest::MD5; # MD5 generation
use Time::Local; # DateTime basic manipulation
use DBI; # DB interface with MySQL
use Date::Manip; # Needed to manipulate DateTime formats of input, output and compare
use File::Copy; # Needed to manipulate files
use threads;
use threads::shared;# Librerias / Modulos de pandora
use pandora_config;
use pandora_tools;
use pandora_db;# FLUSH in each IO, only for DEBUG, very slow !
$| = 1;my %pa_config;
# Inicio del bucle principal de programa
pandora_init(%pa_config,”Pandora Server”);# Read config file for Global variables
pandora_loadconfig (%pa_config,0);# Audit server starting
pandora_audit (%pa_config, “Pandora Daemon starting”, “SYSTEM”, “System”);# BE CAREFUL, if you daemonize, you need to launch threads BEFORE daemonizing.
if ($pa_config{“daemon”} eq “1” ){
&daemonize;
}# KeepAlive checks for Agents, only for master servers, in separate thread
threads->new( &pandora_keepalived, %pa_config);# Module processor subsystem
pandora_dataserver(%pa_config);#————————————————————————————
#————————————————————————————
#————————————————————————————
#——————— Main Perl Code below this line——————————-
#————————————————————————————
#————————————————————————————
#————————————————————————————##############################################################################
# Main loop
##############################################################################sub pandora_dataserver {
my $pa_config = $_[0];
my $file_data;
my $file_md5;
my @file_list;
my $onefile; # Each item of incoming directory
my $agent_filename;
my $dbh = DBI->connect(“DBI:mysql:pandora:$pa_config->{‘dbhost’}:3306”,$pa_config->{“dbuser”}, $pa_config->{“dbpass”},{ RaiseError => 1, AutoCommit => 1 });while ( 1 ) { # Pandora module processor main loop
opendir(DIR, $pa_config->{‘incomingdir’} ) or die “[FATAL] Cannot open Incoming data directory at $pa_config->{‘incomingdir’}: $!”;
while (defined($onefile = readdir(DIR))){
push @file_list,$onefile; # Push in a stack all directory entries for this loop
}
while (defined($onefile = pop @file_list)) { # Begin to process filesWhere should i add those lines.
PS: this comes from pandora_server_1.2-Beta2.tar.gz
====================
As what is commented in a earlier post, in Beta2 the stuff is changed to the *.conf file.
I dont know exactly how perl or the pandorascript work, but i have the feeling my program (c:perllibpandora_server.pl) dont know the path, and thereby dont know the call other files/methods. I saw something in the config.pm file about parameters, altho I dont know how to add those.I am using WAMP (Apache, PHP, Mysql … in 1.) and it runs smoothly. the pandora_console is working.
-
::
Well, I think we have a small confusion about the different versions of Pandora Server 😀
First: DISCLAIMER, the Pandora Server was created and thinked to run in GNU/Linux systems and we ONLY support that. We know (and I tried before) it can run on Windows, but with the limitations of this OS, the perl version in windows, the libraries and all dependencies we use, that, maybe, doesn’t have a windows version)
– As I wrote before, from Pandora 1.2 Beta 2, all the configuration options have been extracted from the pandora_server.pl file to the ./conf/pandora_server.conf
– Now we have more perl scripts in the ./bin folder: pandora_server.pl, pandora_network.pl and pandora_snmpconsole.pl (these are the servers, but also we can find some more perl scripts to test DBI module, test SNMP and stress database), these scripts are the different “modules” of the Server, as you can see at the next image:
– You don’t need to put all the files in c:perllib. Only create c:pandora_server, for example, and your directory structure will be:
c:pandora_server
|___bin
|___conf
|___data_in
|___doc
|___log
|___util
|___varYou’ll also find three shell scripts (for *x os) in that root folder:
pandora_network
pandora_server
pandora_snmpconsoleAt the moment, I’ll only talk about the pandora_server one.
In Windows, this should be a pandora_server.bat file, and it contains something like (let’s suppose that c:perlbin is in the %PATH%, so you can execute the script)
[code:1]@echo off
REM Here we set Time Zone, compulsory!!
set TZ=WET
cd bin
echo Pandora Server running…
echo .
perl pandora_server_windows.pl ..\Then, let’s see the files:
./conf/pandora_server.conf
Change the Unix style paths to Windows paths:
[code:1]basepath c:pandora_server
incomingdir c:pandora_serverdata_in
log_file c:pandora_serverlogpandora_server.log
errorlog_file c:pandora_serverlogpandora_server.errorFor testing, let’s “turn off” SNMP and Network Servers:
[code:1]snmpconsole 0
networkserver 0Save file.
If you do that, the server starts without any problem.
The problem begins when you try to send any data, you have to be able to set a SSH server in Windows and you have to configure your agents and users and so on. Cygwin can help you with that job.
If you do that, you’ll see at the server command line:
(http://pandora.sourceforge.net/images/server_win.jpg)
When you send some data, a warning appears, something like:
[code:1]Use of uninitialized value in length at pandora_server.pl line 305.In the server log, you can see how the server creates the modules (you have to create the agent in learning mode):
[code:1]2006/09/21 15:58:44 [V2] ERROR: SQL Query is select * from tagente_modulo where id_agente = ‘1’ and id_tipo_modulo = ‘1’ and nombre = ‘disk_free_C:’
2006/09/21 15:58:44 [V4] Pandora_insertdata will create module (learnmode) for agent localhost
2006/09/21 15:58:44 [V3] DEBUG: Query for autocreate : insert into tagente_modulo (id_agente,id_tipo_modulo,nombre,max,min,descripcion) values (1,1,’disk_free_C:’,0,0,’N/A (*)’)
2006/09/21 15:58:44 [V10] Updating data for disk_free_C:, because there are not data in DB
2006/09/21 15:58:44 [V3] DEBUG: pandora_insertdata Calculado id_agente_modulo a 49
2006/09/21 15:58:44 [V4] DEBUG: pandora_insertdata SQL : insert into tagente_datos (id_agente_modulo,datos,timestamp,id_agente) VALUES (49,9913417728.00,’2006/9/21 15:58:43′,1)
2006/09/21 15:58:44 [V3] DEBUG: calcula_alerta() Calculado id_agente_modulo a 49
2006/09/21 15:58:44 [V2] Generando entrada (INSERT) en tagente_estado para disk_free_C:
2006/09/21 15:58:45 [V5] Processing packet Name ( disk_free_D: ) type ( generic_data ) for agent ( localhost )
2006/09/21 15:58:45 [V2] ERROR dame_agente_modulo_id(): Cannot find agente_modulo called disk_free_D:
2006/09/21 15:58:45 [V2] ERROR: SQL Query is select * from tagente_modulo where id_agente = ‘1’ and id_tipo_modulo = ‘1’ and nombre = ‘disk_free_D:’
2006/09/21 15:58:45 [V4] Pandora_insertdata will create module (learnmode) for agent localhost
2006/09/21 15:58:45 [V3] DEBUG: Query for autocreate : insert into tagente_modulo (id_agente,id_tipo_modulo,nombre,max,min,descripcion) values (1,1,’disk_free_D:’,0,0,’N/A (*)’)
2006/09/21 15:58:45 [V10] Updating data for disk_free_D:, because there are not data in DB
2006/09/21 15:58:45 [V3] DEBUG: pandora_insertdata Calculado id_agente_modulo a 50
2006/09/21 15:58:45 [V4] DEBUG: pandora_insertdata SQL : insert into tagente_datos (id_agente_modulo,datos,timestamp,id_agente) VALUES (50,30761717760.00,’2006/9/21 15:58:43′,1)See the image of the server:
(http://pandora.sourceforge.net/images/agent.jpg)
I also have seen that the server can stop if any of the data is longer of that assigned by the SQL script (something like: DBD::mysql::db do failed: Out of range value adjusted for column ‘datos’ at row 1 at pandora_db.pm). But the solution is easy… change DATA_TYPE of column datos in tagente_datos table, to a bigger data type one.
This is not related with Windows, is the type of data declared in the SQL Script :-D, that, maybe, should be greater, as an example:EDIT:
[code:1]ALTER TABLE `pandora`.`tagente_datos` MODIFY COLUMN `datos` DOUBLE(18,2);We have update the SQL script that generate all the structure to reflect this change.
So…
Raul
EDIT: I delete quoted text
-
::
my day ends today, so i gonna continue tomorrow.
just before I quit.
Do I have to create the .bat file myself..?
if yes…. is it just copy pasting your [ code ] in a textfile and call it *.bat and put it into the c:perlbin folder?Anyway before reading your latest post i was continuing… and i became somewhat futher…
1. by running the server.pl file i needed to move the pandora_serverbin*.pm files into the perllib folder, coz with compiling it was complaining about [code:1]# Librerias / Modulos de pandora
use pandora_config;
use pandora_tools;
use pandora_db;2. in the *.conf file i adjusted the folderstructures and added one variable [code:1]pandora_path c:perllibpandora_server
(I think pandora_path (used in config.pm) is compared to your basepath (your reply before this one).3. when i ran now i got almost the same window as http://pandora.sourceforge.net/images/server_win.jpg
My command window looked like this:C:Perllib>perl pandora_server.pl c:perllibpandora_server
Pandora Server 1.2 Beta2 Build PS60629 Copyright (c) 2004-2006 ArticaST
This program is Free Software, licensed under the terms of GPL License v2 or lat
er.
You can download latest versions and documentation at http://pandora.sourceforge
.net.[W] It is not a good idea running Pandora Server as root user, please DON’T DO
IT!- Server basepath is c:perllibpandora_server
- Server logfile at c:perllibpandora_serverlogpandora_server.pl.log
- Server errorlogfile at c:perllibpandora_server\logpandora_server.error
- Server incoming directory at c:perllibpandora_serverdata_in
- Server keepalive 60
- Server threshold 30
- You are running Pandora Data Server.
- This server is running in MASTER mode.
-A- kom ik hier ??
-l1- kom ik hier???
-l2- kom ik hier???
ERROR: Date::Manip unable to determine TimeZone.
at C:/Perl/site/lib/Date/Manip.pm line 3635
Date::Manip::Date_TimeZone called at C:/Perl/site/lib/Date/Manip.pm line
676
Date::Manip::Date_Init() called at C:/Perl/site/lib/Date/Manip.pm line 7
99
Date::Manip::ParseDateString(‘today’) called at C:/Perl/site/lib/Date/Ma
nip.pm line 1791
Date::Manip::UnixDate(‘today’, ‘%Y/%m/%d %H:%M:%S’) called at C:/Perl/li
b/pandora_tools.pm line 143
pandora_tools::logger(‘HASH(0x1e6e104)’, ‘Launching Pandora Data Server
1.2 Beta2 PS60629’, 0) called at C:/Perl/lib/pandora_config.pm line 262
pandora_config::pandora_loadconfig(‘HASH(0x1e6e104)’, 0) called at pando
ra_server.pl line 48C:Perllib>
i only added the print commands (kom ik hier >> do i come here). l2 is added 1 line before
[code:1]my $time_now = &UnixDate(“today”,”%Y/%m/%d %H:%M:%S”);
line arround 142 in pandora_tools.pm====
I’ll take for granted that the bat file should prevent the TZ error. but i cant check now (have to leave)… i will try tomorrow.
thanks a lot for assiting me 🙂
-
::
The bat file is for make it easier. You can copy and save it lika a .bat file or just run the set tz command line, before executing the perl script:
C:Pandora_server>SET TZ=CET
C:Pandora_server>cd Bin
C:Pandora_serverbin>perl pandora_server.pl ..…….
That’s all!
NOTE: I have changed from TZ=WET (Western Europe Time) to TZ=CET (Central Europe Time), I think it’s better for you 😀
Raul
-
::
awesome, its almost working 😀
got some probs with running dbase.. although i dont know why. The pandora_console does work, but the server isnt.
It seems its quitting normally after the last execution of the code below:
[code:1] # Check valid Database variables and update server status
eval {
my $dbh = DBI->connect(“DBI:mysql:pandora:$pa_config->{‘dbhost’}:3306”, $pa_config->{‘dbuser’}, $pa_config->{‘dbpass’}, { RaiseError => 1, AutoCommit => 1 });
pandora_updateserver ($pa_config, $pa_config->{‘servername’},1, $opmode, $dbh); # Alive status
};
if ($@) {logger ($pa_config, “Error connecting database in init Phase. Aborting startup.”,0);
print (” [E] Error connecting database in init Phase. Aborting startup. nn”);
exit;And while the dbuser, dbpass and dbhost are exactly the same as the include/config.php, it doesnt seems to work for the perlfile.
=======
I will try to find out myself, this isnt code-related so prolly i have to find my own way to this solution :).my spanish isnt that good, but at least i know this
Graçia 😀
-
::
It’s clear, check user and password setting for the database, and verify if you can rearch the host and 3306 port 😀
awesome, its almost working 😀
got some probs with running dbase.. although i dont know why. The pandora_console does work, but the server isnt.
It seems its quitting normally after the last execution of the code below:
[code:1] # Check valid Database variables and update server status
eval {
my $dbh = DBI->connect(“DBI:mysql:pandora:$pa_config->{‘dbhost’}:3306”, $pa_config->{‘dbuser’}, $pa_config->{‘dbpass’}, { RaiseError => 1, AutoCommit => 1 });
pandora_updateserver ($pa_config, $pa_config->{‘servername’},1, $opmode, $dbh); # Alive status
};
if ($@) {logger ($pa_config, “Error connecting database in init Phase. Aborting startup.”,0);
print (” [E] Error connecting database in init Phase. Aborting startup. nn”);
exit;And while the dbuser, dbpass and dbhost are exactly the same as the include/config.php, it doesnt seems to work for the perlfile.
=======
I will try to find out myself, this isnt code-related so prolly i have to find my own way to this solution :).my spanish isnt that good, but at least i know this
Graçia 😀
-
::
check username, password and host
as i said those are exactly the same as pandora_console/include/config.php, which is working perfectly.
those are
host: localhost
dbname: pandora
dbuser: pandora
dbpass: pandoracheck the port
i checked the my.ini of mysql, which says its 3306 (which is default.)
However i don’t know how i can check if its open, i guess it is, while the pandora_console is working.PS: i dunno if it matters, but i havent logged on in windows with pandora. I have created one though.
-
-
::
Ok…
– webconsole is working
– cmd-console is showing like http://pandora.sourceforge.net/images/server_win.jpg (except the md5 security)so now i should be able to add agents, and see data, graphs and alerts…..
after adding my own computer (winxp) and my remote computer (with pandora on win2003) as agents i tried to create modules. It seems very complicated. I dunno how pandora get their data, but i guess i missing a lot of standard-data.
the “next agent contact” is unknown. the jgraph created image has errors and couldnt get created.
even the keep_alive dont give any results.
I haven’t got your predicted error
[code:1]Use of uninitialized value in length at pandora_server.pl line 305.So i feel that there isnt data sending nor receiving. I dont have a clue where to look for (data_server, network server, snmp console, agents???) How can i see that the server keeps running, or that its live?
-
::
Well… you’re running Pandora Agents, but, do you have an SSH Server installed? Have you added your agents to the Web Console in learning mode?
First you have to setup and SSH Server on Windows (Cygwin environment has one, based on OpenSSH, take a look at http://ist.uwaterloo.ca/~kscully/CygwinSSHD_W2K3.html).
If you have the SSH Server installed, next is verify the connectivity between Agents and Server using option “–test-ssh” in the command line:
[code:1]C:pandora_agentbin>pandoraAgent –test-ssh
Also, take a look at the log file of the server, to get information about what’s doing the server.
Raul
Ok…
– webconsole is working
– cmd-console is showing like http://pandora.sourceforge.net/images/server_win.jpg (except the md5 security)so now i should be able to add agents, and see data, graphs and alerts…..
after adding my own computer (winxp) and my remote computer (with pandora on win2003) as agents i tried to create modules. It seems very complicated. I dunno how pandora get their data, but i guess i missing a lot of standard-data.
the “next agent contact” is unknown. the jgraph created image has errors and couldnt get created.
even the keep_alive dont give any results.
I haven’t got your predicted error
[code:1]Use of uninitialized value in length at pandora_server.pl line 305.So i feel that there isnt data sending nor receiving. I dont have a clue where to look for (data_server, network server, snmp console, agents???) How can i see that the server keeps running, or that its live?
-
::
ok, i installed the cygwin- openssh.
ssh -v localhost ==> works
connecting from win xp (where pandora_agent is installed) with putty on ssh of server ==> works
C:pandorabin>pandoraagent –test-ssh ==> doesn’t work
[code:1]C:pandorabin>pandoraagent –test-ssh
Public key file: C:pandorabinkeyid_dsa.pub
Private key file: C:pandorabinkeyid_dsa
Connecting with 10.0.0.4…
Authentication Failed when connecting to 10.0.0.4
Check the remote host configuration and the public/private key files.i have tried to get the keys right.. i copied the keys in the [server w2003]c:cygwighome
folder to the [client wxp]c:pandorabinkey folder. with putty i tried to make some new keys (ssh-keygen -t dsa, copied those and renamed to id_dsa; but it didnt work out)
i will be waiting for your response. thanks a lot again and again and again 🙂
-
::
To connect directly you have to add to the .ssh folder in the profile directory of the user which runs SSH Server the file authorized_keys, when you’ll add the public keys (in cygwin)
[code:1]cat C:pandora_agentbinkeyid_dsa.pub >> /home/pandora/.ssh/authorized_keys
(this is only for concept, the command, on command line interpreter of iwndows will be something like):
[code:1]type C:pandora_agentbinkeyid_dsa.pub >> C:cygwinhomepandora.sshauthorized_keys
At this moment I don’t know if I can help you more :-D, as I told you, setting this in GNU/Linux is far easier… I don’t know why you’re still using Win* 😀
Raúl
EDIT: Changed all reference from %..USER..% to pandora and added a true command line 😀
-
::
To connect directly you have to add to the .ssh folder in the profile directory of the user which runs SSH Server the file authorized_keys, when you’ll add the public keys: do something like
[code:1]type C:pandorabinkeyid_dsa.pub >> %HOME_SSHD_USER%/.ssh/authorized_keys
Do also (who knows which kind of version it uses :-D):
[code:1]type C:pandorabinkeyid_dsa.pub >> %HOME_SSHD_USER%/.ssh/authorized_keys2
Where %HOME_SSHD_USER% is the profile directory of the user that runs OpenSSH.
At this moment I don’t know if I can help you more :-D, as I told you, setting this in GNU/Linux is far easier… I don’t know why you’re still using Win* 😀
Raúl
…
Where should i do that code?
My win2003 server, loginname is Administrator, so this is my pad:
win2003s: C:cygwinhomeAdministrator.sshauthorized_keysbut the agent isnt isntalled on this server, it is on win xp. so
winxp: C:pandorabinkeyid_dsa.pubdid i installed the openssh server on the wrong machine… should it be installed on the agent?..
PS:
i will make a picture to give an overview of my situation in a hour.EDITTED:
Maybe you see some problems in here, or that you can give me better fittable scripts :)…. thx in advance.
-
::
Let’s see. Your problem is the OpenSSH setup. I think you SHOULD read all the information carefully, but I’ll try to give you an small idea:
0) First of all, I’ll only talk about the localhost to localhost connection at the windows 2003 Server. The other is just the same agent, just changing the IP, and name in the agent.conf file.
1) Cygwin and Pandora Server, will be installed on the windows 2003 Server. Create here the user pandora on the operating System.
2) I suppose you have installed Cygwin, and installed as service, To Set up cygwin SSH, follow the instruction on the page I gave you and change the user to SYSTEM
[code:1]chown SYSTEM /etc/ssh_*
chown SYSTEM /var/log/sshd.log
chown -R SYSTEM /var/emptyChange permission:
[code:1]chmod 600 /etc/ssh_h*
As you have created the pandora user, you have to add it to cygwin env:
[code:1]mkpasswd.exe -u pandora -l >>/etc/passwd
Create home for the user:
[code:1]mkdir /home/pandora
Create /home/pandora/.ssh directory
Copy the key id_dsa.pub (this is the same as in the c:pandora_agentbinkey directory) file to /home/pandora/.ssh/authorized_keys:
(
EDIT: It’s supposed that you have changed the mount point in cygwin, using command:[code:1]mount -s –change-cygdrive-prefix /
if not, use /cygdrive/c/ instead /c/
)[code:1]cat /c/pandora_agent/bin/key/id_dsa.pub >> /home/pandora/.ssh/authorized_keys
Change permission to that file:
[code:1]chmod 600 authorized_keys
Change permissions to .ssh directory:[code:1]chmod 700 /home/pandora/.ssh
Change owner:
[code:1]chown -R pandora /home/pandora
Test Pandora Agent:
[code:1]>PandoraAgent.exe –test-ssh
Public key file: C:pandora_agentswin32binkeyid_dsa.pub
Private key file: C:pandora_agentswin32binkeyid_dsa
Connecting with 127.0.0.1…
Authentication successful.
Host fingerprint: 1F:F0:D7:41:B9:78:D5:5A:BE:3E:C6:E5:B1:82:7C:67
Created a blank XML file in C:tempssh.test
Remote copying C:tempssh.test on server 127.0.0.1 at /pandora_server/data_in/ssh.test
Successfuly file copied to remote host
Successfuly disconnected from remote host
The SSH test was successful!Well, at this moment, the OpenSSH Server and the connection between agent and server works.
Next: An small trick :-D. Let’s create a link in the cygwin environment to receive data (as you can see at the pandora_agent.conf file, the directory
to set the file on the server is /opt/pandora_server/data_in, so we are going to create this, we suppose the server is installed on C:pandora_server)[code:1]mkdir /opt
cd /opt
ln -s -f /c/pandora_server pandora_serverNow, start PandoraAgent Service.
Set the line
[code:1]checksum 0
at pandora_server.conf, to avoid the server wait for the .checksum files (at this moment we will not use the md5 checksum) and start Pandora Server.This it’s all!!! I have made all the changes by myself at the moment of writting and it works.. so it shouldn’t have to be a problem.
Review all the logs to get more details about any error.
To setup the agent in the other PC, just change Ip and name in the pandora_agent.conf file.
I think this is the last post about this issue. If somebody wants to make an step-by-step guide with this information, it’s welcome 😀
Raúl
EDIT: I delete quoted text and changed some bad paths
-
::
One more thing:
You can see something in the standard exit:
[code:1]Use of uninitialized value in length at pandora_server.pl line 305.
Use of uninitialized value in length at pandora_server.pl line 306.
Use of uninitialized value in concatenation (.) or string at pandora_db.pm line 450.This are not just errors, but notice text. Just ignore it, we’ll try to change it before the new release 😀
Raul
-
::
i will sum up my current situation
i followed your post, which made it impossible to do even pandoraagent –test-ssh. Prolly coz it missed one or several rights (chown/chmod) to receive the message.
after that i tried (with tips of mostly steve-o, marostegui and slerena via IRC) to restart sshd, which didnt went well, to restart (reinstall) cygwin) but in the end it still didnt worked well…
I have the feeling that sshd doesnt want to start, still coz of missing several rights. I dont know ..peep.. about ssh nor cygwin.