-
Notifications
You must be signed in to change notification settings - Fork 217
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
cluster kafka db worker doesnt recognize partitions #360
Comments
I commented out get_stats() just to see if it would work. I can get data base workers to work; but then I get a different error starting starategy workers. |
Hey @danmsf you've put the stack trace without exception preceding it, so I can't identify what is the issue. The partitions are meant to be space separated, not comma. What is that different error from strategy workers? |
I was getting an Error that said: INFO:manager:-------------------------------------------------------------------------------- I changed /usr/lib/python3.6/dist-packages/frontera/contrib/backends/hbase/init.py to: INFO:manager:Frontier Manager Started! so that probably was not a good fix, and mabye my settings are off? |
Also i would update the docs to say: and in the common module script: (I made a 'frontier-scoring' topic and lost some time figuring that out... its mentioned in the kafka topic creation correctly) |
hi @danmsf there is probably an issue with configuration. Have you specified BACKEND properly? |
post your configs here, pls |
I copy pasted from the docs - so everything is the same as here: https://frontera.readthedocs.io/en/latest/topics/cluster-setup.html . in spider module: in common module: running on: And i get the NoneType not callable (first error) error above when starting the strategy worker |
If it helps to point me in the right direction, I put a print() in the init script: and the output is: INFO:manager:-------------------------------------------------------------------------------- |
No idea what's happening. This code shouldn't execute any calls to x = [0, 1, 2, None]
for c in x:
if c:
print(c, type(c)) if None is handled correctly, then please specify your shell command. |
That works fine in python. My shell commands are: This to start the Strategy worker (this is where it gets stuck): I think its getting stuck on the 'DomainCache([], maxsize=1000, currsize=0)' object trying to start it. |
I also tried instantiating the DomainCache object in shell: |
The problem is probably connected with how Python evaluates object in if statement https://docs.python.org/3.6/reference/datamodel.html#object.__bool__ |
I found this helpful: If this is the case a local fix could be overloading the |
Hello, Did someone find a solution for this problem? I have the exact same error which I fixed changing the following line:
I'm not sure yet what is causing it so any comment would help :) |
Hi,
Im trying to use cluster configuration. I've created topics in kafka and have it up and running.
Im running into trouble starting the database worker.
Tried:
python -m frontera.worker.db --config config.dbw --no-incoming --partitions 0,1
got an error 0,1 not recognized,
tried:
python -m frontera.worker.db --config config.dbw --no-incoming --partitions 0
I was getting the same issue as in #359, but somehow that stopped happening.
Now I'm getting: that kafka partitions are not recognized or iterrable, see error.
Im using python 3.6 and the frontera from the repo (FYI qzm and cachetools still needed to be installed manually).
Any ideas?
File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.6/dist-packages/frontera/worker/db.py", line 246, in
args.no_scoring, partitions=args.partitions)
File "/usr/lib/python3.6/dist-packages/frontera/worker/stats.py", line 22, in init
super(StatsExportMixin, self).init(settings, *args, **kwargs)
File "/usr/lib/python3.6/dist-packages/frontera/worker/db.py", line 115, in init
self.slot = Slot(self, settings, **slot_kwargs)
File "/usr/lib/python3.6/dist-packages/frontera/worker/db.py", line 46, in init
self.components = self._load_components(worker, settings, **kwargs)
File "/usr/lib/python3.6/dist-packages/frontera/worker/db.py", line 55, in _load_components
component = cls(worker, settings, stop_event=self.stop_event, **kwargs)
File "/usr/lib/python3.6/dist-packages/frontera/worker/components/scoring_consumer.py", line 24, in init
self.scoring_log_consumer = scoring_log.consumer()
File "/usr/lib/python3.6/dist-packages/frontera/contrib/messagebus/kafkabus.py", line 219, in consumer
return Consumer(self._location, self._enable_ssl, self._cert_path, self._topic, self._group, partition_id=None)
File "/usr/lib/python3.6/dist-packages/frontera/contrib/messagebus/kafkabus.py", line 60, in init
self._partitions = [TopicPartition(self._topic, pid) for pid in self._consumer.partitions_for_topic(self._topic)]
The text was updated successfully, but these errors were encountered: