android - Gradle runs fine under interactive account but not under NT service -
we have batch file build our android application. runs gradlew.bat assemble
. when remote desktop build machine (windows 8) , run batch file, builds expected. however, when invoke batch file through nt service, start getting errors.
the account service runs under have administrative privileges on machine.
the first error javax.net.ssl.sslhandshakeexception
. based on post android studio gradle build failed. error:cause: peer not authenticated, modified gradle-wrapper.properties
use http
instead of https
distribution url. took care of problem.
the next error similar time downloading pom file. based on post android- gradle: issue occurred configuring root project android studio, modified build.gradle
use http://jcenter.bintray.com/
url instead of default https
.
now getting following error:
could not parse pom http://jcenter.bintray.com/com/android/tools/build/gradle/1.1.0/gradle-1.1.0.pom
i wondering why https
cause problem in nt service account not in normal interactive account. there way fix it? if not, appreciate if has insight on above error means. regards.
a common source of problems when programs execute interactive user, fail when run service, user settings surrounding execution have changed. example, when run gradle, there settings in %userprofile% \ .gradle (typically c:\users\<username>, logged in interactively different account under service running.)
when run service, there different user profile, or possibly none @ all. have batch script dump environment (add "set" near top of .bat file - dump alphabetical list of environment variables), , compare output when runs service when run interactively. see if userprofile defined, , if compare .gradle folder in service's area own .gradle folder.
in addition gradle settings, gradle's cache typically under .gradle folder. cache contain different items cache of service, may significant if there authentication issues in external repositories build tries connect (again, possibly result of different credentials in user configurations!)
the tool processing https request may certificates somewhere in user profile. may have accepted certificate (used 'recognize' https server) not included in accepted certificates of service. these in .keystore file in user profile. java's keytool.exe can decode , dump file.
other tools involved in build may have settings stored in userprofile space, differ between space , of service account - example android (.android), java, maven (.m2), git (.gitconfig), etc.
Comments
Post a Comment