Closed ghost closed 4 years ago
For the first issue, I think you can safely remove bttf from the requirements.txt, things should work without it. I'll see if we can just remove that altogether soon.
For the second issue, could you please show me the output of pip3 show elasticsearch
?
It sounds like the ElasticSearch pip module might be an incompatible version.
If you see a >= 7.0 version here, please try: pip3 install "elasticsearch<7"
which will downgrade your elasticsearch client to an older version.
I'll look at whether we can dispense with the source_include altogether as well...
It turns out I was running with elasticsearch module version 7.6.0
. After downgrading it to version 6.8.1
I'm getting Invalid or missing API/ABI version in database kibble!
cos@ubuntu:~/temp/kibble-scanners$ curl -X GET "localhost:9200/?pretty"
{
"name" : "ubuntu",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "6DoJlyXeQdqaGFQRMib71g",
"version" : {
"number" : "7.6.2",
"build_flavor" : "oss",
"build_type" : "deb",
"build_hash" : "ef48eb35cf30adf4db14086e8aabd07ef6fb113f",
"build_date" : "2020-03-26T06:34:37.794943Z",
"build_snapshot" : false,
"lucene_version" : "8.4.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
cos@ubuntu:/var/www/kibble/setup$ sudo python3 setup.py
...
...
...
Okay, I got all I need, setting up Kibble...
Creating index kibble_api
Creating index kibble_ci_build
Creating index kibble_ci_queue
Creating index kibble_code_commit
Creating index kibble_code_commit_unique
Creating index kibble_code_modification
Creating index kibble_evolution
Creating index kibble_file_history
Creating index kibble_forum_post
Creating index kibble_forum_topic
Creating index kibble_ghstats
Creating index kibble_im_stats
Creating index kibble_im_ops
Creating index kibble_im_msg
Creating index kibble_issue
Creating index kibble_logstats
Creating index kibble_email
Creating index kibble_mailstats
Creating index kibble_mailtop
Creating index kibble_organisation
Creating index kibble_view
Creating index kibble_publish
Creating index kibble_source
Creating index kibble_stats
Creating index kibble_social_follow
Creating index kibble_social_followers
Creating index kibble_social_follower
Creating index kibble_social_person
Creating index kibble_uisession
Creating index kibble_useraccount
Creating index kibble_message
Creating index kibble_person
Indices created! {'acknowledged': True, 'shards_acknowledged': True, 'index': 'kibble_person'}
Creating administrator account
Account created!
../api/yaml/kibble.yaml already exists! Writing to ../api/yaml/kibble.yaml.tmp instead
Writing Kibble config (../api/yaml/kibble.yaml.tmp)
All done, Kibble should...work now :)
cos@ubuntu:/var/www/kibble$ curl http://localhost:9200/_cat/indices
yellow open kibble_social_follower 6-dHZ1JhRVmJNBn8gkRVxw 5 1 0 0 1.3kb 1.3kb
yellow open kibble_file_history KTRE2H7dTS-YeZiQh9v3Lw 5 1 0 0 1.3kb 1.3kb
yellow open kibble_source THZYCPoDRCuIpN5uYsOjbA 5 1 1 0 5.9kb 5.9kb
yellow open kibble_view y7u56OaCQImYuMIiCo6jBQ 5 1 0 0 1.3kb 1.3kb
yellow open kibble_social_followers 3mqxh2PeQvOugMNmnY2cAA 5 1 0 0 1.3kb 1.3kb
yellow open kibble_mailtop R0dLPudlQfar_yX8B758tg 5 1 0 0 1.3kb 1.3kb
yellow open kibble_im_msg orKAoiVUTIGp-LRHuB9ppA 5 1 0 0 1.3kb 1.3kb
yellow open kibble_mailstats 9qasGXX3QSmTTHDNSxbxDQ 5 1 0 0 1.3kb 1.3kb
yellow open kibble_evolution 9tF5HSy9QRiIQcj3VKvx5Q 5 1 0 0 1.3kb 1.3kb
yellow open kibble_code_modification sH5BBhOZSMO5GHohVn-_gw 5 1 0 0 1.3kb 1.3kb
yellow open kibble_logstats KWre3KjYQMey0k8lwRurYg 5 1 0 0 1.3kb 1.3kb
yellow open kibble_api rkubLmLKQFaAszjxMpIj_g 5 1 1 0 4.8kb 4.8kb
yellow open kibble_code_commit P4WYrMzYQKCY-kOq3bn4IQ 5 1 0 0 1.3kb 1.3kb
yellow open kibble_im_stats QLu91uZMSRmMbe_YvlMwXg 5 1 0 0 1.3kb 1.3kb
yellow open kibble_ci_build 2DD2ul39R0uEeyX6Gt7AHQ 5 1 0 0 1.3kb 1.3kb
yellow open kibble_forum_topic -7bMi_PqRvGOsCumPj-ERw 5 1 0 0 1.3kb 1.3kb
yellow open kibble_ghstats W6Xp09CgTFualUkQShRbGA 5 1 0 0 1.3kb 1.3kb
yellow open kibble_useraccount EwbozIvrTrWST1oODz0yvA 5 1 1 0 7.6kb 7.6kb
yellow open kibble_ci_queue _QDyVycES4iV06YiRDfVdQ 5 1 0 0 1.3kb 1.3kb
yellow open kibble_social_follow v36Z9dBbQPqoQj2w_E2z4A 5 1 0 0 1.3kb 1.3kb
yellow open kibble_email Xlf_A-JDRViul8xvcHxLug 5 1 0 0 1.3kb 1.3kb
yellow open kibble_publish JHVAlU6cSLa9sjBH2AQ09A 5 1 0 0 1.3kb 1.3kb
yellow open kibble_message pZXzm3k1QvqGPW0uAvCJLA 5 1 0 0 1.3kb 1.3kb
yellow open kibble_organisation Kt7tqlvSRi-dRXfP0kDbhg 5 1 1 0 5.6kb 5.6kb
yellow open kibble_person yfuI2fGaRea7zmcAJpndoA 5 1 0 0 1.3kb 1.3kb
yellow open kibble_stats djtOMcM0QW6AAiXvpofHXA 5 1 0 0 1.3kb 1.3kb
yellow open kibble_forum_post Cbt5WkALQ86aRN5WsAtZMw 5 1 0 0 1.3kb 1.3kb
yellow open kibble_im_ops 37XncVh8QyiYPN8Tk9i-Bg 5 1 0 0 1.3kb 1.3kb
yellow open kibble_issue ou5-56zeSg-tG8pOBeRolw 5 1 0 0 1.3kb 1.3kb
yellow open kibble_social_person XCrdhLaRR86miG7p9iBzMw 5 1 0 0 1.3kb 1.3kb
yellow open kibble_uisession Bk6zyBIuR9C8QTUotolDQw 5 1 4 0 16.9kb 16.9kb
yellow open kibble_code_commit_unique TQJGIEp6T0mlqI4N91CBVA 5 1 0 0 1.3kb 1.3kb
And then:
cos@ubuntu:~/temp/kibble-scanners$ python3 src/kibble-scanner.py
[core]: Loaded plugins/scanners/git-sync v/0.1.2 (Sync plugin for Git repositories)
[core]: Loaded plugins/scanners/git-census v/0.1.0 (Census Scanner for Git)
[core]: Loaded plugins/scanners/git-sloc v/0.1.0 (SloC Counter for Git)
[core]: Loaded plugins/scanners/git-evolution v/0.1.0 (Git Evolution Scanner)
[core]: Loaded plugins/scanners/jira v/0.1.0 (Scanner for Atlassian JIRA)
[core]: Loaded plugins/scanners/ponymail v/0.1.0 (Scanner plugin for Apache Pony Mail)
[core]: Loaded plugins/scanners/ponymail-tone v/0.1.0 (Tone/Mood Scanner plugin for Apache Pony Mail)
[core]: Loaded plugins/scanners/ponymail-kpe v/0.1.0 (Key Phrase Extraction plugin for Apache Pony Mail)
[core]: Loaded plugins/scanners/pipermail v/0.1.0 (Scanner for GNU Mailman Pipermail)
[core]: Loaded plugins/scanners/github-issues v/0.1.0 (Scanner for GitHub Issues)
[core]: Loaded plugins/scanners/bugzilla v/0.1.0 (Scanner for BugZilla)
[core]: Loaded plugins/scanners/gerrit v/0.1.1 (Scanner for Gerrit Code Review)
[core]: Loaded plugins/scanners/jenkins v/0.1.0 (Scanner for Jenkins CI)
[core]: Loaded plugins/scanners/buildbot v/0.1.0 (Scanner for Buildbot)
[core]: Loaded plugins/scanners/travis v/0.1.0 (Scanner for Travis CI)
[core]: Loaded plugins/scanners/discourse v/0.1.0 (Scanner for Discourse Forums)
[core]: Kibble Scanner v/0.1.0 starting
src/kibble-scanner.py:122: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(open(CONFIG_FILE))
[core]: Loaded YAML config from conf/config.yaml
[core]: Using direct ElasticSearch broker model
[core]: Connecting to ElasticSearch database at localhost:9200...
[core]: Connected!
[core]: This is a type-less DB, expanding database names instead.
[core]: We're using ES >= 7.x, NO DOC_TYPE!
Invalid or missing API/ABI version in database kibble! Please ensure the database has been primed by setup.py
What is the output of curl http://localhost:9200/kibble_api/_doc/current?pretty
?
the /_doc
bit may be optional depending on the version of ES, not sure
cos@ubuntu:/var/www/kibble/setup$ curl http://localhost:9200/kibble_api/_doc/current?pretty
{
"_index" : "kibble_api",
"_type" : "_doc",
"_id" : "current",
"_version" : 1,
"_seq_no" : 0,
"_primary_term" : 1,
"found" : true,
"_source" : {
"apiversion" : "0.1.0",
"dbversion" : 2
}
}
Could you try pulling in the last change in src/plugins/kibbleES.py and see what error it spits out when you run now?
FWIW, the DB is the correct version, but there seems to be an issue with fetching the db document for tests
Here's what I get now:
cos@ubuntu:~/temp/kibble-scanners$ python3 src/kibble-scanner.py
[core]: Loaded plugins/scanners/git-sync v/0.1.2 (Sync plugin for Git repositories)
[core]: Loaded plugins/scanners/git-census v/0.1.0 (Census Scanner for Git)
[core]: Loaded plugins/scanners/git-sloc v/0.1.0 (SloC Counter for Git)
[core]: Loaded plugins/scanners/git-evolution v/0.1.0 (Git Evolution Scanner)
[core]: Loaded plugins/scanners/jira v/0.1.0 (Scanner for Atlassian JIRA)
[core]: Loaded plugins/scanners/ponymail v/0.1.0 (Scanner plugin for Apache Pony Mail)
[core]: Loaded plugins/scanners/ponymail-tone v/0.1.0 (Tone/Mood Scanner plugin for Apache Pony Mail)
[core]: Loaded plugins/scanners/ponymail-kpe v/0.1.0 (Key Phrase Extraction plugin for Apache Pony Mail)
[core]: Loaded plugins/scanners/pipermail v/0.1.0 (Scanner for GNU Mailman Pipermail)
[core]: Loaded plugins/scanners/github-issues v/0.1.0 (Scanner for GitHub Issues)
[core]: Loaded plugins/scanners/bugzilla v/0.1.0 (Scanner for BugZilla)
[core]: Loaded plugins/scanners/gerrit v/0.1.1 (Scanner for Gerrit Code Review)
[core]: Loaded plugins/scanners/jenkins v/0.1.0 (Scanner for Jenkins CI)
[core]: Loaded plugins/scanners/buildbot v/0.1.0 (Scanner for Buildbot)
[core]: Loaded plugins/scanners/travis v/0.1.0 (Scanner for Travis CI)
[core]: Loaded plugins/scanners/discourse v/0.1.0 (Scanner for Discourse Forums)
[core]: Kibble Scanner v/0.1.0 starting
src/kibble-scanner.py:122: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(open(CONFIG_FILE))
[core]: Loaded YAML config from conf/config.yaml
[core]: Using direct ElasticSearch broker model
[core]: Connecting to ElasticSearch database at localhost:9200...
[core]: Connected!
[core]: This is a type-less DB, expanding database names instead.
[core]: We're using ES >= 7.x, NO DOC_TYPE!
Traceback (most recent call last):
File "src/kibble-scanner.py", line 180, in <module>
main()
File "src/kibble-scanner.py", line 129, in main
broker = plugins.brokers.kibbleES.Broker(config)
File "/home/cos/temp/kibble-scanners/src/plugins/brokers/kibbleES.py", line 318, in __init__
apidoc = es.get(index=es_config['database'], doc_type='api', id = 'current')['_source']
File "/home/cos/temp/kibble-scanners/src/plugins/brokers/kibbleES.py", line 79, in get
return self.ES.get(index = index+'_'+doc_type, id = id)
File "/home/cos/.local/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 84, in _wrapped
return func(*args, params=params, **kwargs)
TypeError: get() missing 1 required positional argument: 'doc_type'
[core]: We're using ES >= 7.x, NO DOC_TYPE!
TypeError: get() missing 1 required positional argument: 'doc_type'
Okay, so clearly an issue with the elasticsearch library then.
Please try upgrading it to >7: pip3 install "elasticsearch>7<8"
ES client 7.x should work now with yesterday's tweaks..
Everything seems peachy. Thank you @Humbedooh . :)
Hello,
I've been able to set-up the Kibble Server and Elastic Search on 2 different Ubuntu Machines and a Windows 10 machine by closely following the docs, however I am experiencing a no-joy moment setting-up kibble-scanners.
Ubuntu 20.04 LTS
,Python 3.8.2
,pip 20.0.2
,gcc 9.3.0
Ubuntu 18.04.4 LTS
,Python 3.6.9
,pip 9.0.1
,gcc 7.5.0
Any ideas?