Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eve database query #9

Closed
coreySean opened this issue Jun 19, 2023 · 3 comments
Closed

Eve database query #9

coreySean opened this issue Jun 19, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@coreySean
Copy link

Is there some config or something I need for eve database to setup? Or can i disable mondodb logging somewhere? I couldn't find the setting or documentation for this.

Reading the history py file:
self.client = MongoClient(ag.mongo_logging['mining_bot']['mongo_host'],
username=os.getenv("eve_username"),
password=os.getenv("eve_password"))
self.db = self.client[ag.mongo_logging['mining_bot']['db_name']]
self.collection = self.db[ag.mongo_logging['mining_bot']

Which seems to be configured from ai_pilot_config_v2.json (but I cannot se wher eve_username / eve_password is from?

So far i've followed the tutorial and have configured everything but when tryingt o run the headless miner i get the below crash.

,
"mongo_logging": {
"mining_bot": {
"mongo_host": "mongodb+srv://cluster0.ufnlr1u.mongodb.net/?retryWrites=true&w=majority",
"mongo_authMechanism": "SCRAM-SHA-256",
"db_name": "Eve",
"collection_name": "History"
},
"mongo_logging": {
"mining_bot": {
"mongo_host": "mongodb+srv://cluster0.ufnlr1u.mongodb.net/?retryWrites=true&w=majority",
"mongo_authMechanism": "SCRAM-SHA-256",
"db_name": "Eve",
"collection_name": "History"
}

Is there a db structure I can copy from somewhere to instantiate the local db or should this be accessing to an online db?

['collection_name']]
self.temp = 0

`Traceback (most recent call last):
File "C:\Users\Corey\AppData\Local\Programs\Python\Python311\Lib\site-packages\pymongo\srv_resolver.py", line 89, in _resolve_uri
results = _resolve(
^^^^^^^^^
File "C:\Users\Corey\AppData\Local\Programs\Python\Python311\Lib\site-packages\pymongo\srv_resolver.py", line 43, in _resolve
return resolver.resolve(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Corey\AppData\Local\Programs\Python\Python311\Lib\site-packages\dns\resolver.py", line 1368, in resolve
return get_default_resolver().resolve(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Corey\AppData\Local\Programs\Python\Python311\Lib\site-packages\dns\resolver.py", line 1201, in resolve
(nameserver, port, tcp, backoff) = resolution.next_nameserver()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Corey\AppData\Local\Programs\Python\Python311\Lib\site-packages\dns\resolver.py", line 704, in next_nameserver
raise NoNameservers(request=self.request, errors=self.errors)
dns.resolver.NoNameservers: All nameservers failed to answer the query _mongodb._tcp.cluster0.ufnlr1u.mongodb.net. IN SRV:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Corey\Desktop\EVE-Online-Bot-main\Start_AI_Pilot.py", line 53, in
start_mining(params.config_file)
File "C:\Users\Corey\Desktop\EVE-Online-Bot-main\AI_Pilot\Objectives\Mining\StartMining.py", line 28, in start_mining
Bot.ag.log = History(Bot.ag)
^^^^^^^^^^^^^^^
File "C:\Users\Corey\Desktop\EVE-Online-Bot-main\AI_Pilot\Audit_History\History.py", line 29, in init
self.client = MongoClient(ag.mongo_logging['mining_bot']['mongo_host'],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Corey\AppData\Local\Programs\Python\Python311\Lib\site-packages\pymongo\mongo_client.py", line 736, in init`

@darkmatter2222
Copy link
Owner

Great idea!

On mobile ATM, however this class can have a global config value added to bypass and disable.

https://github.com/darkmatter2222/EVE-Online-Bot/blob/main/AI_Pilot/Audit_History/History.py

Time is limited right now, feel free to submit a PR and I can test/approve. Otherwise, this is a great engagement I can add in some time.

@darkmatter2222
Copy link
Owner

@coreySean,
here is an example of how to disable audit trail, (#10)

Feel free to try those change out. When I have more time, I will test and merge in.

Note, the audit feature we are discussing is not critical to the functionality of the bot. it only uploads activity to a MongoDB do the performance of the pot can be measured and monitored remotely. the PR I have linked above disabled that feature entirely.

However, if you want to get it working you will need to be proficient in mongo and python and stand up a cloud mongo cluster and enter your mongo creds in a .env file in your user profile. Considering the nature of your question, it might be easier to disable the mongo audit trail.

@darkmatter2222 darkmatter2222 self-assigned this Jun 26, 2023
@darkmatter2222 darkmatter2222 added the enhancement New feature or request label Jun 26, 2023
@darkmatter2222 darkmatter2222 pinned this issue Jun 26, 2023
@darkmatter2222
Copy link
Owner

merged as part of this #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants