You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by 潘志伟 <31...@qq.com> on 2016/02/26 13:02:48 UTC
when i use curl with Restful Api , HTTP Status 500 - Cannot create a session after the response has been committed
Hi,All!
when I run :
[hdfs@n01 bin]$ curl -c /tmp/cookiefile.txt -X POST -H "Authorization: Basic QURNSU46S1lMSU4K" -H 'Content-Type: application/json' http://127.0.0.1:7070/kylin/api/user/authentication
error:
<html><head><title>Apache Tomcat/7.0.59 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - Cannot create a session after the response has been committed</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>Cannot create a session after the response has been committed</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <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><b>note</b> <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"><h3>Apache Tomcat/7.0.59</h3></body></html>[hdfs@n01 bin]$
anyone can help me out of this error ?
thanks in advanced!
poon
Re: when i use curl with Restful Api , HTTP Status 500 - Cannot create a session after the response has been committed
Posted by 潘志伟 <31...@qq.com>.
thanks yu feng & 热爱大发挥 , that works !
I ran this command and it returned the desired result :
[root@n01 tmp]# curl -c /tmp/cookiefile.txt -X POST -H "Authorization: Basic QURNSU46S1lMSU4=" -H 'Content-Type: application/json' -d '{"project":"learn_kylin", "sql":"select price from kylin_sales"}' "http://127.0.0.1:7070/kylin/api/query"
{"columnMetas":[{"isNullable":1,"displaySize":19,"label":"PRICE","name":"PRICE","schemaName":"DEFAULT","catelogName":null,"tableName":"KYLIN_SALES","precision":19,"scale":4,"columnType":3,"columnTypeName":"DECIMAL(19, 4)","writable":false,"autoIncrement":false,"caseSensitive":true,"searchable":false,"currency":false,"signed":true,"definitelyWritable":false,"readOnly":true}],"results":[["0.7227"],["16.7271"],["13.281"],["13.7727"],["26.259"],["76.1393"],["4.2157"],["37.0823"],["82.2338"],["88.427"],["44.7485"],["63.2946"],["96.8429"],["89.7934"],["55.1963"],["72.0857"],["54.2805"],["76.301"],["83.3061"],["32.5155"],["60.1746"],["45.8162"],["12.3706"],["77.6378"],["45.3934"],["80.1483"],["48.2433"],["40.1291"],["94.1
> On Feb 29, 2016, at 10:06, yu feng <ol...@gmail.com> wrote:
>
> Hi, I have encountered this problem, this is caused by "Authorization:
> Basic QURNSU46S1lMSU4K" is incorrent, you should use "echo -n
> 'ADMIN:KYLIN'| base64" to generate base64 encoding, which output is
> "QURNSU46S1lMSU4=", and you can try it again. wish it can halp you ~
>
> 2016-02-26 20:47 GMT+08:00 潘志伟 <31...@qq.com>:
>
>> Hi All & 热爱大发挥!
>>
>> I try 'Accept: */*’ , but it still not works . Is there any other
>> mistake in my command or parameters ?
>>
>>
>> ------------------------------------------------------
>>
>> curl -c -X POST -H "Authorization: Basic QURNSU46S1lMSU4K" -H
>> 'Content-Type: application/json' -H 'Accept: */*'
>> http://127.0.0.1:7070/kylin/api/user/authentication
>> <html><head><title>Apache Tomcat/7.0.59 - Error
>> report</title><style><!--H1
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
>> H2
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
>> H3
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
>> BODY
>> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
>> P
>> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
>> {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
>> </head><body><h1>HTTP Status 500 - Cannot create a session after the
>> response has been committed</h1><HR size="1"
>> noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b>
>> <u>Cannot create a session after the response has been
>> committed</u></p><p><b>description</b> <u>The server encountered an
>> internal error that prevented it from fulfilling this
>> request.</u></p><p><b>exception</b> <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><b>note</b> <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"><h3>Apache Tomcat/7.0.59</h3></body></html>[hdfs@n01
>> bin]$
>> [hdfs@n01 bin]$
>> [hdfs@n01 bin]$
>> [hdfs@n01 bin]$
>>
>> ———————————————————————————
>>
>>
>>
>>> On Feb 26, 2016, at 20:19, 热爱大发挥 <38...@qq.com> wrote:
>>>
>>> try ti with -H 'Accept: */*'
>>>
>>>
>>>
>>>
>>> ------------------ Original ------------------
>>> From: "潘志伟"<31...@qq.com>;
>>> Date: 2016年2月26日(星期五) 晚上8:02
>>> To: "dev"<de...@kylin.apache.org>;
>>> Subject: when i use curl with Restful Api , HTTP Status 500 - Cannot
>> create a session after the response has been committed
>>>
>>>
>>>
>>> Hi,All!
>>>
>>> when I run :
>>>
>>> [hdfs@n01 bin]$ curl -c /tmp/cookiefile.txt -X POST -H "Authorization:
>> Basic QURNSU46S1lMSU4K" -H 'Content-Type: application/json'
>> http://127.0.0.1:7070/kylin/api/user/authentication
>>>
>>> error:
>>>
>>> <html><head><title>Apache Tomcat/7.0.59 - Error
>> report</title><style><!--H1
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
>> H2
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
>> H3
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
>> BODY
>> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
>> P
>> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
>> {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
>> </head><body><h1>HTTP Status 500 - Cannot create a session after the
>> response has been committed</h1><HR size="1"
>> noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b>
>> <u>Cannot create a session after the response has been
>> committed</u></p><p><b>description</b> <u>The server encountered an
>> internal error that prevented it from fulfilling this
>> request.</u></p><p><b>exception</b> <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><b>note</b> <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"><h3>Apache Tomcat/7.0.59</h3></body></html>[hdfs@n01
>> bin]$
>>>
>>>
>>> anyone can help me out of this error ?
>>>
>>> thanks in advanced!
>>>
>>> poon
>>
>>
Re: when i use curl with Restful Api , HTTP Status 500 - Cannot
create a session after the response has been committed
Posted by yu feng <ol...@gmail.com>.
Hi, I have encountered this problem, this is caused by "Authorization:
Basic QURNSU46S1lMSU4K" is incorrent, you should use "echo -n
'ADMIN:KYLIN'| base64" to generate base64 encoding, which output is
"QURNSU46S1lMSU4=", and you can try it again. wish it can halp you ~
2016-02-26 20:47 GMT+08:00 潘志伟 <31...@qq.com>:
> Hi All & 热爱大发挥!
>
> I try 'Accept: */*’ , but it still not works . Is there any other
> mistake in my command or parameters ?
>
>
> ------------------------------------------------------
>
> curl -c -X POST -H "Authorization: Basic QURNSU46S1lMSU4K" -H
> 'Content-Type: application/json' -H 'Accept: */*'
> http://127.0.0.1:7070/kylin/api/user/authentication
> <html><head><title>Apache Tomcat/7.0.59 - Error
> report</title><style><!--H1
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
> H2
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
> H3
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
> BODY
> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
> P
> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
> {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
> </head><body><h1>HTTP Status 500 - Cannot create a session after the
> response has been committed</h1><HR size="1"
> noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b>
> <u>Cannot create a session after the response has been
> committed</u></p><p><b>description</b> <u>The server encountered an
> internal error that prevented it from fulfilling this
> request.</u></p><p><b>exception</b> <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><b>note</b> <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"><h3>Apache Tomcat/7.0.59</h3></body></html>[hdfs@n01
> bin]$
> [hdfs@n01 bin]$
> [hdfs@n01 bin]$
> [hdfs@n01 bin]$
>
> ———————————————————————————
>
>
>
> > On Feb 26, 2016, at 20:19, 热爱大发挥 <38...@qq.com> wrote:
> >
> > try ti with -H 'Accept: */*'
> >
> >
> >
> >
> > ------------------ Original ------------------
> > From: "潘志伟"<31...@qq.com>;
> > Date: 2016年2月26日(星期五) 晚上8:02
> > To: "dev"<de...@kylin.apache.org>;
> > Subject: when i use curl with Restful Api , HTTP Status 500 - Cannot
> create a session after the response has been committed
> >
> >
> >
> > Hi,All!
> >
> > when I run :
> >
> > [hdfs@n01 bin]$ curl -c /tmp/cookiefile.txt -X POST -H "Authorization:
> Basic QURNSU46S1lMSU4K" -H 'Content-Type: application/json'
> http://127.0.0.1:7070/kylin/api/user/authentication
> >
> > error:
> >
> > <html><head><title>Apache Tomcat/7.0.59 - Error
> report</title><style><!--H1
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
> H2
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
> H3
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
> BODY
> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
> P
> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
> {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
> </head><body><h1>HTTP Status 500 - Cannot create a session after the
> response has been committed</h1><HR size="1"
> noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b>
> <u>Cannot create a session after the response has been
> committed</u></p><p><b>description</b> <u>The server encountered an
> internal error that prevented it from fulfilling this
> request.</u></p><p><b>exception</b> <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><b>note</b> <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"><h3>Apache Tomcat/7.0.59</h3></body></html>[hdfs@n01
> bin]$
> >
> >
> > anyone can help me out of this error ?
> >
> > thanks in advanced!
> >
> > poon
>
>
Re: when i use curl with Restful Api , HTTP Status 500 - Cannot create a session after the response has been committed
Posted by 潘志伟 <31...@qq.com>.
Hi All & 热爱大发挥!
I try 'Accept: */*’ , but it still not works . Is there any other mistake in my command or parameters ?
------------------------------------------------------
curl -c -X POST -H "Authorization: Basic QURNSU46S1lMSU4K" -H 'Content-Type: application/json' -H 'Accept: */*' http://127.0.0.1:7070/kylin/api/user/authentication
<html><head><title>Apache Tomcat/7.0.59 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - Cannot create a session after the response has been committed</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>Cannot create a session after the response has been committed</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <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><b>note</b> <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"><h3>Apache Tomcat/7.0.59</h3></body></html>[hdfs@n01 bin]$
[hdfs@n01 bin]$
[hdfs@n01 bin]$
[hdfs@n01 bin]$
———————————————————————————
> On Feb 26, 2016, at 20:19, 热爱大发挥 <38...@qq.com> wrote:
>
> try ti with -H 'Accept: */*'
>
>
>
>
> ------------------ Original ------------------
> From: "潘志伟"<31...@qq.com>;
> Date: 2016年2月26日(星期五) 晚上8:02
> To: "dev"<de...@kylin.apache.org>;
> Subject: when i use curl with Restful Api , HTTP Status 500 - Cannot create a session after the response has been committed
>
>
>
> Hi,All!
>
> when I run :
>
> [hdfs@n01 bin]$ curl -c /tmp/cookiefile.txt -X POST -H "Authorization: Basic QURNSU46S1lMSU4K" -H 'Content-Type: application/json' http://127.0.0.1:7070/kylin/api/user/authentication
>
> error:
>
> <html><head><title>Apache Tomcat/7.0.59 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - Cannot create a session after the response has been committed</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>Cannot create a session after the response has been committed</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <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><b>note</b> <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"><h3>Apache Tomcat/7.0.59</h3></body></html>[hdfs@n01 bin]$
>
>
> anyone can help me out of this error ?
>
> thanks in advanced!
>
> poon
Re:when i use curl with Restful Api , HTTP Status 500 - Cannot create a session after the response has been committed
Posted by 热爱大发挥 <38...@qq.com>.
try ti with -H 'Accept: */*'
------------------ Original ------------------
From: "潘志伟"<31...@qq.com>;
Date: 2016年2月26日(星期五) 晚上8:02
To: "dev"<de...@kylin.apache.org>;
Subject: when i use curl with Restful Api , HTTP Status 500 - Cannot create a session after the response has been committed
Hi,All!
when I run :
[hdfs@n01 bin]$ curl -c /tmp/cookiefile.txt -X POST -H "Authorization: Basic QURNSU46S1lMSU4K" -H 'Content-Type: application/json' http://127.0.0.1:7070/kylin/api/user/authentication
error:
<html><head><title>Apache Tomcat/7.0.59 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - Cannot create a session after the response has been committed</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>Cannot create a session after the response has been committed</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <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><b>note</b> <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"><h3>Apache Tomcat/7.0.59</h3></body></html>[hdfs@n01 bin]$
anyone can help me out of this error ?
thanks in advanced!
poon