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

[Bug]: facing issue while executing the pattern script #46

Open
sowjanya1117 opened this issue Oct 21, 2024 · 3 comments
Open

[Bug]: facing issue while executing the pattern script #46

sowjanya1117 opened this issue Oct 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@sowjanya1117
Copy link

Bug Description

python direct_publisher.py
2024-10-21 17:49:26,216 [WARNING] solace.messaging.core: [_solace_transport.py:89] [[SERVICE: 0x101894e00] - [APP ID: xxxxx-MacBook-Pro.local/38331/00000001/Cm9rBNGWKT]] {'caller_description': 'From service event callback', 'return_code': 'Ok', 'sub_code': 'SOLCLIENT_SUBCODE_COMMUNICATION_ERROR', 'error_info_sub_code': 14, 'error_info_contents': 'TCP connection failure for fd 8, error = Connection refused (61)'}
2024-10-21 17:49:26,216 [WARNING] solace.messaging.core: [_solace_transport.py:89] [[SERVICE: 0x101894e00] - [APP ID: xxxxxx-MacBook-Pro.local/38331/00000001/Cm9rBNGWKT]] {'caller_description': 'do_connect', 'return_code': 'Not ready', 'sub_code': 'SOLCLIENT_SUBCODE_COMMUNICATION_ERROR', 'error_info_sub_code': 14, 'error_info_contents': 'TCP connection failure for fd 8, error = Connection refused (61)'}
2024-10-21 17:49:26,216 [WARNING] solace.messaging.connections: [messaging_service.py:1245] [[SERVICE: 0x101894e00] - [APP ID: xxxxxx-MacBook-Pro.local/38331/00000001/Cm9rBNGWKT]] Connection failed. Status code: 3
Traceback (most recent call last):
File "/Users/Downloads/solace-samples-python/patterns/direct_publisher.py", line 53, in
messaging_service.connect()
File "/Users/xxxxxxxx/messaging/messaging_service.py", line 1246, in connect
raise error
solace.messaging.errors.pubsubplus_client_error.PubSubPlusCoreClientError: {'caller_description': 'do_connect', 'return_code': 'Not ready', 'sub_code': 'SOLCLIENT_SUBCODE_COMMUNICATION_ERROR', 'error_info_sub_code': 14, 'error_info_contents': 'TCP connection failure for fd 8, error = Connection refused (61)'}

Expected Behavior

script need to execute and consumer will consume the messages

Steps to Reproduce

need support while using python api and smf protocals

Solace Product

Solace PubSub+ Event Broker

Solace Broker version

No response

Solace API

No response

Solace API version

No response

@sowjanya1117 sowjanya1117 added the bug Something isn't working label Oct 21, 2024
@TamimiGitHub
Copy link
Contributor

Hey @sowjanya1117 - I was able to run the sample locally with no issues. I am running it on MacBook Pro M3. Can you please confirm the folliwng

  • The OS of you Macbook your running it from
  • The version of the Solace PS+ Python API
  • Are you connecting to a local or cloud broker?

From the logs you shared there seems to be a connection issue.

@sowjanya1117
Copy link
Author

Hi @TamimiGitHub below are the below
1)Macbook version:14.3 && MacBook Pro M3
2)solace:Name: solace-pubsubplus
Version: 1.8.0
Summary: Solace PubSub+ Messaging API for Python.
Home-page: https://docs.solace.com/Solace-PubSub-Messaging-APIs/Python-API/python-home.htm
Author: Solace Corporation
Author-email: [email protected]
License: Apache 2.0
Location: /Users/so20535180/Downloads/solace-samples-python/venv/lib/python3.12/site-packages
Requires:
Required-by: solace_ai_connector
Python 3.12.2
3)i tried to connect both local and cloud broker

Actually i'm new to both solace and python
here i just cloned the repo and followed the readme steps another is created the free cloud solace account
i didn't make any changes just followed the Readme steps
please guide on this

@TamimiGitHub
Copy link
Contributor

Your local python environment configuration looks correct.

Can we please confirm that you are running a local version of the solace broker using docker. From the getting started page:

docker run -d -p 8080:8080 -p 55554:55555 -p 8008:8008 -p 1883:1883 -p 8000:8000 -p 5672:5672 -p 9000:9000 -p 2222:2222 --shm-size=2g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --name=solace solace/solace-pubsub-standard

Alternatively, are you using the right end point for your solace cloud account? You can run the python samples with non default (localhost) endpoints as follows:

SOLACE_HOST=<host_name> SOLACE_VPN=<vpn_name> SOLACE_USERNAME=<username> SOLACE_PASSWORD=<password> python <name_of_file>.py

where host_name is the url found from the Connect tab in your Solace Cloud instance
Screenshot 2024-10-22 at 6 42 17 AM

Hopefully this helps resolving the issue you are facing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants