Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Comments on org.apache.http.NoHttpResponseException: nginx.apps.cloud.cloud.local:443 failed to respond

Post

org.apache.http.NoHttpResponseException: nginx.apps.cloud.cloud.local:443 failed to respond

+1
−0

Getting the following error only when I call a post API through Nginx

[0m[31m12:48:35,903 ERROR [io.acurio.hub.api.rest.impl.DesignsResource] (default task-16) Failed to invoke workflow: com.mashape.unirest.http.exceptions.UnirestException: org.apache.http.NoHttpResponseException: nginx.apps.cloud.cloud.local:443 failed to respond
	at deployment.acurio-studio-api.war//com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:143)
	at deployment.acurio-studio-api.war//com.mashape.unirest.request.BaseRequest.asString(BaseRequest.java:56)
	at deployment.acurio-studio-api.war//io.acurio.hub.api.rest.impl.DesignsResource.initiateWorkflow(DesignsResource.java:597)
	at deployment.acurio-studio-api.war//io.acurio.hub.api.rest.impl.DesignsResource.createDesign(DesignsResource.java:472)
	at deployment.acurio-studio-api.war//io.acurio.hub.api.rest.impl.DesignsResource$Proxy$_$$_WeldClientProxy.createDesign(Unknown Source)
	at jdk.internal.reflect.GeneratedMethodAccessor584.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.jboss.resteasy.resteasy-jaxrs@3.7.0.Final//org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:138)
	at org.jboss.resteasy.resteasy-jaxrs@3.7.0.Final//org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:517)
	at org.jboss.resteasy.resteasy-jaxrs@3.7.0.Final//org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:406)
	at org.jboss.resteasy.resteasy-jaxrs@3.7.0.Final//org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:370)
	at org.jboss.resteasy.resteasy-

Here is the POST api url :

http://acuriostudi.apps.cloud.local/api-hub/api-hub/designs

Here is my location in nginx

 location /api-hub/ {
            proxy_pass http://acuriostudi.apps.cloud.local/api-hub/;
			
			
			  # Simple requests
              if ($request_method ~* "(GET|POST)") {
                add_header "Access-Control-Allow-Origin"  *;
               }

               # Preflighted requests
             if ($request_method = OPTIONS ) {
               add_header "Access-Control-Allow-Origin"  *;
               add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
               add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
              return 200;
            }
	
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	        proxy_pass_request_headers on;
                        limit_except GET PUT POST DELETE OPTIONS { deny all; }
                        override_charset on;
                        server_tokens off;
                        charset UTF-8;
                        source_charset UTF-8;

                        #add_header 'Content-Type' 'application/json; charset=UTF-8';
                        add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
                        add_header Cache-Control "no-cache no-store private";
                        #add_header Access-Control-Allow-Methods "GET, PUT, POST";
						#add_header 'Access-Control-Allow-Methods' 'GET,PUT, POST, OPTIONS';
                        #add_header Access-Control-Allow-Headers "X-Custom-Software, X-My-Custom";
                        proxy_cookie_path / "/; SameSite=None; HTTPOnly; Secure";
                        proxy_hide_header X-Upstream;
                        #proxy_hide_header Content-Type;

                        expires $expires;
                        #add_header Access-Control-Allow-Origin "agtest.ad.infosys.com" always;


                        #add_header Access-Control-Allow-Headers "X-Custom-Software, X-My-Custom";
                        keepalive_timeout  3600;
                        proxy_connect_timeout 300;
                        proxy_read_timeout 300;
                        proxy_send_timeout 300;

        }
History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

2 comment threads

acuriostudio does not seem to work (3 comments)
That url is in my cluster and private, doesnt work for you. Please note that get api of the same ... (1 comment)
acuriostudio does not seem to work
Alexei‭ wrote about 2 years ago

http://acuriostudi.apps.cloud.local/api-hub/api-hub/designs is not solved for me. Also, this is an HTTP URL and your error suggests that an HTTPS resource (port 443 instead of 80) is used.

SmartestVEGA‭ wrote about 2 years ago

That url is in my cluster and private, doesnt work for you.

Please note that get api of the same url pattern is working fine ONLY POST having issues.

what i need to do to enable HTTPS?

Canina‭ wrote about 2 years ago

Alexei‭ .local is reserved for mDNS (RFC 6762) which is restricted-scope.

SmartestVEGA‭ If you aren't actually running mDNS on your network, I recommend migrating to .home.arpa instead of .local. See RFC 8375. Using .local outside of a mDNS-only context can lead to name resolution issues.