Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 11-27-2018 03:35 PM
I am trying to create a file in hdfs via the knox command but i am getting error :
$ curl -i -k -u admin:adminxxxx -X PUT 'https://localhost:8443/gateway/ftehdp/namenode/api/v1/tmp/README?op=CREATE' HTTP/1.1 404 Not Found Date: Tue, 27 Nov 2018 15:33:47 GMT Cache-Control: must-revalidate,no-cache,no-store Content-Type: text/html; charset=ISO-8859-1 Content-Length: 319 Server: Jetty(9.2.15.v20160210) <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 404 </title> </head> <body> <h2>HTTP ERROR: 404</h2> <p>Problem accessing /gateway/ftehdp/namenode/api/v1/tmp/README. Reason: <pre> Not Found</pre></p> <hr /><i><small>Powered by Jetty://</small></i> </body> </html>
Created 11-27-2018 06:00 PM
For Knox , you have to make 2 curl calls. The second curl call should be made to the "Location" header obtained from the 1st curl call response.
1st curl call
curl -i -k -u admin:admin-password -X GET 'https://localhost:8443/gateway/default/webhdfs/v1/tmp/uname.txt?op=OPEN' HTTP/1.1 307 Temporary Redirect Date: Tue, 27 Nov 2018 16:21:44 GMT Set-Cookie: JSESSIONID=1219u2f8zreb11eu9fuxlggxhq;Path=/gateway/default;Secure;HttpOnly Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: rememberMe=deleteMe; Path=/gateway/default; Max-Age=0; Expires=Mon, 26-Nov-2018 16:21:44 GMT Cache-Control: no-cache Expires: Tue, 27 Nov 2018 16:21:44 GMT Date: Tue, 27 Nov 2018 16:21:44 GMT Pragma: no-cache Expires: Tue, 27 Nov 2018 16:21:44 GMT Date: Tue, 27 Nov 2018 16:21:44 GMT Pragma: no-cache X-FRAME-OPTIONS: SAMEORIGIN Location: https://hadoop1:8443/gateway/default/webhdfs/data/v1/webhdfs/v1/tmp/uname.txt?_=AAAACAAAABAAAACgLvtI... Content-Type: application/octet-stream Server: Jetty(6.1.26.hwx) Content-Length: 0
2nd curl call (url is taken from Location header obtained in 1st curl call)
curl -i -k -u admin:admin-password -X GET https://hadoop1:8443/gateway/default/webhdfs/data/v1/webhdfs/v1/tmp/uname.txt?_=AAAACAAAABAAAACgLvtI...
Created 11-27-2018 04:08 PM
after starting the ldap server for hadoop i am getting different error now, also i had to replace the clustername "ftehdp" with "default" ?
curl -i -k -u admin:admin-password -X GET 'https://localhost:8443/gateway/default/webhdfs/v1/tmp/uname.txt?op=OPEN' HTTP/1.1 307 Temporary Redirect Date: Tue, 27 Nov 2018 16:21:44 GMT Set-Cookie: JSESSIONID=1219u2f8zreb11eu9fuxlggxhq;Path=/gateway/default;Secure;HttpOnly Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: rememberMe=deleteMe; Path=/gateway/default; Max-Age=0; Expires=Mon, 26-Nov-2018 16:21:44 GMT Cache-Control: no-cache Expires: Tue, 27 Nov 2018 16:21:44 GMT Date: Tue, 27 Nov 2018 16:21:44 GMT Pragma: no-cache Expires: Tue, 27 Nov 2018 16:21:44 GMT Date: Tue, 27 Nov 2018 16:21:44 GMT Pragma: no-cache X-FRAME-OPTIONS: SAMEORIGIN Location: https://hadoop1:8443/gateway/default/webhdfs/data/v1/webhdfs/v1/tmp/uname.txt?_=AAAACAAAABAAAACgLvtI... Content-Type: application/octet-stream Server: Jetty(6.1.26.hwx) Content-Length: 0
Created 11-27-2018 06:00 PM
For Knox , you have to make 2 curl calls. The second curl call should be made to the "Location" header obtained from the 1st curl call response.
1st curl call
curl -i -k -u admin:admin-password -X GET 'https://localhost:8443/gateway/default/webhdfs/v1/tmp/uname.txt?op=OPEN' HTTP/1.1 307 Temporary Redirect Date: Tue, 27 Nov 2018 16:21:44 GMT Set-Cookie: JSESSIONID=1219u2f8zreb11eu9fuxlggxhq;Path=/gateway/default;Secure;HttpOnly Expires: Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie: rememberMe=deleteMe; Path=/gateway/default; Max-Age=0; Expires=Mon, 26-Nov-2018 16:21:44 GMT Cache-Control: no-cache Expires: Tue, 27 Nov 2018 16:21:44 GMT Date: Tue, 27 Nov 2018 16:21:44 GMT Pragma: no-cache Expires: Tue, 27 Nov 2018 16:21:44 GMT Date: Tue, 27 Nov 2018 16:21:44 GMT Pragma: no-cache X-FRAME-OPTIONS: SAMEORIGIN Location: https://hadoop1:8443/gateway/default/webhdfs/data/v1/webhdfs/v1/tmp/uname.txt?_=AAAACAAAABAAAACgLvtI... Content-Type: application/octet-stream Server: Jetty(6.1.26.hwx) Content-Length: 0
2nd curl call (url is taken from Location header obtained in 1st curl call)
curl -i -k -u admin:admin-password -X GET https://hadoop1:8443/gateway/default/webhdfs/data/v1/webhdfs/v1/tmp/uname.txt?_=AAAACAAAABAAAACgLvtI...