http error + gaierror + ConnectionError + locust + IIS - iis

I got the following error during stress test. I search about it but couldnt find an explanation. Does anyone know about this error?
"ConnectionError(ProtocolError('Connection aborted.', gaierror(-2,
'Name or service not known')),)"

Related

Fetch and Read secrets to vault using python hvac

Hello I have just tried using this code but still getting error. Any idea how to solve this?
I have referred similar post also but it is not working.
import hvac
client = hvac.Client(url='https://vault.xyz.com:1100/ui')
response = client.secrets.kv.v2.read_secret_version(path='/secrets/secret/show/ab/ss/dd')
Error-
raise_for_error raise exceptions.Forbidden(message, errors=errors, method=method, url=url) hvac.exceptions.Forbidden: 1 error occurred: * permission denied

Receiving "EPROTO" when HTTPS requests with Node 10

a few days ago i moved my frontend with NextJS to Vercel and i started experiencing this following intermittent error during build and production server. So i searched all over the internet but i cannot find the solution.
I am receiving the following error when my App tries to make HTTPS request:
Compiled successfully.
09:47:13.026 Automatically optimizing pages...
09:47:15.212 Error at BlogService.getRecentPosts, details: Error: request to https://**masked** failed, reason: write EPROTO 140256911292224:error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1550:SSL alert number 80
09:47:16.629 Error at getStaticProps on Homepage, details: Error: write EPROTO 140657767638848:error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1550:SSL alert number 80
09:47:16.654 Error at BlogService.getRecentPosts, details: Error: request to https:/**masked** failed, reason: write EPROTO 139955108906816:error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1550:SSL alert number 80
The backend destination is using a Nginx with Reverse Proxy with LetsEncrypt Certificate
So anybody can help me? I never experienced this issue
UPDATE
I changed my backend to AWS Api Gateway but the issue remains.
I already changed my frontend to just make Https requests using TLS 1.2, and the error remains intermittent
Anybody help me?

Python 3.8.5 FTPS connection

I'm trying to do a FTPS (or FTP) connection to a FTP server. This is done on Python 3.8.5 32 bit via Visual Studio Code.
Here is the code:
import ftplib
session = ftplib.FTP_TLS('server address')
#session.connect ('server address', 991)
session.login(user='username',passwd='password')
#session.prot_p()
session.set_pasv(True)
session.cwd("files")
print(session.pwd())
filename = "ftpTest.txt"
my_file = open('filepath\\ftpTest.txt', 'wb') # Open a local file to store the downloaded file
session.retrbinary('RETR ' + filename, my_file.write, 1024)
session.quit()
I am able to get the session.pwd (which display /files) but the connection timeout at line 11 (session.retrbinary) in approximately 22 sec with the following error:
Exception has occurred: TimeoutError
[WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
I had tried setting session.set_pasv to both True and False following Python ftplib timing out. Setting it True raised the TimeoutError and setting it False raise the following error at line 11:
Exception has occurred: error_perm
500 Illegal PORT command
and also tried setting a different port (991) following Python SSL FTP connection timing out and it raised the Timeout Error at line 3.
Using FTP without TLS raised the following error at line 4 (session.login):
Exception has occurred: error_perm
530 Non-anonymous sessions must use encryption.
Turning off my McAfee LiveSafe firewall didnt help either.
Btw file transfer works with Filezilla, was able to freely transfer.
Setting up the secure data connection and changing the session af to INET6 seemed to work for me. This was suggested to me by a colleague, and as to why it works is beyond me. If anyone can provide a proper explanation, please do.
Code:
session.login(user='username',passwd='password')
session.prot_p()
session.af = socket.AF_INET6

Parse Server + Express - Issues with ParseError and site dying/restarting

I have deployed a Bitnami Parse stack to a Google Cloud VM. This stack is basically Apache running as a proxy, Then a MEAN stack handling parse server and dashboard etc.
Everything appears to be working fine when accessing the dashboard and sending individual CURL requests to test it's all available.
However, there appears to be a fatal flaw in that. When Parse returns one of it's errors e.g.
{"code":101,"error":"Object not found."}
Express sees it as an uncaught exception and dies. Now I realise that it's intentional behaviour (There's enough information out there as to why you don't want to persist after an uncaught exception)
The Bitnami stack uses Forever to run the Parse Server, but as you can see from the logs I will include below, you still run into issues with refused connections.
2016-11-25T11:41:16+00:00 DEBUG (7): {"code":101,"error":"Object not found."}
2016-11-25T11:41:16+00:00 DEBUG (7): Failed to connect to X.X.X.X: Connection refused
2016-11-25T11:41:17+00:00 DEBUG (7): Failed to connect to X.X.X.X: Connection refused
2016-11-25T11:41:17+00:00 DEBUG (7): Failed to connect to X.X.X.X: Connection refused
2016-11-25T11:41:17+00:00 DEBUG (7): Failed to connect to X.X.X.X: Connection refused
Meanwhile in the Forever logs:
Error generating response. ParseError { code: 101, message: 'Object not found.' } code=101, message=Object not found.
[object Object]
/opt/bitnami/apps/parse/htdocs/node_modules/parse-server/lib/ParseServer.js:425
throw err;
^
Error: EACCES: permission denied, open '/opt/bitnami/apps/parse/htdocs/logs/parse-server.info.2016-11-25'
at Error (native)
error: Forever detected script exited with code: 7
error: Script restart attempt #1
parse-server running on port 1337
parse-dashboard running on port 4040
So you can see that immediately following a Parse error being returned, The service is unavailable until Forever can restart the Parse Server.
This issue appears that it would affect all users as well, so if one user receives an exception, all users lose connection for a brief period.
So the question is, how should this be properly handled? Is Parse + Express not the way to go about it? Or is there some method of configuring Node or Express to return the API error to the requester, without Express dying (And without having to fall into the trap of using uncaughtException to keep Node alive)
Any help would be much appreciated, thank you
The logs from Forever said it's EACCES error, that means ParseServer couldn't access the log file and not able to write the info log in it.
Error: EACCES: permission denied, open '/opt/bitnami/apps/parse/htdocs/logs/parse-server.info.2016-11-25'
at Error (native)
error: Forever detected script exited with code: 7
error: Script restart attempt #1
parse-server running on port 1337
parse-dashboard running on port 4040
I think you have to change the /opt/bitnami/apps/parse/htdocs/logs with proper permission so that ParseServer can write log files in it.

Primefaces 500 Error on starting server

I'm not sure what I've done, but after a recent build on the Server I'm getting this error:
HTTP ERROR 500
Problem accessing /. Reason:
Server Error
Caused by:
java.lang.NullPointerException
at org.primefaces.context.PrimeFacesContext.release(PrimeFacesContext.java:26)
at org.primefaces.context.PrimeFacesContext.release(PrimeFacesContext.java:28)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:612)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:558)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:488)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:973)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:417)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:907)
Anyone seen this before or any idea what might have caused it?

Resources