You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by zhangrongkun <56...@qq.com> on 2016/05/23 09:56:31 UTC

About kylin restful:

when I use:

curl -c /tmp/cookiefile.txt -X POST -H "Authorization: Basic ADMIN" -H
'Content-Type: application/json'
http://localhost:7070/kylin/api/user/authentication

the command returns exception:

<html><head><title>Apache Tomcat/7.0.59 - Error report</title> </head><body>
HTTP Status 500 - Cannot create a session after the response has been
committed
<HR size="1" noshade="noshade"><p>*type* Exception report</p><p>*message*
<u>Cannot create a session after the response has been
committed</u></p><p>*description* <u>The server encountered an internal
error that prevented it from fulfilling this request.</u></p><p>*exception*
<pre>java.lang.IllegalStateException: Cannot create a session after the
response has been committed
	org.apache.catalina.connector.Request.doGetSession(Request.java:3002)
	org.apache.catalina.connector.Request.getSession(Request.java:2378)

org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:897)

javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)

org.apache.kylin.rest.filter.KylinApiFilter.logRequest(KylinApiFilter.java:80)

org.apache.kylin.rest.filter.KylinApiFilter.doFilterInternal(KylinApiFilter.java:69)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:205)
	com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:266)
</pre></p><p>*note* <u>The full stack trace of the root cause is available
in the Apache Tomcat/7.0.59 logs.</u></p><HR size="1" noshade="noshade">
Apache Tomcat/7.0.59
</body></html>

--
View this message in context: http://apache-kylin.74782.x6.nabble.com/About-kylin-restful-tp4678.html
Sent from the Apache Kylin mailing list archive at Nabble.com.

Re: 回复:About kylin restful:

Posted by zhangrongkun <56...@qq.com>.
I have used:
curl -c /tmp/cookiefile.txt -X POST -H "Authorization:
Basic(base64(ADMIN:KYLIN))" -H 'Content-Type: application/json'
http://localhost:7070/kylin/api/user/authentication

although can't meet exception,My /tmp/cookiefile.txt only has this content:

# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.

#HttpOnly_localhost	FALSE	/kylin/	FALSE	0	JSESSIONID
56362B68538369D23FC1A43C833CA68F


--
View this message in context: http://apache-kylin.74782.x6.nabble.com/About-kylin-restful-tp4678p4680.html
Sent from the Apache Kylin mailing list archive at Nabble.com.

回复:About kylin restful:

Posted by bitbean <bi...@qq.com>.
Authorization: Basic ADMIN is not correct


Authorization: Basic (base64(ADMIN:KYLIN)) is right




------------------ 原始邮件 ------------------
发件人: "zhangrongkun";<56...@qq.com>;
发送时间: 2016年5月23日(星期一) 下午5:56
收件人: "dev"<de...@kylin.apache.org>; 

主题: About kylin restful:



when I use:

curl -c /tmp/cookiefile.txt -X POST -H "Authorization: Basic ADMIN" -H
'Content-Type: application/json'
http://localhost:7070/kylin/api/user/authentication

the command returns exception:

<html><head><title>Apache Tomcat/7.0.59 - Error report</title> </head><body>
HTTP Status 500 - Cannot create a session after the response has been
committed
<HR size="1" noshade="noshade"><p>*type* Exception report</p><p>*message*
<u>Cannot create a session after the response has been
committed</u></p><p>*description* <u>The server encountered an internal
error that prevented it from fulfilling this request.</u></p><p>*exception*
<pre>java.lang.IllegalStateException: Cannot create a session after the
response has been committed
	org.apache.catalina.connector.Request.doGetSession(Request.java:3002)
	org.apache.catalina.connector.Request.getSession(Request.java:2378)

org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:897)

javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229)

org.apache.kylin.rest.filter.KylinApiFilter.logRequest(KylinApiFilter.java:80)

org.apache.kylin.rest.filter.KylinApiFilter.doFilterInternal(KylinApiFilter.java:69)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:205)
	com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:266)
</pre></p><p>*note* <u>The full stack trace of the root cause is available
in the Apache Tomcat/7.0.59 logs.</u></p><HR size="1" noshade="noshade">
Apache Tomcat/7.0.59
</body></html>

--
View this message in context: http://apache-kylin.74782.x6.nabble.com/About-kylin-restful-tp4678.html
Sent from the Apache Kylin mailing list archive at Nabble.com.