You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Hakan Özler <oz...@gmail.com> on 2023/11/20 10:08:13 UTC
Receiving 405 error messages for alias deletion
Hi there!
While I was working on alias management in SOLR, I noticed that the V2 of
alias deletion [1] is not allowed in Solr 9.4, and that there seems to be a
missing endpoint causing 405s with every attempt using the following
request:
List aliases:
$ curl -i -L -X GET 'http://localhost:8983/api/aliases'
{"responseHeader":{"status":0,"QTime":5},"aliases":{"my-alias":"my-cloud-collection"},"properties":{}}
Delete V2 alias 'my-alias':
$ curl -i -L -X DELETE 'http://localhost:8983/api/aliases/my-alias'
HTTP/1.1 405 Method Not Allowed
However, its V1 API works fine:
$ curl -i -L -X DELETE '
http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=my-alias
'
{"responseHeader":{"status":0,"QTime":5}}
If I'm not mistaken according to the docs, do you think this might be
related to these improvements: [2]?
Thanks,
Hakan
1.
https://solr.apache.org/guide/solr/latest/deployment-guide/alias-management.html#deletealias
2. https://issues.apache.org/jira/browse/SOLR-16393
Re: Receiving 405 error messages for alias deletion
Posted by Shawn Heisey <el...@elyograg.org.INVALID>.
On 11/20/23 04:44, ufuk yılmaz wrote:
> +1 I also get the same error with a fresh solrcloud 9.4 installation. Jetty configuration doesn’t seem to have anything to block that request.
>
> Any idea where the implementation for this API interface is? Is it automatically generated?
> https://github.com/apache/solr/blob/main/solr/api/src/java/org/apache/solr/client/api/endpoint/DeleteAliasApi.java
>
> --ufuk yilmaz
>
> Sent from Mail for Windows
>
> From: Hakan Özler
> Sent: Monday, November 20, 2023 1:15 PM
> To: users@solr.apache.org
> Subject: Receiving 405 error messages for alias deletion
>
> Hi there!
>
> While I was working on alias management in SOLR, I noticed that the V2 of
> alias deletion [1] is not allowed in Solr 9.4, and that there seems to be a
> missing endpoint causing 405s with every attempt using the following
> request:
>
> List aliases:
> $ curl -i -L -X GET 'http://localhost:8983/api/aliases'
> {"responseHeader":{"status":0,"QTime":5},"aliases":{"my-alias":"my-cloud-collection"},"properties":{}}
>
> Delete V2 alias 'my-alias':
> $ curl -i -L -X DELETE 'http://localhost:8983/api/aliases/my-alias'
> HTTP/1.1 405 Method Not Allowed
This is what I get from version 9.5.0-SNAPSHOT which I just compiled
today from branch_9x:
elyograg@bilbo:/opt/solr$ curl -v -L -X DELETE
'http://localhost:8983/api/aliases/foo'
* Trying 127.0.0.1:8983...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8983 (#0)
> DELETE /api/aliases/foo HTTP/1.1
> Host: localhost:8983
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 405 Method Not Allowed
< Allow: GET,OPTIONS
< Content-Length: 0
<
* Connection #0 to host localhost left intact
This looks to me like the DELETE method is not allowed for that URL
path. I do not know where the code that actually implements the v2 API
lives, and I do not know if it is Jetty itself or the servlet that
limits the allowed methods.
Thanks,
Shawn
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org
Re: Receiving 405 error messages for alias deletion
Posted by Hakan Özler <oz...@gmail.com>.
Here it is: https://issues.apache.org/jira/browse/SOLR-17086
Thanks Jason!
Hakan
On Tue, 28 Nov 2023 at 12:47, Hakan Özler <oz...@gmail.com> wrote:
> No prob! I'll paste it here shortly.
>
> Thanks,
> Hakan
>
> On Mon, 27 Nov 2023 at 22:00, Jason Gerlowski <ge...@gmail.com>
> wrote:
>
>> Thanks Hakan, that also sounds like a bug.
>>
>> Would you be willing to file a JIRA ticket describing this issue? (I can
>> file one in a few days if you're not able or willing, but I would/will
>> mostly be quoting your email above)
>>
>> Best,
>>
>> Jason
>>
>> On Thu, Nov 23, 2023 at 6:26 AM Hakan Özler <oz...@gmail.com>
>> wrote:
>>
>> > Thank you for the prompt response guys!
>> >
>> > Apart from this case, I've encountered other problems that are peculiar
>> to
>> > the v2 API in 9.4.
>> >
>> > 1. Creating a backup [1] request using the v2 api directives
>> sporadically
>> > returns `An exception was not mapped due to exception mapper failure.
>> The
>> > HTTP 500 response will be returned` with the following stack trace.
>> > However, the backup process is always successfully completed.
>> >
>> > java.lang.NullPointerException: Cannot invoke
>> > "org.apache.solr.request.SolrQueryRequest.getParams()" because
>> > "solrQueryRequest" is null
>> > at
>> >
>> >
>> org.apache.solr.handler.api.V2ApiUtils.getMediaTypeFromWtParam(V2ApiUtils.java:92)
>> > at
>> >
>> >
>> org.apache.solr.jersey.MediaTypeOverridingFilter.filter(MediaTypeOverridingFilter.java:64)
>> > at
>> >
>> >
>> org.glassfish.jersey.server.ContainerFilteringStage$ResponseFilterStage.apply(ContainerFilteringStage.java:172)
>> > at
>> >
>> >
>> org.glassfish.jersey.server.ContainerFilteringStage$ResponseFilterStage.apply(ContainerFilteringStage.java:139)
>> > at org.glassfish.jersey.process.internal.Stages.process(Stages.java:147)
>> > at
>> >
>> >
>> org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:378)
>> >
>> > 2. Creating a replica [2] obviously has the same behavior. We're able to
>> > create a replica but we receive the message above at times.
>> >
>> > 1.
>> >
>> >
>> https://solr.apache.org/guide/solr/latest/deployment-guide/collection-management.html#backup
>> > 2.
>> >
>> >
>> https://solr.apache.org/guide/solr/latest/deployment-guide/replica-management.html#addreplica
>> >
>> >
>> > On Mon, 20 Nov 2023 at 17:39, Jason Gerlowski <ge...@gmail.com>
>> > wrote:
>> >
>> > > Good catch! This is definitely a bug that I introduced as a part of
>> > > SOLR-16393 - sorry for the trouble.
>> > >
>> > > The problem, counter-intuitively, is this line. [1]. The annotations
>> in
>> > > this file are overriding the ones we need in 'DeleteAliasApi' (which
>> is
>> > > where the path and verb are specified).
>> > >
>> > > I'll get this fixed and backported for 9.4.1/9.5. I imagine it's cold
>> > > comfort, but I really appreciate you guys trying out the v2 APIs and
>> > > catching bugs - sorry it ended up burning you guys this time.
>> > >
>> > > Best,
>> > >
>> > > Jason
>> > >
>> > > [1]
>> > >
>> > >
>> >
>> https://github.com/apache/solr/blob/9463f666f40f1d72a0ac7b3c46c7f8048ef8eaa9/solr/core/src/java/org/apache/solr/handler/admin/api/DeleteAlias.java#L55
>> > >
>> > > On Mon, Nov 20, 2023 at 6:46 AM ufuk yılmaz
>> <uyilmaz@vivaldi.net.invalid
>> > >
>> > > wrote:
>> > >
>> > > > +1 I also get the same error with a fresh solrcloud 9.4
>> installation.
>> > > > Jetty configuration doesn’t seem to have anything to block that
>> > request.
>> > > >
>> > > > Any idea where the implementation for this API interface is? Is it
>> > > > automatically generated?
>> > > >
>> > > >
>> > >
>> >
>> https://github.com/apache/solr/blob/main/solr/api/src/java/org/apache/solr/client/api/endpoint/DeleteAliasApi.java
>> > > >
>> > > > --ufuk yilmaz
>> > > >
>> > > > Sent from Mail for Windows
>> > > >
>> > > > From: Hakan Özler
>> > > > Sent: Monday, November 20, 2023 1:15 PM
>> > > > To: users@solr.apache.org
>> > > > Subject: Receiving 405 error messages for alias deletion
>> > > >
>> > > > Hi there!
>> > > >
>> > > > While I was working on alias management in SOLR, I noticed that the
>> V2
>> > of
>> > > > alias deletion [1] is not allowed in Solr 9.4, and that there seems
>> to
>> > > be a
>> > > > missing endpoint causing 405s with every attempt using the following
>> > > > request:
>> > > >
>> > > > List aliases:
>> > > > $ curl -i -L -X GET 'http://localhost:8983/api/aliases'
>> > > >
>> > > >
>> > >
>> >
>> {"responseHeader":{"status":0,"QTime":5},"aliases":{"my-alias":"my-cloud-collection"},"properties":{}}
>> > > >
>> > > > Delete V2 alias 'my-alias':
>> > > > $ curl -i -L -X DELETE 'http://localhost:8983/api/aliases/my-alias'
>> > > > HTTP/1.1 405 Method Not Allowed
>> > > >
>> > > > However, its V1 API works fine:
>> > > > $ curl -i -L -X DELETE '
>> > > >
>> > > >
>> > >
>> >
>> http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=my-alias
>> > > > '
>> > > > {"responseHeader":{"status":0,"QTime":5}}
>> > > >
>> > > > If I'm not mistaken according to the docs, do you think this might
>> be
>> > > > related to these improvements: [2]?
>> > > >
>> > > > Thanks,
>> > > > Hakan
>> > > >
>> > > > 1.
>> > > >
>> > > >
>> > >
>> >
>> https://solr.apache.org/guide/solr/latest/deployment-guide/alias-management.html#deletealias
>> > > > 2. https://issues.apache.org/jira/browse/SOLR-16393
>> > > >
>> > > >
>> > >
>> >
>>
>
Re: Receiving 405 error messages for alias deletion
Posted by Hakan Özler <oz...@gmail.com>.
No prob! I'll paste it here shortly.
Thanks,
Hakan
On Mon, 27 Nov 2023 at 22:00, Jason Gerlowski <ge...@gmail.com> wrote:
> Thanks Hakan, that also sounds like a bug.
>
> Would you be willing to file a JIRA ticket describing this issue? (I can
> file one in a few days if you're not able or willing, but I would/will
> mostly be quoting your email above)
>
> Best,
>
> Jason
>
> On Thu, Nov 23, 2023 at 6:26 AM Hakan Özler <oz...@gmail.com> wrote:
>
> > Thank you for the prompt response guys!
> >
> > Apart from this case, I've encountered other problems that are peculiar
> to
> > the v2 API in 9.4.
> >
> > 1. Creating a backup [1] request using the v2 api directives sporadically
> > returns `An exception was not mapped due to exception mapper failure. The
> > HTTP 500 response will be returned` with the following stack trace.
> > However, the backup process is always successfully completed.
> >
> > java.lang.NullPointerException: Cannot invoke
> > "org.apache.solr.request.SolrQueryRequest.getParams()" because
> > "solrQueryRequest" is null
> > at
> >
> >
> org.apache.solr.handler.api.V2ApiUtils.getMediaTypeFromWtParam(V2ApiUtils.java:92)
> > at
> >
> >
> org.apache.solr.jersey.MediaTypeOverridingFilter.filter(MediaTypeOverridingFilter.java:64)
> > at
> >
> >
> org.glassfish.jersey.server.ContainerFilteringStage$ResponseFilterStage.apply(ContainerFilteringStage.java:172)
> > at
> >
> >
> org.glassfish.jersey.server.ContainerFilteringStage$ResponseFilterStage.apply(ContainerFilteringStage.java:139)
> > at org.glassfish.jersey.process.internal.Stages.process(Stages.java:147)
> > at
> >
> >
> org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:378)
> >
> > 2. Creating a replica [2] obviously has the same behavior. We're able to
> > create a replica but we receive the message above at times.
> >
> > 1.
> >
> >
> https://solr.apache.org/guide/solr/latest/deployment-guide/collection-management.html#backup
> > 2.
> >
> >
> https://solr.apache.org/guide/solr/latest/deployment-guide/replica-management.html#addreplica
> >
> >
> > On Mon, 20 Nov 2023 at 17:39, Jason Gerlowski <ge...@gmail.com>
> > wrote:
> >
> > > Good catch! This is definitely a bug that I introduced as a part of
> > > SOLR-16393 - sorry for the trouble.
> > >
> > > The problem, counter-intuitively, is this line. [1]. The annotations in
> > > this file are overriding the ones we need in 'DeleteAliasApi' (which is
> > > where the path and verb are specified).
> > >
> > > I'll get this fixed and backported for 9.4.1/9.5. I imagine it's cold
> > > comfort, but I really appreciate you guys trying out the v2 APIs and
> > > catching bugs - sorry it ended up burning you guys this time.
> > >
> > > Best,
> > >
> > > Jason
> > >
> > > [1]
> > >
> > >
> >
> https://github.com/apache/solr/blob/9463f666f40f1d72a0ac7b3c46c7f8048ef8eaa9/solr/core/src/java/org/apache/solr/handler/admin/api/DeleteAlias.java#L55
> > >
> > > On Mon, Nov 20, 2023 at 6:46 AM ufuk yılmaz
> <uyilmaz@vivaldi.net.invalid
> > >
> > > wrote:
> > >
> > > > +1 I also get the same error with a fresh solrcloud 9.4 installation.
> > > > Jetty configuration doesn’t seem to have anything to block that
> > request.
> > > >
> > > > Any idea where the implementation for this API interface is? Is it
> > > > automatically generated?
> > > >
> > > >
> > >
> >
> https://github.com/apache/solr/blob/main/solr/api/src/java/org/apache/solr/client/api/endpoint/DeleteAliasApi.java
> > > >
> > > > --ufuk yilmaz
> > > >
> > > > Sent from Mail for Windows
> > > >
> > > > From: Hakan Özler
> > > > Sent: Monday, November 20, 2023 1:15 PM
> > > > To: users@solr.apache.org
> > > > Subject: Receiving 405 error messages for alias deletion
> > > >
> > > > Hi there!
> > > >
> > > > While I was working on alias management in SOLR, I noticed that the
> V2
> > of
> > > > alias deletion [1] is not allowed in Solr 9.4, and that there seems
> to
> > > be a
> > > > missing endpoint causing 405s with every attempt using the following
> > > > request:
> > > >
> > > > List aliases:
> > > > $ curl -i -L -X GET 'http://localhost:8983/api/aliases'
> > > >
> > > >
> > >
> >
> {"responseHeader":{"status":0,"QTime":5},"aliases":{"my-alias":"my-cloud-collection"},"properties":{}}
> > > >
> > > > Delete V2 alias 'my-alias':
> > > > $ curl -i -L -X DELETE 'http://localhost:8983/api/aliases/my-alias'
> > > > HTTP/1.1 405 Method Not Allowed
> > > >
> > > > However, its V1 API works fine:
> > > > $ curl -i -L -X DELETE '
> > > >
> > > >
> > >
> >
> http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=my-alias
> > > > '
> > > > {"responseHeader":{"status":0,"QTime":5}}
> > > >
> > > > If I'm not mistaken according to the docs, do you think this might be
> > > > related to these improvements: [2]?
> > > >
> > > > Thanks,
> > > > Hakan
> > > >
> > > > 1.
> > > >
> > > >
> > >
> >
> https://solr.apache.org/guide/solr/latest/deployment-guide/alias-management.html#deletealias
> > > > 2. https://issues.apache.org/jira/browse/SOLR-16393
> > > >
> > > >
> > >
> >
>
Re: Receiving 405 error messages for alias deletion
Posted by Jason Gerlowski <ge...@gmail.com>.
Thanks Hakan, that also sounds like a bug.
Would you be willing to file a JIRA ticket describing this issue? (I can
file one in a few days if you're not able or willing, but I would/will
mostly be quoting your email above)
Best,
Jason
On Thu, Nov 23, 2023 at 6:26 AM Hakan Özler <oz...@gmail.com> wrote:
> Thank you for the prompt response guys!
>
> Apart from this case, I've encountered other problems that are peculiar to
> the v2 API in 9.4.
>
> 1. Creating a backup [1] request using the v2 api directives sporadically
> returns `An exception was not mapped due to exception mapper failure. The
> HTTP 500 response will be returned` with the following stack trace.
> However, the backup process is always successfully completed.
>
> java.lang.NullPointerException: Cannot invoke
> "org.apache.solr.request.SolrQueryRequest.getParams()" because
> "solrQueryRequest" is null
> at
>
> org.apache.solr.handler.api.V2ApiUtils.getMediaTypeFromWtParam(V2ApiUtils.java:92)
> at
>
> org.apache.solr.jersey.MediaTypeOverridingFilter.filter(MediaTypeOverridingFilter.java:64)
> at
>
> org.glassfish.jersey.server.ContainerFilteringStage$ResponseFilterStage.apply(ContainerFilteringStage.java:172)
> at
>
> org.glassfish.jersey.server.ContainerFilteringStage$ResponseFilterStage.apply(ContainerFilteringStage.java:139)
> at org.glassfish.jersey.process.internal.Stages.process(Stages.java:147)
> at
>
> org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:378)
>
> 2. Creating a replica [2] obviously has the same behavior. We're able to
> create a replica but we receive the message above at times.
>
> 1.
>
> https://solr.apache.org/guide/solr/latest/deployment-guide/collection-management.html#backup
> 2.
>
> https://solr.apache.org/guide/solr/latest/deployment-guide/replica-management.html#addreplica
>
>
> On Mon, 20 Nov 2023 at 17:39, Jason Gerlowski <ge...@gmail.com>
> wrote:
>
> > Good catch! This is definitely a bug that I introduced as a part of
> > SOLR-16393 - sorry for the trouble.
> >
> > The problem, counter-intuitively, is this line. [1]. The annotations in
> > this file are overriding the ones we need in 'DeleteAliasApi' (which is
> > where the path and verb are specified).
> >
> > I'll get this fixed and backported for 9.4.1/9.5. I imagine it's cold
> > comfort, but I really appreciate you guys trying out the v2 APIs and
> > catching bugs - sorry it ended up burning you guys this time.
> >
> > Best,
> >
> > Jason
> >
> > [1]
> >
> >
> https://github.com/apache/solr/blob/9463f666f40f1d72a0ac7b3c46c7f8048ef8eaa9/solr/core/src/java/org/apache/solr/handler/admin/api/DeleteAlias.java#L55
> >
> > On Mon, Nov 20, 2023 at 6:46 AM ufuk yılmaz <uyilmaz@vivaldi.net.invalid
> >
> > wrote:
> >
> > > +1 I also get the same error with a fresh solrcloud 9.4 installation.
> > > Jetty configuration doesn’t seem to have anything to block that
> request.
> > >
> > > Any idea where the implementation for this API interface is? Is it
> > > automatically generated?
> > >
> > >
> >
> https://github.com/apache/solr/blob/main/solr/api/src/java/org/apache/solr/client/api/endpoint/DeleteAliasApi.java
> > >
> > > --ufuk yilmaz
> > >
> > > Sent from Mail for Windows
> > >
> > > From: Hakan Özler
> > > Sent: Monday, November 20, 2023 1:15 PM
> > > To: users@solr.apache.org
> > > Subject: Receiving 405 error messages for alias deletion
> > >
> > > Hi there!
> > >
> > > While I was working on alias management in SOLR, I noticed that the V2
> of
> > > alias deletion [1] is not allowed in Solr 9.4, and that there seems to
> > be a
> > > missing endpoint causing 405s with every attempt using the following
> > > request:
> > >
> > > List aliases:
> > > $ curl -i -L -X GET 'http://localhost:8983/api/aliases'
> > >
> > >
> >
> {"responseHeader":{"status":0,"QTime":5},"aliases":{"my-alias":"my-cloud-collection"},"properties":{}}
> > >
> > > Delete V2 alias 'my-alias':
> > > $ curl -i -L -X DELETE 'http://localhost:8983/api/aliases/my-alias'
> > > HTTP/1.1 405 Method Not Allowed
> > >
> > > However, its V1 API works fine:
> > > $ curl -i -L -X DELETE '
> > >
> > >
> >
> http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=my-alias
> > > '
> > > {"responseHeader":{"status":0,"QTime":5}}
> > >
> > > If I'm not mistaken according to the docs, do you think this might be
> > > related to these improvements: [2]?
> > >
> > > Thanks,
> > > Hakan
> > >
> > > 1.
> > >
> > >
> >
> https://solr.apache.org/guide/solr/latest/deployment-guide/alias-management.html#deletealias
> > > 2. https://issues.apache.org/jira/browse/SOLR-16393
> > >
> > >
> >
>
Re: Receiving 405 error messages for alias deletion
Posted by Hakan Özler <oz...@gmail.com>.
Thank you for the prompt response guys!
Apart from this case, I've encountered other problems that are peculiar to
the v2 API in 9.4.
1. Creating a backup [1] request using the v2 api directives sporadically
returns `An exception was not mapped due to exception mapper failure. The
HTTP 500 response will be returned` with the following stack trace.
However, the backup process is always successfully completed.
java.lang.NullPointerException: Cannot invoke
"org.apache.solr.request.SolrQueryRequest.getParams()" because
"solrQueryRequest" is null
at
org.apache.solr.handler.api.V2ApiUtils.getMediaTypeFromWtParam(V2ApiUtils.java:92)
at
org.apache.solr.jersey.MediaTypeOverridingFilter.filter(MediaTypeOverridingFilter.java:64)
at
org.glassfish.jersey.server.ContainerFilteringStage$ResponseFilterStage.apply(ContainerFilteringStage.java:172)
at
org.glassfish.jersey.server.ContainerFilteringStage$ResponseFilterStage.apply(ContainerFilteringStage.java:139)
at org.glassfish.jersey.process.internal.Stages.process(Stages.java:147)
at
org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:378)
2. Creating a replica [2] obviously has the same behavior. We're able to
create a replica but we receive the message above at times.
1.
https://solr.apache.org/guide/solr/latest/deployment-guide/collection-management.html#backup
2.
https://solr.apache.org/guide/solr/latest/deployment-guide/replica-management.html#addreplica
On Mon, 20 Nov 2023 at 17:39, Jason Gerlowski <ge...@gmail.com> wrote:
> Good catch! This is definitely a bug that I introduced as a part of
> SOLR-16393 - sorry for the trouble.
>
> The problem, counter-intuitively, is this line. [1]. The annotations in
> this file are overriding the ones we need in 'DeleteAliasApi' (which is
> where the path and verb are specified).
>
> I'll get this fixed and backported for 9.4.1/9.5. I imagine it's cold
> comfort, but I really appreciate you guys trying out the v2 APIs and
> catching bugs - sorry it ended up burning you guys this time.
>
> Best,
>
> Jason
>
> [1]
>
> https://github.com/apache/solr/blob/9463f666f40f1d72a0ac7b3c46c7f8048ef8eaa9/solr/core/src/java/org/apache/solr/handler/admin/api/DeleteAlias.java#L55
>
> On Mon, Nov 20, 2023 at 6:46 AM ufuk yılmaz <uy...@vivaldi.net.invalid>
> wrote:
>
> > +1 I also get the same error with a fresh solrcloud 9.4 installation.
> > Jetty configuration doesn’t seem to have anything to block that request.
> >
> > Any idea where the implementation for this API interface is? Is it
> > automatically generated?
> >
> >
> https://github.com/apache/solr/blob/main/solr/api/src/java/org/apache/solr/client/api/endpoint/DeleteAliasApi.java
> >
> > --ufuk yilmaz
> >
> > Sent from Mail for Windows
> >
> > From: Hakan Özler
> > Sent: Monday, November 20, 2023 1:15 PM
> > To: users@solr.apache.org
> > Subject: Receiving 405 error messages for alias deletion
> >
> > Hi there!
> >
> > While I was working on alias management in SOLR, I noticed that the V2 of
> > alias deletion [1] is not allowed in Solr 9.4, and that there seems to
> be a
> > missing endpoint causing 405s with every attempt using the following
> > request:
> >
> > List aliases:
> > $ curl -i -L -X GET 'http://localhost:8983/api/aliases'
> >
> >
> {"responseHeader":{"status":0,"QTime":5},"aliases":{"my-alias":"my-cloud-collection"},"properties":{}}
> >
> > Delete V2 alias 'my-alias':
> > $ curl -i -L -X DELETE 'http://localhost:8983/api/aliases/my-alias'
> > HTTP/1.1 405 Method Not Allowed
> >
> > However, its V1 API works fine:
> > $ curl -i -L -X DELETE '
> >
> >
> http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=my-alias
> > '
> > {"responseHeader":{"status":0,"QTime":5}}
> >
> > If I'm not mistaken according to the docs, do you think this might be
> > related to these improvements: [2]?
> >
> > Thanks,
> > Hakan
> >
> > 1.
> >
> >
> https://solr.apache.org/guide/solr/latest/deployment-guide/alias-management.html#deletealias
> > 2. https://issues.apache.org/jira/browse/SOLR-16393
> >
> >
>
Re: Receiving 405 error messages for alias deletion
Posted by Jason Gerlowski <ge...@gmail.com>.
Good catch! This is definitely a bug that I introduced as a part of
SOLR-16393 - sorry for the trouble.
The problem, counter-intuitively, is this line. [1]. The annotations in
this file are overriding the ones we need in 'DeleteAliasApi' (which is
where the path and verb are specified).
I'll get this fixed and backported for 9.4.1/9.5. I imagine it's cold
comfort, but I really appreciate you guys trying out the v2 APIs and
catching bugs - sorry it ended up burning you guys this time.
Best,
Jason
[1]
https://github.com/apache/solr/blob/9463f666f40f1d72a0ac7b3c46c7f8048ef8eaa9/solr/core/src/java/org/apache/solr/handler/admin/api/DeleteAlias.java#L55
On Mon, Nov 20, 2023 at 6:46 AM ufuk yılmaz <uy...@vivaldi.net.invalid>
wrote:
> +1 I also get the same error with a fresh solrcloud 9.4 installation.
> Jetty configuration doesn’t seem to have anything to block that request.
>
> Any idea where the implementation for this API interface is? Is it
> automatically generated?
>
> https://github.com/apache/solr/blob/main/solr/api/src/java/org/apache/solr/client/api/endpoint/DeleteAliasApi.java
>
> --ufuk yilmaz
>
> Sent from Mail for Windows
>
> From: Hakan Özler
> Sent: Monday, November 20, 2023 1:15 PM
> To: users@solr.apache.org
> Subject: Receiving 405 error messages for alias deletion
>
> Hi there!
>
> While I was working on alias management in SOLR, I noticed that the V2 of
> alias deletion [1] is not allowed in Solr 9.4, and that there seems to be a
> missing endpoint causing 405s with every attempt using the following
> request:
>
> List aliases:
> $ curl -i -L -X GET 'http://localhost:8983/api/aliases'
>
> {"responseHeader":{"status":0,"QTime":5},"aliases":{"my-alias":"my-cloud-collection"},"properties":{}}
>
> Delete V2 alias 'my-alias':
> $ curl -i -L -X DELETE 'http://localhost:8983/api/aliases/my-alias'
> HTTP/1.1 405 Method Not Allowed
>
> However, its V1 API works fine:
> $ curl -i -L -X DELETE '
>
> http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=my-alias
> '
> {"responseHeader":{"status":0,"QTime":5}}
>
> If I'm not mistaken according to the docs, do you think this might be
> related to these improvements: [2]?
>
> Thanks,
> Hakan
>
> 1.
>
> https://solr.apache.org/guide/solr/latest/deployment-guide/alias-management.html#deletealias
> 2. https://issues.apache.org/jira/browse/SOLR-16393
>
>
RE: Receiving 405 error messages for alias deletion
Posted by ufuk yılmaz <uy...@vivaldi.net.INVALID>.
+1 I also get the same error with a fresh solrcloud 9.4 installation. Jetty configuration doesn’t seem to have anything to block that request.
Any idea where the implementation for this API interface is? Is it automatically generated?
https://github.com/apache/solr/blob/main/solr/api/src/java/org/apache/solr/client/api/endpoint/DeleteAliasApi.java
--ufuk yilmaz
Sent from Mail for Windows
From: Hakan Özler
Sent: Monday, November 20, 2023 1:15 PM
To: users@solr.apache.org
Subject: Receiving 405 error messages for alias deletion
Hi there!
While I was working on alias management in SOLR, I noticed that the V2 of
alias deletion [1] is not allowed in Solr 9.4, and that there seems to be a
missing endpoint causing 405s with every attempt using the following
request:
List aliases:
$ curl -i -L -X GET 'http://localhost:8983/api/aliases'
{"responseHeader":{"status":0,"QTime":5},"aliases":{"my-alias":"my-cloud-collection"},"properties":{}}
Delete V2 alias 'my-alias':
$ curl -i -L -X DELETE 'http://localhost:8983/api/aliases/my-alias'
HTTP/1.1 405 Method Not Allowed
However, its V1 API works fine:
$ curl -i -L -X DELETE '
http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=my-alias
'
{"responseHeader":{"status":0,"QTime":5}}
If I'm not mistaken according to the docs, do you think this might be
related to these improvements: [2]?
Thanks,
Hakan
1.
https://solr.apache.org/guide/solr/latest/deployment-guide/alias-management.html#deletealias
2. https://issues.apache.org/jira/browse/SOLR-16393
RE: Receiving 405 error messages for alias deletion
Posted by ufuk yılmaz <uy...@vivaldi.net.INVALID>.
+1 I also get the same error with a fresh solrcloud 9.4 installation. Jetty configuration doesn’t seem to have anything to block that request.
Any idea where the implementation for this API interface is? Is it automatically generated?
https://github.com/apache/solr/blob/main/solr/api/src/java/org/apache/solr/client/api/endpoint/DeleteAliasApi.java
--ufuk yilmaz
Sent from Mail for Windows
From: Hakan Özler
Sent: Monday, November 20, 2023 1:15 PM
To: users@solr.apache.org
Subject: Receiving 405 error messages for alias deletion
Hi there!
While I was working on alias management in SOLR, I noticed that the V2 of
alias deletion [1] is not allowed in Solr 9.4, and that there seems to be a
missing endpoint causing 405s with every attempt using the following
request:
List aliases:
$ curl -i -L -X GET 'http://localhost:8983/api/aliases'
{"responseHeader":{"status":0,"QTime":5},"aliases":{"my-alias":"my-cloud-collection"},"properties":{}}
Delete V2 alias 'my-alias':
$ curl -i -L -X DELETE 'http://localhost:8983/api/aliases/my-alias'
HTTP/1.1 405 Method Not Allowed
However, its V1 API works fine:
$ curl -i -L -X DELETE '
http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=my-alias
'
{"responseHeader":{"status":0,"QTime":5}}
If I'm not mistaken according to the docs, do you think this might be
related to these improvements: [2]?
Thanks,
Hakan
1.
https://solr.apache.org/guide/solr/latest/deployment-guide/alias-management.html#deletealias
2. https://issues.apache.org/jira/browse/SOLR-16393