solr-8983.pid: Permission denied

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

solr-8983.pid: Permission denied

Ryan W
What is my permissions problem here:

[root@faspbsy0002 bin]# service solr restart
Sending stop command to Solr running on port 8983 ... waiting up to 180
seconds to allow Jetty process 38947 to stop gracefully.
/opt/solr/bin/solr: line 2125: /opt/solr/bin/solr-8983.pid: Permission
denied

What is the practical effect if Solr can't write this solr-8983.pid file?
What user should own the contents of /opt/solr/bin ?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: solr-8983.pid: Permission denied

Alexandre Rafalovitch
It sounds like maybe you have started the Solr in a different way than
you are restarting it. E.g. maybe you started it manually (bin/solr
start, probably as a root) but are trying to restart it via service
script. Who owned the .pid file? I am guessing 'root', while the
service script probably runs as a different (lower-permission) user.

The practical effect of that assumption is that your environmental
variables were set differently and various things (e.g. logs) may not
be where you expect.

The solution is to be consistent in using the service to
start/restart/stop your Solr.

Regards,
   Alex.

On Thu, 15 Oct 2020 at 09:51, Ryan W <[hidden email]> wrote:

>
> What is my permissions problem here:
>
> [root@faspbsy0002 bin]# service solr restart
> Sending stop command to Solr running on port 8983 ... waiting up to 180
> seconds to allow Jetty process 38947 to stop gracefully.
> /opt/solr/bin/solr: line 2125: /opt/solr/bin/solr-8983.pid: Permission
> denied
>
> What is the practical effect if Solr can't write this solr-8983.pid file?
> What user should own the contents of /opt/solr/bin ?
>
> Thanks
Reply | Threaded
Open this post in threaded view
|

Re: solr-8983.pid: Permission denied

Joe Doupnik
     Alex has it right. In my environment I created user "solr" in group
"users". Then I ensured that "solr:user" owns all of Solr's files. In
addition, I do Solr start/stop with an /etc/init.d script (the Solr
distribution has the basic one which we can embellish) in which there is
control line RUNAS="solr". The RUNAS variable is used to properly start
Solr.
     Thanks,
     Joe D.

On 15/10/2020 15:02, Alexandre Rafalovitch wrote:

> It sounds like maybe you have started the Solr in a different way than
> you are restarting it. E.g. maybe you started it manually (bin/solr
> start, probably as a root) but are trying to restart it via service
> script. Who owned the .pid file? I am guessing 'root', while the
> service script probably runs as a different (lower-permission) user.
>
> The practical effect of that assumption is that your environmental
> variables were set differently and various things (e.g. logs) may not
> be where you expect.
>
> The solution is to be consistent in using the service to
> start/restart/stop your Solr.
>
> Regards,
>     Alex.
>
> On Thu, 15 Oct 2020 at 09:51, Ryan W <[hidden email]> wrote:
>> What is my permissions problem here:
>>
>> [root@faspbsy0002 bin]# service solr restart
>> Sending stop command to Solr running on port 8983 ... waiting up to 180
>> seconds to allow Jetty process 38947 to stop gracefully.
>> /opt/solr/bin/solr: line 2125: /opt/solr/bin/solr-8983.pid: Permission
>> denied
>>
>> What is the practical effect if Solr can't write this solr-8983.pid file?
>> What user should own the contents of /opt/solr/bin ?
>>
>> Thanks

Reply | Threaded
Open this post in threaded view
|

Re: solr-8983.pid: Permission denied

Ryan W
I have been starting solr like so...

service solr start


On Thu, Oct 15, 2020 at 10:31 AM Joe Doupnik <[hidden email]> wrote:

>      Alex has it right. In my environment I created user "solr" in group
> "users". Then I ensured that "solr:user" owns all of Solr's files. In
> addition, I do Solr start/stop with an /etc/init.d script (the Solr
> distribution has the basic one which we can embellish) in which there is
> control line RUNAS="solr". The RUNAS variable is used to properly start
> Solr.
>      Thanks,
>      Joe D.
>
> On 15/10/2020 15:02, Alexandre Rafalovitch wrote:
> > It sounds like maybe you have started the Solr in a different way than
> > you are restarting it. E.g. maybe you started it manually (bin/solr
> > start, probably as a root) but are trying to restart it via service
> > script. Who owned the .pid file? I am guessing 'root', while the
> > service script probably runs as a different (lower-permission) user.
> >
> > The practical effect of that assumption is that your environmental
> > variables were set differently and various things (e.g. logs) may not
> > be where you expect.
> >
> > The solution is to be consistent in using the service to
> > start/restart/stop your Solr.
> >
> > Regards,
> >     Alex.
> >
> > On Thu, 15 Oct 2020 at 09:51, Ryan W <[hidden email]> wrote:
> >> What is my permissions problem here:
> >>
> >> [root@faspbsy0002 bin]# service solr restart
> >> Sending stop command to Solr running on port 8983 ... waiting up to 180
> >> seconds to allow Jetty process 38947 to stop gracefully.
> >> /opt/solr/bin/solr: line 2125: /opt/solr/bin/solr-8983.pid: Permission
> >> denied
> >>
> >> What is the practical effect if Solr can't write this solr-8983.pid
> file?
> >> What user should own the contents of /opt/solr/bin ?
> >>
> >> Thanks
>
>
Reply | Threaded
Open this post in threaded view
|

Re: solr-8983.pid: Permission denied

Ryan W
The .pid file referenced in the "Permission denied" message does not exist.

On Thu, Oct 15, 2020 at 11:01 AM Ryan W <[hidden email]> wrote:

> I have been starting solr like so...
>
> service solr start
>
>
> On Thu, Oct 15, 2020 at 10:31 AM Joe Doupnik <[hidden email]> wrote:
>
>>      Alex has it right. In my environment I created user "solr" in group
>> "users". Then I ensured that "solr:user" owns all of Solr's files. In
>> addition, I do Solr start/stop with an /etc/init.d script (the Solr
>> distribution has the basic one which we can embellish) in which there is
>> control line RUNAS="solr". The RUNAS variable is used to properly start
>> Solr.
>>      Thanks,
>>      Joe D.
>>
>> On 15/10/2020 15:02, Alexandre Rafalovitch wrote:
>> > It sounds like maybe you have started the Solr in a different way than
>> > you are restarting it. E.g. maybe you started it manually (bin/solr
>> > start, probably as a root) but are trying to restart it via service
>> > script. Who owned the .pid file? I am guessing 'root', while the
>> > service script probably runs as a different (lower-permission) user.
>> >
>> > The practical effect of that assumption is that your environmental
>> > variables were set differently and various things (e.g. logs) may not
>> > be where you expect.
>> >
>> > The solution is to be consistent in using the service to
>> > start/restart/stop your Solr.
>> >
>> > Regards,
>> >     Alex.
>> >
>> > On Thu, 15 Oct 2020 at 09:51, Ryan W <[hidden email]> wrote:
>> >> What is my permissions problem here:
>> >>
>> >> [root@faspbsy0002 bin]# service solr restart
>> >> Sending stop command to Solr running on port 8983 ... waiting up to 180
>> >> seconds to allow Jetty process 38947 to stop gracefully.
>> >> /opt/solr/bin/solr: line 2125: /opt/solr/bin/solr-8983.pid: Permission
>> >> denied
>> >>
>> >> What is the practical effect if Solr can't write this solr-8983.pid
>> file?
>> >> What user should own the contents of /opt/solr/bin ?
>> >>
>> >> Thanks
>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: solr-8983.pid: Permission denied

Joe Doupnik
In reply to this post by Ryan W
     Ah so, systemd style. I suggestion which might help. Look at the
/etc/init.d style script in the Solr distribution and uses its commands
as a reference when you review the systemd equivalents. In addition, a
prerequisite is choosing the user+group for Solr files, applying
ownership of those files, and ensuring the systemd script uses that user
information (which the init.d script does via that RUNAS item). Solr''s
offered /etc/init.d file is in installation directory ~/solr/bin/init.d
as file solr.
     For systemd I control apps via commands of the form systemctl start
solr.service.
     Thanks,
     Joe D.

On 15/10/2020 16:01, Ryan W wrote:

> I have been starting solr like so...
>
> service solr start
>
>
> On Thu, Oct 15, 2020 at 10:31 AM Joe Doupnik <[hidden email]> wrote:
>
>>       Alex has it right. In my environment I created user "solr" in group
>> "users". Then I ensured that "solr:user" owns all of Solr's files. In
>> addition, I do Solr start/stop with an /etc/init.d script (the Solr
>> distribution has the basic one which we can embellish) in which there is
>> control line RUNAS="solr". The RUNAS variable is used to properly start
>> Solr.
>>       Thanks,
>>       Joe D.
>>
>> On 15/10/2020 15:02, Alexandre Rafalovitch wrote:
>>> It sounds like maybe you have started the Solr in a different way than
>>> you are restarting it. E.g. maybe you started it manually (bin/solr
>>> start, probably as a root) but are trying to restart it via service
>>> script. Who owned the .pid file? I am guessing 'root', while the
>>> service script probably runs as a different (lower-permission) user.
>>>
>>> The practical effect of that assumption is that your environmental
>>> variables were set differently and various things (e.g. logs) may not
>>> be where you expect.
>>>
>>> The solution is to be consistent in using the service to
>>> start/restart/stop your Solr.
>>>
>>> Regards,
>>>      Alex.
>>>
>>> On Thu, 15 Oct 2020 at 09:51, Ryan W <[hidden email]> wrote:
>>>> What is my permissions problem here:
>>>>
>>>> [root@faspbsy0002 bin]# service solr restart
>>>> Sending stop command to Solr running on port 8983 ... waiting up to 180
>>>> seconds to allow Jetty process 38947 to stop gracefully.
>>>> /opt/solr/bin/solr: line 2125: /opt/solr/bin/solr-8983.pid: Permission
>>>> denied
>>>>
>>>> What is the practical effect if Solr can't write this solr-8983.pid
>> file?
>>>> What user should own the contents of /opt/solr/bin ?
>>>>
>>>> Thanks
>>

Reply | Threaded
Open this post in threaded view
|

Re: solr-8983.pid: Permission denied

Alexandre Rafalovitch
In reply to this post by Ryan W
If the .pid file is not at that location, then I would investigate
where that file is instead (after Solr is started).

If it is in a different location, then you have different environment
expectations, somehow. This, in all honesty, would still be consistent
with my theory that Solr was started somehow differently (perhaps just
this once).

If it is nowhere, then you may have a permission issue around creating
that file in the first place.

Basically, I am saying that maybe the issue you have is a symptom of a
deeper discrepancy rather than the actual issue to solve directly.

Regards,
   Alex.

On Thu, 15 Oct 2020 at 11:03, Ryan W <[hidden email]> wrote:

>
> The .pid file referenced in the "Permission denied" message does not exist.
>
> On Thu, Oct 15, 2020 at 11:01 AM Ryan W <[hidden email]> wrote:
>
> > I have been starting solr like so...
> >
> > service solr start
> >
> >
> > On Thu, Oct 15, 2020 at 10:31 AM Joe Doupnik <[hidden email]> wrote:
> >
> >>      Alex has it right. In my environment I created user "solr" in group
> >> "users". Then I ensured that "solr:user" owns all of Solr's files. In
> >> addition, I do Solr start/stop with an /etc/init.d script (the Solr
> >> distribution has the basic one which we can embellish) in which there is
> >> control line RUNAS="solr". The RUNAS variable is used to properly start
> >> Solr.
> >>      Thanks,
> >>      Joe D.
> >>
> >> On 15/10/2020 15:02, Alexandre Rafalovitch wrote:
> >> > It sounds like maybe you have started the Solr in a different way than
> >> > you are restarting it. E.g. maybe you started it manually (bin/solr
> >> > start, probably as a root) but are trying to restart it via service
> >> > script. Who owned the .pid file? I am guessing 'root', while the
> >> > service script probably runs as a different (lower-permission) user.
> >> >
> >> > The practical effect of that assumption is that your environmental
> >> > variables were set differently and various things (e.g. logs) may not
> >> > be where you expect.
> >> >
> >> > The solution is to be consistent in using the service to
> >> > start/restart/stop your Solr.
> >> >
> >> > Regards,
> >> >     Alex.
> >> >
> >> > On Thu, 15 Oct 2020 at 09:51, Ryan W <[hidden email]> wrote:
> >> >> What is my permissions problem here:
> >> >>
> >> >> [root@faspbsy0002 bin]# service solr restart
> >> >> Sending stop command to Solr running on port 8983 ... waiting up to 180
> >> >> seconds to allow Jetty process 38947 to stop gracefully.
> >> >> /opt/solr/bin/solr: line 2125: /opt/solr/bin/solr-8983.pid: Permission
> >> >> denied
> >> >>
> >> >> What is the practical effect if Solr can't write this solr-8983.pid
> >> file?
> >> >> What user should own the contents of /opt/solr/bin ?
> >> >>
> >> >> Thanks
> >>
> >>
Reply | Threaded
Open this post in threaded view
|

Re: solr-8983.pid: Permission denied

Ryan W
Solved by setting a SOLR_PID_DIR path in my solr.in.sh.  And then giving
the solr user ownership of that directory.

Thanks

On Thu, Oct 15, 2020 at 11:17 AM Alexandre Rafalovitch <[hidden email]>
wrote:

> If the .pid file is not at that location, then I would investigate
> where that file is instead (after Solr is started).
>
> If it is in a different location, then you have different environment
> expectations, somehow. This, in all honesty, would still be consistent
> with my theory that Solr was started somehow differently (perhaps just
> this once).
>
> If it is nowhere, then you may have a permission issue around creating
> that file in the first place.
>
> Basically, I am saying that maybe the issue you have is a symptom of a
> deeper discrepancy rather than the actual issue to solve directly.
>
> Regards,
>    Alex.
>
> On Thu, 15 Oct 2020 at 11:03, Ryan W <[hidden email]> wrote:
> >
> > The .pid file referenced in the "Permission denied" message does not
> exist.
> >
> > On Thu, Oct 15, 2020 at 11:01 AM Ryan W <[hidden email]> wrote:
> >
> > > I have been starting solr like so...
> > >
> > > service solr start
> > >
> > >
> > > On Thu, Oct 15, 2020 at 10:31 AM Joe Doupnik <[hidden email]> wrote:
> > >
> > >>      Alex has it right. In my environment I created user "solr" in
> group
> > >> "users". Then I ensured that "solr:user" owns all of Solr's files. In
> > >> addition, I do Solr start/stop with an /etc/init.d script (the Solr
> > >> distribution has the basic one which we can embellish) in which there
> is
> > >> control line RUNAS="solr". The RUNAS variable is used to properly
> start
> > >> Solr.
> > >>      Thanks,
> > >>      Joe D.
> > >>
> > >> On 15/10/2020 15:02, Alexandre Rafalovitch wrote:
> > >> > It sounds like maybe you have started the Solr in a different way
> than
> > >> > you are restarting it. E.g. maybe you started it manually (bin/solr
> > >> > start, probably as a root) but are trying to restart it via service
> > >> > script. Who owned the .pid file? I am guessing 'root', while the
> > >> > service script probably runs as a different (lower-permission) user.
> > >> >
> > >> > The practical effect of that assumption is that your environmental
> > >> > variables were set differently and various things (e.g. logs) may
> not
> > >> > be where you expect.
> > >> >
> > >> > The solution is to be consistent in using the service to
> > >> > start/restart/stop your Solr.
> > >> >
> > >> > Regards,
> > >> >     Alex.
> > >> >
> > >> > On Thu, 15 Oct 2020 at 09:51, Ryan W <[hidden email]> wrote:
> > >> >> What is my permissions problem here:
> > >> >>
> > >> >> [root@faspbsy0002 bin]# service solr restart
> > >> >> Sending stop command to Solr running on port 8983 ... waiting up
> to 180
> > >> >> seconds to allow Jetty process 38947 to stop gracefully.
> > >> >> /opt/solr/bin/solr: line 2125: /opt/solr/bin/solr-8983.pid:
> Permission
> > >> >> denied
> > >> >>
> > >> >> What is the practical effect if Solr can't write this solr-8983.pid
> > >> file?
> > >> >> What user should own the contents of /opt/solr/bin ?
> > >> >>
> > >> >> Thanks
> > >>
> > >>
>