You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@solr.apache.org by "Guse, Jimmy" <gu...@llnl.gov.INVALID> on 2022/06/23 16:38:29 UTC

Build issue

I'm trying to build the solr 9.0.0 release from source following the Gradle instructions on the cwiki.  I am getting the following error.  I'm getting the same error when using the latest git pull as well.

Thanks,
                Jimmy


> Task :solr:solr-ref-guide:buildLocalAntoraSite FAILED
{"level":"fatal","time":1655931597971,"name":"antora","hint":"Add the --stacktrace option to see the cause of the error.","msg":"problem encountered while reading ui.supplemental_files: ENOENT: no such file or directory, access '/home/guse1/workspace/solr-9.0.0/.gradle/node/solr-ref-guide/node_modules/@antora/lunr-extension/supplemental_ui'"}
/home/guse1/workspace/solr-9.0.0/.gradle/node/solr-ref-guide/node_modules/@antora/ui-loader/lib/load-ui.js:180<mailto:/home/guse1/workspace/solr-9.0.0/.gradle/node/solr-ref-guide/node_modules/@antora/ui-loader/lib/load-ui.js:180>
      if (response.statusCode !== 200) {
                   ^

TypeError: Cannot read properties of undefined (reading 'statusCode')
    at /home/guse1/workspace/solr-9.0.0/.gradle/node/solr-ref-guide/node_modules/@antora/ui-loader/lib/load-ui.js:180:20<mailto:/home/guse1/workspace/solr-9.0.0/.gradle/node/solr-ref-guide/node_modules/@antora/ui-loader/lib/load-ui.js:180:20>
    at ClientRequest.<anonymous> (/home/guse1/workspace/solr-9.0.0/.gradle/node/solr-ref-guide/node_modules/simple-get/index.js:88:21)
    at ClientRequest.f (/home/guse1/workspace/solr-9.0.0/.gradle/node/solr-ref-guide/node_modules/once/once.js:25:25)
    at ClientRequest.emit (node:events:390:28)
    at TLSSocket.socketErrorListener (node:_http_client:447:9)
    at TLSSocket.emit (node:events:390:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':solr:solr-ref-guide:buildLocalAntoraSite'.
> Process 'command '/home/guse1/workspace/solr-9.0.0/.gradle/node/nodejs/node-v16.13.2-linux-x64/bin/npx'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 53s
106 actionable tasks: 53 executed, 53 up-to-date

Re: Build issue

Posted by David Smiley <ds...@apache.org>.
On Fri, Jun 24, 2022 at 4:56 PM Guse, Jimmy <gu...@llnl.gov.invalid> wrote:

> The reason I’ve been in this swamp is that I use solr from within an
> application (both via the web and in cron scripts) running only as a single
> instance on localhost, never with direct user access.  To avoid having to
> deal with accounts and passwords (in files), I crafted an IdentAuthPlugin
> that I use as the authentication provider (which is secure for
> password-less authenticating of local users), and I add that into the
> released solr-core-x.y.z.jar to be used (I also need to modify the
> ‘credentials’ member of Sha256AuthenticationProvider class from private to
> protected, so I can subclass and override its authenticate() function
> inside my IdentAuthPlugin class – this just makes it simpler to leverage
> the existing functionality without duplicating it).  So my process involves
> taking the release-source, patching (Sha256AuthenticationProvider.java) it
> and adding (IdentAuthPlugin.java) to it, rebuilding it to get the updated
> .class files for those two Java classes and then stuffing them into the
> original solr-core-x.y.z.jar in the release-binary, so it drops in as a
> normal solr version .tgz package for updates/etc.
>
>
>
> So, would there be any interest in incorporating one (the privateàprotected
> patch) or both of these changes in the mainline source?
>

For the private->protected -- Sure; seems fine.  But for IdentAuthPlugin
you'd contribute; I'm unsure what it's doing.  I suppose you could share in
a PR.

~ David

RE: Build issue

Posted by "Guse, Jimmy" <gu...@llnl.gov.INVALID>.
To answer Shawn's questions, just for the record,
Running (Oracle) jdk-11 on RHEL 8
Using ./gradlew assemble
Obviously there's no git when just untarring the solr-9.0.0-src.tgz file; after doing the "git pull", the git status looks like "On branch main // Your branch is up to date with 'origin/main'."  So maybe that's not the "latest" stable (because as Houston implies, it should have worked fine in the latest branch)

Houston's fix worked perfectly and the build now completes just fine. BUT...I've noticed a few other changes from the v8 to v9 build that I thought I'd ask about, then I'll also describe why I'm in this swamp and see if there's any interest in incorporating my change in the main source:

First, with 8, I would do an "ant build", then an "ant create-package" (both in the "solr" subdirectory) to get the tar in the same form as the distribution.  I see a "./gradlew assembleDist" that appears to do the same thing, but I also see an assembleRelease.

Second, when I do the normal "./gradlew assemble", I'm getting all the jars (and tgz) tagged with -SNAPSHOT, whereas the "ant build" didn't do that when run directly from the release -src.tgz, so what is the proper gradle way to get the build to be 9.0.0 (in this case), not 9.0.0-SNAPSHOT (again, using the released solr-9.0.0-src.tgz as a starting point).


The reason I've been in this swamp is that I use solr from within an application (both via the web and in cron scripts) running only as a single instance on localhost, never with direct user access.  To avoid having to deal with accounts and passwords (in files), I crafted an IdentAuthPlugin that I use as the authentication provider (which is secure for password-less authenticating of local users), and I add that into the released solr-core-x.y.z.jar to be used (I also need to modify the 'credentials' member of Sha256AuthenticationProvider class from private to protected, so I can subclass and override its authenticate() function inside my IdentAuthPlugin class - this just makes it simpler to leverage the existing functionality without duplicating it).  So my process involves taking the release-source, patching (Sha256AuthenticationProvider.java) it and adding (IdentAuthPlugin.java) to it, rebuilding it to get the updated .class files for those two Java classes and then stuffing them into the original solr-core-x.y.z.jar in the release-binary, so it drops in as a normal solr version .tgz package for updates/etc.

So, would there be any interest in incorporating one (the private-->protected patch) or both of these changes in the mainline source?

Thanks,
                Jimmy


Re: Build issue

Posted by Houston Putman <ho...@apache.org>.
I've created https://issues.apache.org/jira/browse/SOLR-16264 so that this
isn't an issue going forward.

That incompatibility was unfortunately released just after Solr 9.0 was
out, and we fixed it for all branches, but obviously we can't fix the
release.

Sorry for the annoyance, but future releases will be safe from this.

- Houston

On Thu, Jun 23, 2022 at 1:49 PM Houston Putman <ho...@apache.org> wrote:

> As a quick fix you can run with the following option to not build the
> ref-guide locally.
>
> -Prefguide.include=false
>
>
>
> On Thu, Jun 23, 2022 at 1:39 PM Shawn Heisey <ap...@elyograg.org> wrote:
>
>> On 6/23/2022 10:38 AM, Guse, Jimmy wrote:
>> >
>> > I’m trying to build the solr 9.0.0 release from source following the
>> > Gradle instructions on the cwiki.  I am getting the following error.
>> > I’m getting the same error when using the latest git pull as well.
>> >
>>
>> If you run "git status" what do you see?
>>
>> What command are you running to do the build?
>>
>> What JDK are you using?  What OS are you trying to build on?
>>
>> Thanks,
>> Shawn
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
>> For additional commands, e-mail: dev-help@solr.apache.org
>>
>>

Re: Build issue

Posted by Houston Putman <ho...@apache.org>.
As a quick fix you can run with the following option to not build the
ref-guide locally.

-Prefguide.include=false



On Thu, Jun 23, 2022 at 1:39 PM Shawn Heisey <ap...@elyograg.org> wrote:

> On 6/23/2022 10:38 AM, Guse, Jimmy wrote:
> >
> > I’m trying to build the solr 9.0.0 release from source following the
> > Gradle instructions on the cwiki.  I am getting the following error.
> > I’m getting the same error when using the latest git pull as well.
> >
>
> If you run "git status" what do you see?
>
> What command are you running to do the build?
>
> What JDK are you using?  What OS are you trying to build on?
>
> Thanks,
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>

Re: Build issue

Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/23/2022 10:38 AM, Guse, Jimmy wrote:
>
> I’m trying to build the solr 9.0.0 release from source following the 
> Gradle instructions on the cwiki.  I am getting the following error.  
> I’m getting the same error when using the latest git pull as well.
>

If you run "git status" what do you see?

What command are you running to do the build?

What JDK are you using?  What OS are you trying to build on?

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org