These are chat archives for allegro/ralph

27th
Mar 2015
flashput
@flashput
Mar 27 2015 01:57
@vi4m how can I load example data to database?
whoisearth
@whoisearth
Mar 27 2015 02:19
@flashput what os are you using and have you documented your steps? I'm really having a hard time getting the advanced setup going but I've primarily been trying with centos
flashput
@flashput
Mar 27 2015 02:21
@centos 6.6 x64
whoisearth
@whoisearth
Mar 27 2015 02:22
installed from git I'm assuming or pip?
flashput
@flashput
Mar 27 2015 02:22
I'm now running develop version of ralph
whoisearth
@whoisearth
Mar 27 2015 02:22
ah ok so git
cool going to give it a try now on my system. exactly the same as yours :)
flashput
@flashput
Mar 27 2015 02:23
yes. but build on centos is a little different from ubuntu
which version of centos ? 7 or 6
whoisearth
@whoisearth
Mar 27 2015 02:27
6.6 x64 same as you
I've been spinning up vm's left and right
did you manage a successful discovery? That's been as far as I've been able to get on docker install
flashput
@flashput
Mar 27 2015 02:29
not yet, will try today
whoisearth
@whoisearth
Mar 27 2015 02:30
wish you luck. almost midnight here so I'll be taking another whack tomorrow
flashput
@flashput
Mar 27 2015 02:31
Ok, good night
whoisearth
@whoisearth
Mar 27 2015 02:31
spinning up a fresh install of 6.6 now to try an install from git.
flashput
@flashput
Mar 27 2015 06:44
@vi4m develop version, quick scan not functioning
flashput
@flashput
Mar 27 2015 08:09
@vi4m is there any exact version matches between ralph and ralph_asset?
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 08:15
@flashput we tag all version together
pylabs-team created tag 20150326.3 at allegro/ralph_pricing 20 hours ago
pylabs-team created tag 20150326.3 at allegro/ralph 20 hours ago
pylabs-team created tag 20150326.3 at allegro/ralph_assets 20 hours ago
pylabs-team created tag 20150326.3 at allegro/django-bob 20 hours ago
pylabs-team created tag 20150326.3 at quamilek/bob-ajax-selects 20 hours ago
pylabs-team created tag 20150326.3 at zefciu/django-search-forms
these are matched versions from git
flashput
@flashput
Mar 27 2015 08:21
OK, I see.
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 08:22
btw - we yesterday fixed docker to be able to scan properly
if you install it not from docker you have to remember about setting setcap permissions (http://ralph.readthedocs.org/en/latest/installation.html) (setcap)
flashput
@flashput
Mar 27 2015 08:25
I should check out develop branch?
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 08:26
yes, you can - develop is stable enough to use it
but we tag some version from time to time, for example 20150326.3 was yesterdays deployment
flashput
@flashput
Mar 27 2015 08:48
I checked out and installed dev version.
the make install process passed
flashput
@flashput
Mar 27 2015 10:57
@vi4m I try to quick a linux rack server , provide ssh & snmp v2 info in settings
but quick scan got nothing
Mateusz Kurek
@mkurek
Mar 27 2015 10:58
@flashput did you run setcap on python binary?
flashput
@flashput
Mar 27 2015 10:59
should I run setcap each time I run as ralph user?
or just once
I ran setcap just now , and restart ralph, snmp functions became online.
but ssh_linux still not work
Mateusz Kurek
@mkurek
Mar 27 2015 11:05
just once; do you have any logs from this plugin?
flashput
@flashput
Mar 27 2015 11:11
snmpwalk -v 2c -c servro 192.168.50.50 system
I got only shell output.
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 11:13
when you do scan from quickscan gui, you will get some output on the screen
flashput
@flashput
Mar 27 2015 11:13
the snmp problem, I can get much more message than quick scan
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 11:14
did you set community somewhere?
because it is non-standard (public is the standard)
flashput
@flashput
Mar 27 2015 11:16
I configured community string in .ralph/settings
here is the quick scan ui log.
Logs:
ralph.scan.plugins.ssh_ibm_bladecenter: Running plugin ralph.scan.plugins.ssh_ibm_bladecenter.
ralph.scan.plugins.ssh_ibm_bladecenter: Exception occured in plugin ssh_ibm_bladecenter and address 192.168.50.50
ralph.scan.plugins.ssh_ibm_bladecenter: It is not IBM.
ralph.scan.plugins.hp_oa: Running plugin ralph.scan.plugins.hp_oa.
ralph.scan.plugins.hp_oa: Exception occured in plugin hp_oa and address 192.168.50.50
ralph.scan.plugins.hp_oa: It is not HP OA.
ralph.scan.plugins.snmp_macs: Running plugin ralph.scan.plugins.snmp_macs.
ralph.scan.plugins.software: Running plugin ralph.scan.plugins.software.
ralph.scan.plugins.dns_hostname: Running plugin ralph.scan.plugins.dns_hostname.
ralph.scan.plugins.proxmox_2_3: Running plugin ralph.scan.plugins.proxmox_2_3.
ralph.scan.plugins.proxmox_2_3: Exception occured in plugin proxmox_2_3 and address 192.168.50.50
ralph.scan.plugins.proxmox_2_3: It is not Proxmox 2 or 3.
ralph.scan.plugins.ssh_aix: Running plugin ralph.scan.plugins.ssh_aix.
ralph.scan.plugins.ssh_aix: Exception occured in plugin ssh_aix and address 192.168.50.50
ralph.scan.plugins.ssh_aix: No match
ralph.scan.plugins.ilo_hp: Running plugin ralph.scan.plugins.ilo_hp.
ralph.scan.plugins.ilo_hp: Exception occured in plugin ilo_hp and address 192.168.50.50
ralph.scan.plugins.ilo_hp: It is not HP.
ralph.scan.plugins.ssh_hp_msa: Running plugin ralph.scan.plugins.ssh_hp_msa.
ralph.scan.plugins.ssh_hp_msa: Exception occured in plugin ssh_hp_msa and address 192.168.50.50
ralph.scan.plugins.ssh_hp_msa: It's not a HP MSA Storage.
ralph.scan.plugins.snmp_lldp: Running plugin ralph.scan.plugins.snmp_lldp.
ralph.scan.plugins.ssh_proxmox: Running plugin ralph.scan.plugins.ssh_proxmox.
ralph.scan.plugins.ssh_proxmox: Exception occured in plugin ssh_proxmox and address 192.168.50.50
ralph.scan.plugins.ssh_proxmox: It is not Proxmox 1.
ralph.scan.plugins.http_supermicro: Running plugin ralph.scan.plugins.http_supermicro.
ralph.scan.plugins.http_supermicro: Exception occured in plugin http_supermicro and address 192.168.50.50
ralph.scan.plugins.http_supermicro: It is not Thomas-Krenn.
ralph.scan.plugins.puppet: Running plugin ralph.scan.plugins.puppet.
ralph.scan.plugins.puppet: Not configured.
ralph.scan.plugins.ssh_xen: Running plugin ralph.scan.plugins.ssh_xen.
ralph.scan.plugins.ssh_xen: Exception occured in plugin ssh_xen and address 192.168.50.50
ralph.scan.plugins.ssh_xen: XEN not found.
ralph.scan.plugins.ssh_onstor: Running plugin ralph.scan.plugins.ssh_onstor.
ralph.scan.plugins.ssh_onstor: Exception occured in plugin ssh_onstor and address 192.168.50.50
ralph.scan.plugins.ssh_onstor: It's not an ONStor.
ralph.scan.plugins.http_ibm_system_x: Running plugin ralph.scan.plugins.http_ibm_system_x.
ralph.scan.plugins.http_ibm_system_x: Exception occured in plugin http_ibm_system_x and address 192.168.50.50
ralph.scan.plugins.http_ibm_system_x: Not configured. Set IBM_SYSTEM_X_USER and IBM_SYSTEM_X_PASSWORD in your configuration file.
ralph.scan.plugins.ssh_cisco_asa: Running plugin ralph.scan.plugins.ssh_cisco_asa.
ralph.scan.plugins.ssh_cisco_asa: Exception occured in plugin ssh_cisco_asa and address 192.168.50.50
ralph.scan.plugins.ssh_cisco_asa: It is not Cisco.
ralph.scan.plugins.ssh_cisco_catalyst: Running plugin ralph.scan.plugins.ssh_cisco_catalyst.
ralph.scan.plugins.ssh_cisco_catalyst: Exception occured in plugin ssh_cisco_catalyst and address 192.168.50.50
ralph.scan.plugins.ssh_cisco_catalyst: It is not Cisco.
ralph.scan.plugins.ssh_juniper: Running plugin ralph.scan.plugins.ssh_juniper.
ralph.scan.plugins.ssh_juniper: Exception occured in plugin ssh_juniper and address 192.168.50.50
ralph.scan.plugins.ssh_juniper: It is not Juniper.
ralph.scan.plugins.vmware: Running plugin ralph.scan.plugins.vmware.
ralph.scan.plugins.vmware: Exception occured in plugin vmware and address 192.168.50.50
ralph.scan.plugins.vmware: It is not VMWare.
ralph.scan.plugins.snmp_f5: Running plugin ralph.scan.plugins.snmp_f5.
ralph.scan.plugins.snmp_f5: The SNMP name `Linux c25-zol-db-monitor.cnet.com.cn 2.6.32-431.3.1.el6.x86_64 #1 SMP
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 11:19
have you restarted your wokers as well?
after settings change
flashput
@flashput
Mar 27 2015 11:19
restarted
I just restarted again, try to rescan
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 11:22
where is ssh_linux ? :)
should be also listed
flashput
@flashput
Mar 27 2015 11:23
same result , only snmp_mac, snmp_lldp, software got some out
maybe log lines too long, gitter truncated
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 11:24
ssh_linux shoud output some debug log
flashput
@flashput
Mar 27 2015 11:25
ralph.scan.plugins.ssh_ssg: Running plugin ralph.scan.plugins.ssh_ssg.
ralph.scan.plugins.ssh_ssg: Exception occured in plugin ssh_ssg and address 192.168.50.50
ralph.scan.plugins.ssh_ssg: It's not a Juniper SSG.
ralph.scan.plugins.ssh_linux: Running plugin ralph.scan.plugins.ssh_linux.
ralph.scan.plugins.ssh_linux: Exception occured in plugin ssh_linux and address 192.168.50.50
ralph.scan.plugins.ssh_linux: Error reading SSH protocol banner[Errno 104] Connection reset by peer
ralph.scan.plugins.ipmi: Running plugin ralph.scan.plugins.ipmi.
ralph.scan.plugins.ipmi: Exception occured in plugin ipmi and address 192.168.50.50
ralph.scan.plugins.ipmi: It is not compatible device for this plugin.
ralph.scan.plugins.ssh_hp_p2000: Running plugin ralph.scan.plugins.ssh_hp_p2000.
ralph.scan.plugins.ssh_hp_p2000: Exception occured in plugin ssh_hp_p2000 and address 192.168.50.50
ralph.scan.plugins.ssh_hp_p2000: No match
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 11:25
Error reading SSH protocol banner[Errno 104] Connection reset by peer
that's the issue
ssh library error (paramico library)
are you sure you can ssh into the box from the ralph server?
flashput
@flashput
Mar 27 2015 11:37
firewall issue , I fixed it, ssh_linux ok now
flashput
@flashput
Mar 27 2015 11:43
how to scan entire network?
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 11:48
commandline only currently
we have some networks module, but currently hidden, which allows you to scan networks
{ralph_url}/ui/networks/
flashput
@flashput
Mar 27 2015 11:52
that's great
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 11:52
it works like described in documentation http://ralph.readthedocs.org/en/latest/scan.html
we use commandline interface for scanning networks, because we have so many networks(tousands), that the currently UI (hidden) is too slow to render : P
flashput
@flashput
Mar 27 2015 11:54
OMG, thousands of networks.
flashput
@flashput
Mar 27 2015 12:01
an asset saving problem
when saving quick scan asset, I filled the Asset form, and click save, an error raised
Enter barcode, model or serial number.
Asset is required for this kind of device.
i did filled the form with serial number
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 12:08
yes, our company's flow is:
  1. add asset information when buying it, or installing into the dc
  2. scan internal configuration by using quickscan
  3. connect configuration info + asset info
  4. we plan to improve it when you have existing dc devices set
This message was deleted
currently, you have to enter some minimal asset information first, into the asset module (Assets -> Add Asset), and after scanning type its serial number to connect it together (configuration details like OS, IP, Components from Scan and basic hardware info like model, sn, invoice number and so on from Assets module)
whoisearth
@whoisearth
Mar 27 2015 12:25
@vi4m installed latest docker install to my RHEL system tried again still no scan from linux. I have the SSH_LINUX password set as the local root password and simply trying to scan itself and it's giving the same error where can I find the logs related to the ssh_linux plugin?
whoisearth
@whoisearth
Mar 27 2015 12:38
on the development branch anyone else seen this? -
Collecting ralph-assets==2.4.0 (from ralph==2.2.0)
Could not find a version that satisfies the requirement ralph-assets==2.4.0 (from ralph==2.2.0) (from versions: 1.0.0, 1.0.1, 1.2.6, 1.2.7, 1.2.8, 1.2.9, 1.2.13, 2.0.0rc1, 2.2.0, 2.3.0)
to get around it I've been vi setup.py and changing the following line 'ralph_assets==2.4.0', to 'ralph_assets==2.3.0',
rerun on make install then gets past that part
Pierre-Yves Dubreucq
@pydubreucq
Mar 27 2015 12:52
I have this one too :

Downloading/unpacking pytz==2013.6 (from ralph==2.2.0)
Downloading pytz-2013.6.tar.bz2 (177kB): 177kB downloaded
Running setup.py (path:/home/ralph/build/pytz/setup.py) egg_info for package pytz

warning: no files found matching '*.pot' under directory 'pytz'
warning: no previously-included files found matching 'test_zdump.py'

Requirement already satisfied (use --upgrade to upgrade): pyzabbix>=0.1 in /home/ralph/lib/python2.7/site-packages (from ralph==2.2.0)
Downloading/unpacking ralph-assets==2.4.0 (from ralph==2.2.0)
Could not find a version that satisfies the requirement ralph-assets==2.4.0 (from ralph==2.2.0) (from versions: 1.0.0, 1.0.1, 1.2.13, 1.2.6, 1.2.7, 1.2.8, 1.2.9, 2.0.0-rc1, 2.2.0, 2.3.0)
Cleaning up...
No distributions matching the version for ralph-assets==2.4.0 (from ralph==2.2.0)
Storing debug log for failure in /home/ralph/.pip/pip.log
make: * [install] Error 1

I'm trying to install from sources
whoisearth
@whoisearth
Mar 27 2015 12:54
yeah it's weird. when I run make install all the requirements go through and it says it's making directory /home/ralph/project/src but the folder isn't there
and ralph makeconf returns No handlers could be found for logger "pluggableapp" Error: No module named scrooge
currently spinning up the latest docker in my home lab as I have full access to all roots there to see if I have better luck there
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 12:56
@all: yesterday we've changed the docker repo into the allegrogroup/ralph:latest
it is the official repo
whoisearth
@whoisearth
Mar 27 2015 12:58
@vi4m thnx. I spun up two clean vms this morning to try fresh so using the allegrogroup/ralph:latest here
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 12:58
@whoisearth so is the scan working inside the docker?
we raised the permissions on which the scan is working and tried on some hosts, and just did the job
whoisearth
@whoisearth
Mar 27 2015 12:59
no still doesn't work inside the docker
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 13:00
did you try to scan docker itself ? 127.0.0.1
whoisearth
@whoisearth
Mar 27 2015 13:01
if I scan 127.0.0.1 the only other scan that works is snmp_lldp
so dns_hostname, software and snmp_lldp
vi4m @vi4m is checking this
whoisearth
@whoisearth
Mar 27 2015 13:02
and if I do the local IP instead of 127.0.0.1 which is the same box, it only returns software
whoisearth
@whoisearth
Mar 27 2015 13:07
ah think I might have a root on some of the problems
centos 6.6 I need to upgrade my kernel for docker
nm seems like a red herring. kernel warnings are common in docker
whoisearth
@whoisearth
Mar 27 2015 13:13
@pydubreucq have you tried changing the line on ralph_assets? Does it get you through the make install?
curious if you get the same issue with folders not creating for /home/ralph/project/src
whoisearth
@whoisearth
Mar 27 2015 13:24
pip install scrooge solved my issue on the development install
whoisearth
@whoisearth
Mar 27 2015 13:45
@vi4m to confirm I'm doing the following -
docker run -i -t -name mysql_data -v /var/lib/mysql -v /home/ralph/.ralph busybox /bin/sh -c "chown default /home/ralph; chown default /home/ralph/.ralph"
docker run -P -t -i -volumes-from mysql_data allegrogroup/ralph:latest /bin/bash /home/ralph/init.sh
docker run -P -p 8000:8000 -t -i -volumes-from mysql_data allegrogroup/ralph:latest
I then run
docker run -u ralph -P -t -i -volumes-from mysql_data allegrogroup/ralph:latest vi /home/ralph/.ralph/settings
and add in the SSH_USER and SSH_PASSWORD as my global root account
I then cancel the process and rerun
docker run -P -p 8000:8000 -t -i -volumes-from mysql_data allegrogroup/ralph:latest
I'm then loading http://localhost:8000 and doing a scan on 127.0.0.1, or 10.77.1.x all reproduce the same result
Piotr Jarolewski
@szok
Mar 27 2015 13:51
Hi, if you change .ralp/settings must have reload gunicorn
whoisearth
@whoisearth
Mar 27 2015 13:52
rerunning this would do that though would it not? docker run -P -p 8000:8000 -t -i -volumes-from mysql_data allegrogroup/ralph:latest
Piotr Jarolewski
@szok
Mar 27 2015 13:53
Docker restart resets the ralph settings
If you restart Docker, is set to the default SSH user password test pass
whoisearth
@whoisearth
Mar 27 2015 13:54
ah ok I'm an idiot :)
Piotr Jarolewski
@szok
Mar 27 2015 13:55
And if you start at the address 127.0.0.1 QuickScan plugins ssh_linux login on your own container
whoisearth
@whoisearth
Mar 27 2015 13:56
do you have the reload gunicorn step documented anywhere?
ah so 127.0.0.1 should work regardless then? if so then it's not
ran the following - sudo docker run -u ralph -P -t -i -volumes-from mysql_data allegrogroup/ralph:latest /home/ralph/bin/gunicorn reload
2015-03-27 09:54:05 [1] [INFO] Reason: Worker failed to boot.
Piotr Jarolewski
@szok
Mar 27 2015 13:59
No, no, if you change any settings on the already running application when you need to restart the gunicorna.
But if you're running our clean image it defaults to scan at the address 127.0.0.1 for plugins ssh_linux, snmp
docker exec -it CONTAINER_ID /bin/bash
supervisorctl
restart gunicorn
:)
aaa and restart RQ Workers
This message was deleted
restart rqworker : *
whoisearth
@whoisearth
Mar 27 2015 14:02
k thnx. once I figure out how to get the container_ID I'll run those steps, but as you've said, clean image it should scan 127.0.0.1 which it isn't
Piotr Jarolewski
@szok
Mar 27 2015 14:04
docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3ae85a40b315 allegrogroup/ralph:latetst "/root/start.sh" 2 hours ago Up 2 hours 0.0.0.0:8000->8000/tcp, 0.0.0.0:49156->22/tcp clever_thompson
ok, check this: stop your container, and next:
next
docker run -P -t -i -volumes-from mysql_data allegrogroup/ralph:latest /bin/bash /home/ralph/init.sh
docker run -i -t -name mysql_data -v /var/lib/mysql -v /home/ralph/.ralph busybox /bin/sh -c "chown default /home/ralph; chown default /home/ralph/.ralph"
docker run -P -p 8000:8000 -t -i -volumes-from mysql_data allegrogroup/ralph:latest
And open your browser, codkerip:8000, And Core -> QuickScan, -> Scan.
On clean image, scan self should work correctly.
whoisearth
@whoisearth
Mar 27 2015 14:08
k I'll confirm again hold on
Piotr Jarolewski
@szok
Mar 27 2015 14:09
codkerip:8000* -> docker ip: 8000 :)
whoisearth
@whoisearth
Mar 27 2015 14:18
need about 15 mins wish me luck. as long as I know 127.0.0.1 works I can try and figure out the rest
Piotr Jarolewski
@szok
Mar 27 2015 14:26
OK :)
whoisearth
@whoisearth
Mar 27 2015 14:38
ok so going on the steps you gave me. step 2 fails here -
FATA[0477] Error response from daemon: Container mysql_data not found. Impossible to mount its volumes
built another clean image so nothing potentially breaking anything
Piotr Jarolewski
@szok
Mar 27 2015 14:38
first:
docker run -i -t -name mysql_data -v /var/lib/mysql -v /home/ralph/.ralph busybox /bin/sh -c "chown default /home/ralph; chown default /home/ralph/.ralph"
next init.sh, and run
whoisearth
@whoisearth
Mar 27 2015 14:39
unless the docs are updated these steps were what I was doing before. let me run through them again
Piotr Jarolewski
@szok
Mar 27 2015 14:41
Do so as described in the documentation. That should do it.
I have to go, I come back as 2-3 hours
whoisearth
@whoisearth
Mar 27 2015 14:42
on step 3 in the installs this comes in every time for me - NameError: name 'blade_chassis_model' is not defined
not sure if that's standard though
Piotr Jarolewski
@szok
Mar 27 2015 14:44
this is bug in ralph fixtures.
hm
whoisearth
@whoisearth
Mar 27 2015 14:45
and scan of 127.0.0.1 doesn't work. http://i.imgur.com/hGr5fMK.png
that's after doing a fresh install of OS only doing the 4 steps, doing core-quickscan and then scanning 127.0.0.1
Piotr Jarolewski
@szok
Mar 27 2015 14:46
this scan is ok, 3 plugins works, ssh_linux not work
check:
docker exec -it DOCKER_ID /bin/bash
whoisearth
@whoisearth
Mar 27 2015 14:47
ah ok so this is expected. k so I'll look at your other steps to get the ssh_linux going by restarting gunicore
gunicorn
Piotr Jarolewski
@szok
Mar 27 2015 14:47
ps aux | grep ssh
whoisearth
@whoisearth
Mar 27 2015 14:48
[root@prappvmralph01 ~]# ps aux |grep ssh
root 995 0.0 0.0 66688 1260 ? Ss 06:19 0:00 /usr/sbin/sshd
root 1997 0.0 0.2 100448 4348 ? Ss 06:23 0:00 sshd: root@notty
root 2001 0.0 0.1 57708 2636 ? Ss 06:23 0:00 /usr/libexec/openssh/sftp-server
root 2004 0.0 0.2 100448 4364 ? Ss 06:23 0:00 sshd: root@pts/0
root 4650 0.0 0.0 49988 836 ? Ss 06:39 0:00 /usr/sbin/sshd
root 5117 2.4 0.2 100448 4428 ? Ss 06:43 0:00 sshd: root@pts/2
root 5135 0.0 0.0 103248 864 pts/2 S+ 06:44 0:00 grep ssh
Piotr Jarolewski
@szok
Mar 27 2015 14:48
it’s ok.
password: pass
?
whoisearth
@whoisearth
Mar 27 2015 14:49
root@9135257d834f:/# ssh test@localhost
test@localhost's password:
Write failed: Broken pipe
Piotr Jarolewski
@szok
Mar 27 2015 14:50
hm, run
docker run -P -t -i -volumes-from mysql_data allegrogroup/ralph:latest /bin/bash /home/ralph/init.sh
hm
adduser test
set password pass
and loggin ssh ?
whoisearth
@whoisearth
Mar 27 2015 14:54
user test exists
root@9135257d834f:/# adduser test
adduser: The user `test' already exists.
Piotr Jarolewski
@szok
Mar 27 2015 14:55
echo "test:pass"|chpasswd
and login ssh@localhost
whoisearth
@whoisearth
Mar 27 2015 14:56
root@9135257d834f:/# echo "test:pass"|chpasswd
returns nothing
Piotr Jarolewski
@szok
Mar 27 2015 14:56
it’s ok :)
sign on ssh test@localhost
work ?
whoisearth
@whoisearth
Mar 27 2015 14:57
ssh test@localhost works but need the password, going to reset it to confirm
Piotr Jarolewski
@szok
Mar 27 2015 14:58
ok
yes

root@74c3f6f62cbb:/# echo "test:pass"|chpasswd
root@74c3f6f62cbb:/# ssh test@localhost
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is f2:14:96:4a:8a:b3:55:2f:f0:1b:a9:a0:f1:85:20:ff.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
test@localhost's password:
Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 3.18.5-tinycore64 x86_64)

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

test@74c3f6f62cbb:~$

now quickscan ssh_plugins should work
whoisearth
@whoisearth
Mar 27 2015 14:59
yeah I'm guessing this is as I'm using centos. thinking of spinning up an ubuntu server
Piotr Jarolewski
@szok
Mar 27 2015 15:00
I have to go, I come back as 2-3 hours
whoisearth
@whoisearth
Mar 27 2015 15:05
thnx. seems the ssh setup is different with centos so I'm spinning up an ubuntu install so I can completely mirror what you're doing
flashput
@flashput
Mar 27 2015 15:16
@whoisearth can you save quick scan device?
I can scan and get enough information , but can’t save
whoisearth
@whoisearth
Mar 27 2015 15:54
ah ok we're getting somewhere. ubuntu server installed now. docker running, ralph running.
ran this docker run -P -t -i -volumes-from mysql_data allegrogroup/ralph:latest /bin/bash
got this - root@eb500cc411fa:/# ssh test@localhost
ssh: connect to host localhost port 22: Connection refused
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 16:15
@whoisearth remove /bin/bash part of the command to spin up everything(including ssh daemon) just docker run -P -t -i -volumes-from mysql_data allegrogroup/ralph:latest
whoisearth
@whoisearth
Mar 27 2015 16:19
thnx I just wanted to confirm that ssh test@localhost would work, running that command launches ralph doesn't give me access to docker command line that's why was running the /bin/bash
but going by what's said, 127.0.0.1 scan is successful
ah got it need to run this docker run -P -t -i -volumes-from mysql_data allegrogroup/ralph:latest sh
so in there did ssh test@localhost and got this ssh: connect to host localhost port 22: Connection refused
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 16:22
if you want to access docker commandline while running ralph - no problem.
  1. spin up ralph docker run -P -t -i -volumes-from mysql_data allegrogroup/ralph:latest
whoisearth
@whoisearth
Mar 27 2015 16:25
so to confirm this is the correct output when scanning 127.0.0.1? http://i.imgur.com/203zx2O.png
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 16:25
and 2. enter docker by typing: docker exec -ti 76b28bdd084f /bin/bash where 76b28bdd084f is the id of running container id (docker ps -l will show you in the first column)
whoisearth
@whoisearth
Mar 27 2015 16:34
so then if I run docker run -P -t -i -volumes-from mysql_data allegrogroup/ralph:latest vi /home/ralph/.ralph/settings I can modify to add my ssh_user and ssh_password but then how am I restarting gunicorn?
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 16:36
please always use docker exec on running docker to modify files for example config files, than from inside you can restart supervisor - it will restart all required services
flashput
@flashput
Mar 27 2015 16:37
!http://i.imgur.com/dffRfqT.png save problem, @vi4m , how to figure it out
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 16:37
@flashput go to assets module and add asset
manually. quickscan will extend its information
on this page you will choose this device typing barcode, model or serial number
flashput
@flashput
Mar 27 2015 16:38
OK , I will try
whoisearth
@whoisearth
Mar 27 2015 16:44
@vi4m does the container have supervisor installed or I need to go through the docker docs and install? I'm guessing the latter
Mateusz Kurek
@mkurek
Mar 27 2015 16:51
@whoisearth our docker image has supervisor already installed and it's running mysql, redis, gunicorn and ralph_workers. See https://github.com/allegro/ralph-docker/blob/master/os/supervisord.conf for details
whoisearth
@whoisearth
Mar 27 2015 16:57
ok so my container is running in another ssh connection. I have a new one opened and run this docker exec -it 9cecbb5330ff /bin/bash
then I vi /home/ralph/.ralph/settings and make my changes
then I'm running supervisord ?
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 16:59
service supervisord restart
whoisearth
@whoisearth
Mar 27 2015 17:06
root@9cecbb5330ff:/# service supervisord restart
supervisord: unrecognized service
root@9cecbb5330ff:/# /etc/init.d/supervisord restart
bash: /etc/init.d/supervisord: No such file or directory
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 17:07
Maybe supervisor without the d
whoisearth
@whoisearth
Mar 27 2015 17:09
that did it
ok so ssh_user and ssh_password are in my settings. i did a service supervisor restart
still can't quickscan and get another linux server info using the root credentials I've provided
Mateusz Kurek
@mkurek
Mar 27 2015 17:14
do you have any info about ssh_linux plugin in logs (available in gui after scan)?
whoisearth
@whoisearth
Mar 27 2015 17:19
root@9cecbb5330ff:/# service supervisord restart
supervisord: unrecognized service
root@9cecbb5330ff:/# /etc/init.d/supervisord restart
bash: /etc/init.d/supervisord: No such file or directory
is there anywhere the logs are more verbose, or a way I can run the command from cli?
Mateusz Kurek
@mkurek
Mar 27 2015 17:27
yes you can - first of all try ralph scan --help and ralph autoscan --help
whoisearth
@whoisearth
Mar 27 2015 17:33
ok running /home/ralph/bin/ralph scan 127.0.0.1 -V VERBOSE
interesting that /home/ralph/bin/ralph scan 127.0.0.1 -v 3 is not showing ssh_linux as a plugin

root@9cecbb5330ff:/# /home/ralph/bin/ralph scan 127.0.0.1 -v 3

Scanning using plugin: ssh_ibm_bladecenter x x
Scanning using plugin: hp_oa x x
Scanning using plugin: snmp_macs x
Scanning using plugin: software
Scanning using plugin: dns_hostname
Scanning using plugin: proxmox_2_3 x x
Scanning using plugin: ssh_aix x x
Scanning using plugin: ilo_hp x
Scanning using plugin: ssh_hp_msa x x
Scanning using plugin: snmp_lldp
Scanning using plugin: ssh_proxmox x x
Scanning using plugin: http_supermicro x x
Scanning using plugin: puppet x
Scanning using plugin: ssh_xen x x
Scanning using plugin: ssh_onstor x x
Scanning using plugin: http_ibm_system_x x x
Scanning using plugin: ssh_cisco_asa x x
Scanning using plugin: ssh_cisco_catalyst x x
Scanning using plugin: ssh_juniper x x

All done!
Success: ralph.scan.plugins.dns_hostname
Success: ralph.scan.plugins.snmp_lldp
Success: ralph.scan.plugins.software

✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 17:45
All done!
----------------------------------------
Successful plugin: ralph.scan.plugins.dns_hostname
Result data:
{u'hostname': 'localhost'}
----------------------------------------
Successful plugin: ralph.scan.plugins.snmp_lldp
Result data:
{u'connections': [], u'system_ip_addresses': [u'127.0.0.1']}
----------------------------------------
Successful plugin: ralph.scan.plugins.software
Result data:
u''
----------------------------------------
Successful plugin: ralph.scan.plugins.ssh_linux
Result data:
{u'hostname': 'cab52af9f853',
 u'mac_addresses': [u'0242AC110070'],
 u'system_cores_count': 8,
 u'system_family': 'Linux',
 u'system_ip_addresses': [u'127.0.0.1'],
 u'system_label': u'#1 3.18.5-tinycore64',
 u'system_memory': 2007,
 u'system_storage': 93020}
this is the output of /home/ralph/bin/ralph scan 127.0.0.1 -V VERBOSE
whoisearth
@whoisearth
Mar 27 2015 17:51

mine -

All done!

Successful plugin: ralph.scan.plugins.dns_hostname
Result data:

{u'hostname': 'localhost'}

Successful plugin: ralph.scan.plugins.snmp_lldp
Result data:

{u'connections': [], u'system_ip_addresses': [u'127.0.0.1']}

Successful plugin: ralph.scan.plugins.software
Result data:
u''

✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 17:51
This message was deleted

```cat ~/.ralph/settings

SSH_USER = 'test'
SSH_PASSWORD = 'pass'
```

whoisearth
@whoisearth
Mar 27 2015 17:55
k well regardless it's not using the ssh_linux no idea why
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 17:56
inside the docker you can test if you can login
from docker: ssh localhost -l test
whoisearth
@whoisearth
Mar 27 2015 17:56
that's inside the docker. I'm running - docker exec -it 9cecbb5330ff /bin/bash
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 17:56
yes, and from the docker did you test if you can login to localhost?
using your ssh_user and ssh_password?
mine works. - login test, and type pass
whoisearth
@whoisearth
Mar 27 2015 17:57
ah can't remember if I posted this - ssh: connect to host localhost port 22: Connection refused
ssh is running
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 17:57
ps aux | grep ssh ?
whoisearth
@whoisearth
Mar 27 2015 17:58
root 17532 0.0 0.0 6508 620 ? S+ 17:57 0:00 grep --color=auto ssh
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 17:58
not running?
whoisearth
@whoisearth
Mar 27 2015 17:58
ah I see so running on the server but not running inside docker
?
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 17:59
yes
whoisearth
@whoisearth
Mar 27 2015 18:00
hmmm. back in docker. it's there..
root@9cecbb5330ff:/# apt-get install openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssh-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
service ssh start isn't doing anything
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 18:01
/etc/init.d/ssh start
whoisearth
@whoisearth
Mar 27 2015 18:02

root@9cecbb5330ff:/# /etc/init.d/ssh start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service ssh start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start ssh

start ssh too. nothing launches it.
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 18:04
when did you update this docker image last time?
today?
whoisearth
@whoisearth
Mar 27 2015 18:05
today. fresh install probably 3 hours ago?
ran apt-get upgrade openssh-server now service ssh start works but still not launching ssh
✪ vi4m Marcin Kliks
@vi4m
Mar 27 2015 18:07
any logs?
maybe it conflicts with ssh on your host ?
whoisearth
@whoisearth
Mar 27 2015 18:09
interesting might be on to something there. it rejected my call to stop
going to google bbsoon
whoisearth
@whoisearth
Mar 27 2015 18:19
yeah I'm not sure what's going on but this seems like a docker issue I'm going to have to dig further
Piotr Jarolewski
@szok
Mar 27 2015 19:12
Tell us what you have versions of system. This is CentOS in version?
whoisearth
@whoisearth
Mar 27 2015 19:27
this is on the ubuntu 12.04 system
the only thing I did on install as tell it to include openssh and then after install I updated the kernel
so clean ubuntu 12.04
sudo apt-get update
sudo apt-get install linux-image-generic-lts-trusty
sudo reboot
sudo apt-get update
sudo apt-get install wget
wget -qO- https://get.docker.com/ | sh
sudo usermod -aG docker adminrp
after all that I did the ralph installation instructions for docker
whoisearth
@whoisearth
Mar 27 2015 20:56
ok so in running a manual scan seeing this in concerns to the ssh_linux -
ralph.scan.plugins.ssh_linux warning No snmp found
whoisearth
@whoisearth
Mar 27 2015 22:02
@flashput question for you - when you do a quickscan what shows up under these fields?
http://i.imgur.com/VEIbN5A.png
I'm thinking my issues might be related to a network setup but not sure as I see the same thing at work and I'd hope the Network Admins have setup our work properly :)