cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Error using Python remote client connectig to epo server

Hi all,

I'm trying to use the Python remote client to do some tasks like apply tags, etc., but when I launch the script I get the following error connecting ePO server:

 

mcafee.CommandInvokerError: Failed to reach the server prwepoup05.ad.produban.corp:8443. Error/reason: <urlopen error [Errno 1] _ssl.c:480: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol>

 

I have direct connection to the ePO server and if I try a telnet I reach it without problem, so I have no idea about the error.

 

Any help?

 

Thanks a lot in advance

5 Replies
Highlighted
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 2 of 6

Re: Error using Python remote client connectig to epo server

Check kb and see if you are using the right version of python for tls 1.2.

sorry, that's kb90056

Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?

Highlighted

Re: Error using Python remote client connectig to epo server

Thanks a lot for your help!

I have tried again with the 2.7 Python version. Now I get a different error also related to SSL Certificates:

"mcafee.CommandInvokerError: Failed to reach the server prwepoup05.ad.produban.corp:8443. Error/reason: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)"

I have no idea what the problem is.

Highlighted
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 4 of 6

Re: Error using Python remote client connectig to epo server

The certificate for epo is typically issued to the NetBIOS name of the server.  Try using that in the url instead of fqdn.

Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?

Highlighted

Re: Error using Python remote client connectig to epo server

Thanks a lot for your help!!!

Finally I have solved the certificate issue using PYTHONHTTPSVERIFY=0, so I can connect to the server and make operations with a local ePO user.

 

But, now I have another problem: when I try to launch a command using a domain user I get the following error:

mcafee.CommandInvokerError: The server sxxxxxxxxxxxxxxxx:8443 could not fulfill the request. HTTP Error 401: Unauthorized

This is my script:

import sys
import mcafee

mc = mcafee.client('epoServerName', 'epoServerPort', 'domain\userName', userPassword')
file = open('tags.txt', 'r')
for line in file:
print (line),
mc.system.applyTag(line.rstrip('\n'), 'MyTag')

file.close()

Any idea about the issue? 

Thanks in advance!!

Highlighted
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 6 of 6

Re: Error using Python remote client connectig to epo server

Is that account a global admin?  Does the same command work if you use an epo authentication account instead of domain account?  Does the orion or audit log show any related errors?  

Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?

You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community