You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Szűcs Roland <sz...@bookandwalk.hu> on 2023/06/19 09:05:16 UTC

How to create core on Ubuntu 22.04 with Solr 9.2.1

Hi SOLR community,

I had a few projects with solr on windows but this is the very first time
to work with Solr on Ubuntu. I followed every step of the
https://solr.apache.org/guide/solr/latest/deployment-guide/taking-solr-to-production.html.
When My non-root user executed that install script.

The solr user and group was created by the installation script, I left
everything on default. I could access the admin page of Solr on localhost.
Then I tried to create a core from the terminal in single node mode which
is automatically recognized anyway, and got the following error:

WARNING: Using _default configset with data driven schema functionality.
NOT RECOMMENDED for production use.
         To turn off: bin/solr config -c books -p 8983 -action
set-user-property -property update.autoCreateFields -value false

ERROR: Failed to create new core instance directory: /var/solr/data/books

Then following the instruction I ran: /opt/solr//op/bin/bin/solr config -c
books -p 8983 -action set-user-property -property update.autoCreateFields
-value false. I git the next error:

POSTing request to Config API: http://localhost:8983/solr/books/config
{"set-user-property":{"update.autoCreateFields":"false"}}

ERROR: Error from server at http://localhost:8983/solr: Expected mime type
in [application/octet-stream, application/vnd.apache.solr.javabin] but got
text/html. <p>
  Searching for Solr?<br/>
  You must type the correct path.<br/>
  Solr will respond.
</p>

It is understandable because even books core was not created so I guess the
referred endpoint does not exist.

So my question is, how can I set up a core based on the default configset
which I can later customize before start indexing?

Thanks for your help in advance!

Roland

Re: How to create core on Ubuntu 22.04 with Solr 9.2.1

Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/19/2023 7:42 PM, sandeep vura wrote:
> How to Unsubscribe to this group

https://solr.apache.org/community.html#mailing-lists-chat

If clicking on the UNSUBSCRIBE link doesn't open the proper program for 
mail, just hover your mouse over it and you'll see what email address to 
send to.  The email must come from the same address that is subscribed 
to the list.

Thanks,
Shawn

Re: How to create core on Ubuntu 22.04 with Solr 9.2.1

Posted by sandeep vura <sa...@gmail.com>.
How to Unsubscribe to this group

On Mon, Jun 19, 2023 at 5:40 PM Szűcs Roland <sz...@bookandwalk.hu>
wrote:

> Hey Shawn,
> Now it is clear and it worked.
>
> Thanks,
> Roland
>
> Shawn Heisey <ap...@elyograg.org> ezt írta (időpont: 2023. jún. 19., H,
> 17:48):
>
> > On 6/19/23 03:05, Szűcs Roland wrote:
> > > I had a few projects with solr on windows but this is the very first
> time
> > > to work with Solr on Ubuntu. I followed every step of the
> > >
> >
> https://solr.apache.org/guide/solr/latest/deployment-guide/taking-solr-to-production.html
> > .
> > > When My non-root user executed that install script.
> > >
> > > The solr user and group was created by the installation script, I left
> > > everything on default. I could access the admin page of Solr on
> > localhost.
> > > Then I tried to create a core from the terminal in single node mode
> which
> > > is automatically recognized anyway, and got the following error:
> >
> > I can almost guarantee that the problem here is you ran the `bin/solr
> > create` command as a user other than solr.  Most likely root.
> >
> > Part of the creation is handled by the bin/solr script, part of it is
> > handled within Solr.  If the user running the solr service cannot write
> > to the new core directory created by the script, then the creation will
> > fail.
> >
> > You need to run the bin/solr command as solr, never root or any other
> user.
> >
> > Thanks,
> > Shawn
> >
>
-- 
Sandeep V

Re: How to create core on Ubuntu 22.04 with Solr 9.2.1

Posted by Szűcs Roland <sz...@bookandwalk.hu>.
Hey Shawn,
Now it is clear and it worked.

Thanks,
Roland

Shawn Heisey <ap...@elyograg.org> ezt írta (időpont: 2023. jún. 19., H,
17:48):

> On 6/19/23 03:05, Szűcs Roland wrote:
> > I had a few projects with solr on windows but this is the very first time
> > to work with Solr on Ubuntu. I followed every step of the
> >
> https://solr.apache.org/guide/solr/latest/deployment-guide/taking-solr-to-production.html
> .
> > When My non-root user executed that install script.
> >
> > The solr user and group was created by the installation script, I left
> > everything on default. I could access the admin page of Solr on
> localhost.
> > Then I tried to create a core from the terminal in single node mode which
> > is automatically recognized anyway, and got the following error:
>
> I can almost guarantee that the problem here is you ran the `bin/solr
> create` command as a user other than solr.  Most likely root.
>
> Part of the creation is handled by the bin/solr script, part of it is
> handled within Solr.  If the user running the solr service cannot write
> to the new core directory created by the script, then the creation will
> fail.
>
> You need to run the bin/solr command as solr, never root or any other user.
>
> Thanks,
> Shawn
>

Re: How to create core on Ubuntu 22.04 with Solr 9.2.1

Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/19/23 03:05, Szűcs Roland wrote:
> I had a few projects with solr on windows but this is the very first time
> to work with Solr on Ubuntu. I followed every step of the
> https://solr.apache.org/guide/solr/latest/deployment-guide/taking-solr-to-production.html.
> When My non-root user executed that install script.
> 
> The solr user and group was created by the installation script, I left
> everything on default. I could access the admin page of Solr on localhost.
> Then I tried to create a core from the terminal in single node mode which
> is automatically recognized anyway, and got the following error: 

I can almost guarantee that the problem here is you ran the `bin/solr 
create` command as a user other than solr.  Most likely root.

Part of the creation is handled by the bin/solr script, part of it is 
handled within Solr.  If the user running the solr service cannot write 
to the new core directory created by the script, then the creation will 
fail.

You need to run the bin/solr command as solr, never root or any other user.

Thanks,
Shawn