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

AssertionError in multiprocessing/pool.py #31

Open
marquies opened this issue Jun 4, 2016 · 7 comments
Open

AssertionError in multiprocessing/pool.py #31

marquies opened this issue Jun 4, 2016 · 7 comments

Comments

@marquies
Copy link

marquies commented Jun 4, 2016

Hello!

I just tried to run malaria against vernemq server on another host, but I get an AssertionError.

Env:

  • OS: Ubuntu 16.04
  • Python: 2.7.11+ (Also tried python3 but failed with a syntax error)
  • mqtt-malaria: Head
./malaria publish -t -n 100 -P 4 -H 10.1.2.2
Completed workers: 0/4
Completed workers: 0/4
Completed workers: 1/4
Completed workers: 2/4
Completed workers: 2/4
Completed workers: 2/4
Completed workers: 2/4
Completed workers: 2/4
Completed workers: 3/4
Completed workers: 4/4
Traceback (most recent call last):
  File "./malaria", line 31, in <module>
    beem.main.main()
  File "/home/osboxes/dev/mqtt-malaria/beem/main.py", line 53, in main
    options.handler(options)
  File "/home/osboxes/dev/mqtt-malaria/beem/cmds/publish.py", line 201, in run
    s = result.get()
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 567, in get
    raise self._value
AssertionError

Maybe I have a bad setup or something else. I can connect to the server via telnet, so this isn't a problem. Could you give me a hint?

@karlp
Copy link
Member

karlp commented Jun 4, 2016

heh, I actually saw that myself yesterday too, first time. No idea what causes it, and it never happened again for me. I think it's something when a process dies unexpectedly? There's no result object from python multiprocessing, no idea how it happens.

@karlp karlp changed the title Trouble while executing malaria AssertionError in multiprocessing/pool.py Jun 4, 2016
@kevingo
Copy link

kevingo commented Aug 21, 2016

got this error , too.

@Asoul
Copy link

Asoul commented Oct 24, 2016

+1 got this error

@sky3d
Copy link

sky3d commented Dec 12, 2016

I've got the same error when I specify outer host or host by the local computer name during publishing. Note that -H localhost or -H 127.0.0.1 works ok
Environment:

  • MacOS: 10.12.1
  • Python 2.7.10
  • mqtt-malaria: last

@sky3d
Copy link

sky3d commented Dec 13, 2016

Hi

I've resolve my problem above by temporary modifying malaria scripts and specifying user and password for remote connection like that:

self.mqttc.username_pw_set(_my_user_, _my_password_)

Note: Files to be changed - mqtt-malaria\beem\listen.py and mqtt-malaria\beem\load.py

Please review the "guest" user can only connect via localhost section at https://www.rabbitmq.com/access-control.html

By default, the guest user is prohibited from connecting to the broker remotely; it can only connect over a loopback interface (i.e. localhost). This applies both to AMQP and to any other protocols enabled via plugins. Any other users you create will not (by default) be restricted in this way.

This is configured via the loopback_users item in the configuration file.

If you wish to allow the guest user to connect from a remote host, you should set the loopback_users configuration item to []. A complete rabbitmq.config which does this would look like:

Thanks

@chris-K-lee
Copy link

chris-K-lee commented Jan 24, 2017

got this error. (Assertion error)

Traceback (most recent call last):
  File "./malaria", line 31, in <module>
    beem.main.main()
  File "/Users/chrislee/Daliworks-PC/git/mqtt-malaria/beem/main.py", line 53, in main
    options.handler(options)
  File "/Users/chrislee/Daliworks-PC/git/mqtt-malaria/beem/cmds/publish.py", line 202, in run
    s = result.get()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 567, in get
    raise self._value
AssertionError

And then..

I got also the error as the following

Traceback (most recent call last):
  File "./malaria", line 31, in <module>
    beem.main.main()
  File "/Users/chrislee/Daliworks-PC/git/mqtt-malaria/beem/main.py", line 53, in main
    options.handler(options)
  File "/Users/chrislee/Daliworks-PC/git/mqtt-malaria/beem/cmds/publish.py", line 202, in run
    s = result.get()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 567, in get
    raise self._value
TypeError: object of type 'int' has no len()

how can I use mqtt-malaria again?
please let me know it.

OS : OSX 10.11.6
OSXfuse : v3.4.5
Python : v2.7.10

mosquitto==1.2.3
mqtt-malaria===0.1-81-ge718ba2
paho-mqtt==1.2

@Arqu
Copy link

Arqu commented Mar 8, 2017

My issue was that my broker doesn't accept any other characters for the client id except letters.
https://github.com/remakeelectric/mqtt-malaria/blob/master/beem/cmds/publish.py#L98
Changed that to account for the situation and now it works for me.

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

No branches or pull requests

7 participants