Apache Atlas: Http 503 Service Unavailable Error when connecting from Java Client - apache-atlas

I am running the atlas docker image from my MacOS . The admin dashboard works fine and I can create/ manage entities from the dashboard. But when I try to run the sample Java app provided with the Atlas source code, I get "Http 503 Service Unavailable Error" .
Following is the log
Exception in thread "main" org.apache.atlas.AtlasServiceException: Metadata service API org.apache.atlas.AtlasClientV2$API_V2#2f62ea70 failed with status 503 (Service Unavailable) Response Body (<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 503 Service Unavailable</title>
</head>
<body>
<h2>HTTP ERROR: 503</h2>
<p>Problem accessing /api/atlas/v2/types/typedefs/. Reason:
<pre> Service Unavailable</pre></p>
<hr /><i><small>Powered by Jetty:// 8.1.19.v20160209</small></i>
</body>
</html>
)
at org.apache.atlas.AtlasBaseClient.callAPIWithResource(AtlasBaseClient.java:427)
at org.apache.atlas.AtlasBaseClient.callAPIWithResource(AtlasBaseClient.java:352)
at org.apache.atlas.AtlasBaseClient.callAPI(AtlasBaseClient.java:228)
at org.apache.atlas.AtlasClientV2.createAtlasTypeDefs(AtlasClientV2.java:323)
at org.apache.atlas.examples.sampleapp.TypeDefExample.batchCreateTypes(TypeDefExample.java:272)
at org.apache.atlas.examples.sampleapp.TypeDefExample.createTypeDefinitions(TypeDefExample.java:92)
at org.apache.atlas.examples.sampleapp.SampleApp.main(SampleApp.java:56)
Disconnected from the target VM, address: '127.0.0.1:58199', transport: 'socket'
Process finished with exit code 1

Related

<title>Error 403 No valid crumb was included in the request</title> getting same in Eclipse using restassured

I am getting this error while calling a rest api which is working from postman
IDE : Eclipse and using rest assured
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 403 No valid crumb was included in the request</title>
</head>
<body><h2>HTTP ERROR 403</h2>
<p>Problem accessing /serviceurl.postregisterurl. Reason:
<pre> No valid crumb was included in the request</pre></p><hr>Powered by Jetty:// 9.4.z-SNAPSHOT<hr/>
</body>
</html>

Http server received multiple sockets from one client

I am writing my own http server using C++. The server has a listener binding to the port 9999. By default, I use HTTP 1.1 with keep-alive. The server uses select to multiplex the IO.
My question is, when I open the browser at localhost:9999, I saw multiple sockets being created from the listener. The first request isGET / HTTP 1.1 and my response is the index.html file so the client can open it. Here is a sketch of this index.html
<html lang="en" ng-app="myproject">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/myproject.min.css">
</head>
<script src="/js/jquery-3.2.1.min.js"></script>
<script src="/js/angular-1.2.3.min.js"></script>
<script src="/js/angular-route-1.2.3.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
....
When the client receives this index.html, it in turn creates multiple requests asking for bootstrap.min.css, myproject.min.css, and all the remaining javascript files (jquery-3.2.1.min.js, etc). This is what I saw from the server's listener:
incoming http connection created on socket 6 <-- initial request (asking '/' and `favicon`)
server sends index.html through 6
incoming http connection created on socket 7 <-- request for bootstrap.min.css
server sends bootstrap.min.css through 7
incoming http connection created on socket 8 <-- request for myproject.min.css
server sends myproject.min.css through 8
incoming http connection created on socket 9 <-- request for jquery-3.2.1.min.js
server sends jquery-3.2.1.min.js through 9
.... (sockets 6, 7, 8, 9 are alive)
It does not make any sense to me for client to create a new socket connection for each individual request. I am sure I turn on the keep-alive in both response and request. I expected there is only one socket being created, which is 6 in this example, and all the following requests should reuse that socket instead of creating a new one. Am I missing something?

Ambari:Error while enabling kerberos

I have installed Ambari 2.5.0 version with HDP 2.6 and added some of the services but while enabling kerberos I am facing one weird issue.
resource_management.core.exceptions.Fail: Execution of 'curl -sS -L -w '%
{http_code}' -X GET --negotiate -u : 'http://xxxx:50070/webhdfs/v1/ats/done?
op=GETFILESTATUS&user.name=hdfs'' returned status_code=403.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 403
org.apache.hadoop.security.authentication.client.AuthenticationException
</title
</head>
<body><h2>HTTP ERROR 403</h2>
<p>Problem accessing /webhdfs/v1/ats/done. Reason:
<pre>
org.apache.hadoop.security.authentication.client.AuthenticationException
</pre>
</p><hr /><i><small>Powered by Jetty://</small></i><br/>
<br/>
My installation is getting failed while installing the APP time line server.
Any suggestions will be appreciated.

Sending the packets through web service in perl, in response getting the error of ssl

I am using webservice to send the packets through my Perl program,
in response I am getting the following error:
<html>
<head><title>An Error Occurred</title></head>
<body>
<h1>An Error Occurred</h1>
<p>500 SSL negotiation failed: </p>
</body>
</html>
I know that I need to install one module for the ssl, my question is if I need to install the module then which module? and if there is any alternative then pl?

.NET AdaptivePayment SDK: PaymentDetails() is throwing a ConnectionException (404)

I am calling the AdaptivePaymentService.PaymentDetails() to get the payment details for a payment, and it is throwing a ConnectionException indicating 404. In order to debug the issue, I downloaded the source for the AdaptivePayment SDK as well as the Core SDK and stepped through the code, specifically, right where the HttpRequest is executed in Paypal.HttpConnection.Execute().
It appears as if all configuration variables are being read from the web.config:
The address in the underlying httpRequest looks correct:
The payload looks correct:
However, a WebException is thrown with the following response:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /cgi-bin/ppapi was not found on this server.</p>
<p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache Server at api.sandbox.paypal.com Port 443</address>
</body></html>
Any help would be greatly appreciated.
Since you have configured both ClientId/Secret and 3-token credentials (API username, password, signature) in your configuration, the endpoint has been detected incorrectly, giving the REST API higher preference. Please remove the client id / secret configuration and you should see the endpoint set correctly to https://svcs.sandbox.paypal.com/AdaptivePayments/PaymentDetails