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 潘志伟 <[email protected]>: > 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, 热爱大发挥 <[email protected]> wrote: > > > > try ti with -H 'Accept: */*' > > > > > > > > > > ------------------ Original ------------------ > > From: "潘志伟"<[email protected]>; > > Date: 2016年2月26日(星期五) 晚上8:02 > > To: "dev"<[email protected]>; > > 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 > >
