NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Mariadb on NetBSD 10.1



Sent from [Proton Mail](https://proton.me/mail/home) for iOS

On Tue, Apr 1, 2025 at 18:15, David Brownlee <[abs%absd.org@localhost](mailto:On Tue, Apr 1, 2025 at 18:15, David Brownlee <<a href=)> wrote:

> On Mon, 31 Mar 2025 at 20:58, Niels Müller Larsen
> <arosano%protonmail.com@localhost> wrote:
>>
>> Sent from Proton Mail for iOS
>>
>> On Mon, Mar 31, 2025 at 10:16, David Brownlee <abs%absd.org@localhost> wrote:
>>
>> On Sun, 30 Mar 2025 at 13:11, Niels Müller Larsen
>> <arosano%protonmail.com@localhost> wrote:
>>
>> > On Sun, Mar 30, 2025 at 12:55, Greg Troxel <gdt%lexort.com@localhost> wrote:
>> >
>> > Niels Müller Larsen <arosano%protonmail.com@localhost> writes:
>> >
>> > > I have installed the above, and it runs nice and smooth in a node app for teaching.
>> > > That is if I start mariadb from the CLI.
>> > >
>> > > If I try to put
>> > > mariadb=YES
>> > > into /etc/rc.conf and reboot, the xconsole says “mariadb started” but there is no trace of it, and I still have to start it manually.
>> > >
>> > > The log files give no clues.
>> >
>> > A guess is that something in the startup assumes that PATH has more in
>> > it, than it does. You didn't say what "start from CLI" means.
>> >
>> > Set your PATH to just default, no pkgsrc, clean env and
>> >
>> > sh -x /etc/rc.d/mariadb start
>> >
>> > and read the output
>> >
>> > Thnx
>> >
>> > Start from CLI means
>> > $ doas service mariadb start
>> >
>> > As for your suggestion I will try that
>>
>>
>> You might also want to try starting from the command line but clearing
>> the environment first:
>>
>> doas env -i /etc/rc.d/mariadb start
>>
>> Also check that the installed mariadb rc.d file matches the current shipped:
>>
>> diff /etc/rc.d/mariadb /usr/pkg/share/examples/rc.d/mariadb
>>
>> (Running mariadb 11.4.5 on NetBSD-10.1/amd64 here, but as always:
>> "works on my machine" is of limited help :)
>>
>> David
>>
>> Thanks.
>> I can start it from the command line without any problem.
>> The automatic start on boot should be enabled by putting ‘mariadb=YES’ into /etc/rc.conf, but it doesn’t. The mariadb file in /etc/rc.d is copied from the examples, so no diff.
>> On xconsole it says that mariadb started, which indicates the things in rc.conf and rc.d are in place except it is not true.
>> I find no log messages mentioning mariadb until I start it manually.
>> I have also played with the order, so that the xconsole mentions mariadb last. Didn’t help.
>> Very mysterious, and that bugs me.
>> I can live with having to do the manual start, but it annoys me that I don’t know why.
>
> So just to confirm, running "env -i /etc/rc.d/mariadb start" as root
> starts it just fine?
>
> Could you confirm if it works if you add the following to rc.d/mariadb
>
> start_cmd="mariadb_start"
> mariadb_start()
> {
> echo "$command $rc_flags $command_args"
> sh -c "$command $rc_flags $command_args"
> }
>
> If it still fails on startup, then add "ktrace -id " to the start of
> the "sh -c" line, and you should end up with a ktrace.out (probably in
> /). This will be a record of all the syscalls made by the sh -c and
> any processes it forks. You can view it with kdump, and if mariadb is
> still running you can stop all recording into the file with ktrace -C
>
> (I notice you replied direct - I'm happy to have this email shared
> on-list if you prefer)
>
> Thanks
>
> David

sorry, I didn’t mean to exclude the list. I am teaching tomorrow, so I’ll get back to it on thursday. Interesting suggestions.

/niels


Home | Main Index | Thread Index | Old Index