2012-08-24 3 views
0

많은 시도 끝에 MySQL로 jdbcRealm을 구성 할 수있었습니다. 안타깝게도 데이터베이스 오류가 발생하여 (사용자 당 연결이 너무 많음) 글래스 피쉬 3.1.1을 재부팅해야만했습니다.글래스 피시 재부팅 후에 jdbcRealm이 작동을 멈 춥니 다.

재부팅 후 더 이상 ping을 수행 할 수 있지만 jdbcRealm 기반의 기본 인증을 사용할 수 없습니다 데이터베이스 내가 오류 다음 얻을

: 아마도 재부팅하는 동안 변경 수 무엇

[#|2012-08-24T15:17:53.472+0200|FINE|glassfish3.1.1|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login|_ThreadID=127;_ThreadName=Thread-2;ClassName=com.sun.enterprise.security.auth.login.LoginContextDriver;MethodName=doPasswordLogin;|Logging in user [myUser] into realm: ShibUserPassAuth using JAAS module: jdbcRealm|#] 

    [#|2012-08-24T15:17:53.478+0200|FINEST|glassfish3.1.1|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login|_ThreadID=127;_ThreadName=Thread-2;ClassName=com.sun.enterprise.security.auth.login.LoginContextDriver;MethodName=doPasswordLogin;|doPasswordLogin fails 
javax.security.auth.login.LoginException: No LoginModules configured for jdbcRealm 
    at javax.security.auth.login.LoginContext.init(LoginContext.java:273) 
    at javax.security.auth.login.LoginContext.<init>(LoginContext.java:382) 
    at javax.security.auth.login.LoginContext.<init>(LoginContext.java:459) 
    at com.sun.enterprise.security.auth.login.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:381) 
    at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:240) 
    at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:153) 
    at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:512) 
    at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:453) 
    at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:168) 
    at com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(RealmAdapter.java:1326) 
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551) 
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:623) 
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) 
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98) 
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91) 
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162) 
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330) 
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) 
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174) 
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) 
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725) 
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019) 
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) 
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) 
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) 
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) 
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) 
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) 
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) 
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71) 
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) 
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) 
    at java.lang.Thread.run(Thread.java:722) 
|#] 

[#|2012-08-24T15:17:53.479+0200|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.web.security|_ThreadID=127;_ThreadName=Thread-2;|WEB9102: Web Login Failed: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: No LoginModules configured for jdbcRealm|#] 

[#|2012-08-24T15:17:53.480+0200|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.web.security|_ThreadID=127;_ThreadName=Thread-2;|Exception 
com.sun.enterprise.security.auth.login.common.LoginException: Login failed: No LoginModules configured for jdbcRealm 
    at com.sun.enterprise.security.auth.login.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:394) 
    at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:240) 
    at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:153) 
    at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:512) 
    at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:453) 
    at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:168) 
    at com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(RealmAdapter.java:1326) 
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551) 
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:623) 
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) 
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98) 
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91) 
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162) 
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330) 
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) 
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174) 
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) 
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725) 
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019) 
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) 
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) 
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) 
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) 
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) 
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) 
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) 
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71) 
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) 
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) 
    at java.lang.Thread.run(Thread.java:722) 
Caused by: javax.security.auth.login.LoginException: No LoginModules configured for jdbcRealm 
    at javax.security.auth.login.LoginContext.init(LoginContext.java:273) 
    at javax.security.auth.login.LoginContext.<init>(LoginContext.java:382) 
    at javax.security.auth.login.LoginContext.<init>(LoginContext.java:459) 
    at com.sun.enterprise.security.auth.login.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:381) 
    ... 29 more 

? jdbcRealm과 관련된 모든 스택 기사를 읽고, 나는 모든 jdbc 커넥터, 보안 영역 및 데이터 테이블의 적절한 구성을 가지고 있다고 믿는다. 다시 부팅하기 전에 작동 중입니다.

내가 didn를 것을 발견 2

업데이트

/* 
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 
* 
* Copyright (c) 2004-2010 Oracle and/or its affiliates. All rights reserved. 
* 
* The contents of this file are subject to the terms of either the GNU 
* General Public License Version 2 only ("GPL") or the Common Development 
* and Distribution License("CDDL") (collectively, the "License"). You 
* may not use this file except in compliance with the License. You can 
* obtain a copy of the License at 
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html 
* or packager/legal/LICENSE.txt. See the License for the specific 
* language governing permissions and limitations under the License. 
* 
* When distributing the software, include this License Header Notice in each 
* file and include the License file at packager/legal/LICENSE.txt. 
* 
* GPL Classpath Exception: 
* Oracle designates this particular file as subject to the "Classpath" 
* exception as provided by Oracle in the GPL Version 2 section of the License 
* file that accompanied this code. 
* 
* Modifications: 
* If applicable, add the following below the License Header, with the fields 
* enclosed by brackets [] replaced by your own identifying information: 
* "Portions Copyright [year] [name of copyright owner]" 
* 
* Contributor(s): 
* If you wish your version of this file to be governed by only the CDDL or 
* only the GPL Version 2, indicate your decision by adding "[Contributor] 
* elects to include this software in this distribution under the [CDDL or GPL 
* Version 2] license." If you don't indicate a single choice of license, a 
* recipient has the option to distribute your version of this file under 
* either the CDDL, the GPL Version 2 or to extend the choice of license to 
* its licensees as provided above. However, if you add GPL Version 2 code 
* and therefore, elected the GPL Version 2 license, then the option applies 
* only if the new code is made subject to such option by the copyright 
* holder. 
*/ 

fileRealm { 
    com.sun.enterprise.security.auth.login.FileLoginModule required; 
}; 

ldapRealm { 
    com.sun.enterprise.security.auth.login.LDAPLoginModule required; 
}; 

solarisRealm { 
    com.sun.enterprise.security.auth.login.SolarisLoginModule required; 
}; 

jdbcRealm { 
    com.sun.enterprise.security.auth.login.JDBCLoginModule required; 
}; 

jdbcDigestRealm { 
    com.sun.enterprise.security.auth.login.JDBCDigestLoginModule required; 
}; 
pamRealm { 
    com.sun.enterprise.security.auth.login.PamLoginModule required; 
}; 

업데이트 /glassfish/domains/domain1/config/login.conf 1 @Nick 윌슨

내 {GLASS_HOME} 기본 인증이 활성화되고 있음을 언급하지 않습니다. 사용자는 이전과 마찬가지로 팝업 로그인 창을 받지만 이제는 모든 로그인 시도와 함께 위에 나열된 스택 트레이스를 인증 받고 수신 할 수 없습니다.

+0

영역 설정을 수정하면 GlassFish를 다시 시작할 때 발생할 수 있습니다. 결과적으로, 당신은 얼마 전에 그것을 수정했을 가능성이 있으며, 새로운 설정은 지금 만 커밋되었습니다. – perissf

+0

"LoginModules 구성 안 됨"오류는 도메인 "login.conf"파일과 관련 될 수 있습니다. domain/config 폴더에서 찾으십시오. 파일이 아직 거기에 있고 jdbcRealm에 대한 항목이 들어 있습니까? –

+0

@perissf 불행히도 구성을 두 번 확인하고 관리 콘솔에서 "저장"했습니다. 여전히 작동하지 않습니다. – Erwin

답변

0

이 질문은 타사 응용 프로그램의

other thread에, 얼마 전에, 해결 된 것은 결과적으로 이전의 JAAS 구성

을 파괴, 그것은 배포 및 글래스 피쉬 다시 부팅 한 후에로드 된 자신의 login.conf 파일을,이다로드하는
관련 문제