Re: MariaDB Server is not installing on Debian 12

2023-04-21 Thread The Wanderer
On 2023-04-21 at 14:11, Cosmin Humeniuc wrote:

> I have the same problem of not being able to install mariadb-server 
> 1:10.11.2-1. The error is the same - a failed attempt to stop 
> mariadb.service or mysql.service.
> 
> In my case, there is no service running for either of them, so I have 
> nothing to stop. I also checked, and there's no mariadb.preinst file in 
> /var/lib/dpkg/info.
> 
> However, I started from these lines in the output:
>  > Errors were encountered while processing:
>  >  /var/cache/apt/archives/mariadb-server_1%3a10.11.2-1_amd64.deb
> 
> and I used dpkg-deb to look in that package file. DEBIAN/preinst had a 
> `stop_server()` function that was trying to stop existing servers based 
> on the result of:
>  > pgrep -x --nslist pid --ns $$ "mysqld|mariadbd"
> 
> (at line 31). I executed that in a shell and I did get a result - only 
> it wasn't for a running server, but for a standalone process:
>  > pgrep -x --nslist pid --ns $$ "mysqld|mariadbd"
>  > 1939
> 
>  > ps aux | grep 1939
>  > cosmin  1939  0.0  1.2 2439604 204892 ?  Sl   19:22   0:02 
> /usr/sbin/mysqld 
> --defaults-file=/home/cosmin/.local/share/akonadi/mysql.conf 
> --datadir=/home/cosmin/.local/share/akonadi/db_data/ 
> --socket=/run/user/1000/akonadi/mysql.socket 
> --pid-file=/run/user/1000/akonadi/mysql.pid

How is that not a server? /usr/sbin/mysqld is the server binary; that
looks like an instance of the server, run by (what I'm presuming is) an
ordinary user rather than by e.g. the 'mysql' account that is used to
run the 'system-wide' instance(s?) of that server.

I could just be blind or ignorant, but I can't see any reason offhand
why that process wouldn't be expected to need to be stopped in just the
same way as those running under other user IDs.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: MariaDB Server is not installing on Debian 12

2023-04-21 Thread Cosmin Humeniuc
I have the same problem of not being able to install mariadb-server 
1:10.11.2-1. The error is the same - a failed attempt to stop 
mariadb.service or mysql.service.


In my case, there is no service running for either of them, so I have 
nothing to stop. I also checked, and there's no mariadb.preinst file in 
/var/lib/dpkg/info.


However, I started from these lines in the output:
> Errors were encountered while processing:
>  /var/cache/apt/archives/mariadb-server_1%3a10.11.2-1_amd64.deb

and I used dpkg-deb to look in that package file. DEBIAN/preinst had a 
`stop_server()` function that was trying to stop existing servers based 
on the result of:

> pgrep -x --nslist pid --ns $$ "mysqld|mariadbd"

(at line 31). I executed that in a shell and I did get a result - only 
it wasn't for a running server, but for a standalone process:

> pgrep -x --nslist pid --ns $$ "mysqld|mariadbd"
> 1939

> ps aux | grep 1939
> cosmin  1939  0.0  1.2 2439604 204892 ?  Sl   19:22   0:02 
/usr/sbin/mysqld 
--defaults-file=/home/cosmin/.local/share/akonadi/mysql.conf 
--datadir=/home/cosmin/.local/share/akonadi/db_data/ 
--socket=/run/user/1000/akonadi/mysql.socket 
--pid-file=/run/user/1000/akonadi/mysql.pid


My guess is that the check from `preinst` could be improved to handle 
cases like this. Does it count like a bug? Should I file a report?


--
Cosmin



Fwd: MariaDB Server is not installing on Debian 12

2023-03-20 Thread Timothy M Butterworth
On Mon, Mar 20, 2023 at 7:49 AM Dan Ritter  wrote:

> Timothy M Butterworth wrote:
> > On Mon, Mar 20, 2023 at 6:25 AM Dan Ritter  wrote:
> >
> > > Timothy M Butterworth wrote:
> > > > I am unable to install MariaDB on debian 12. apt show says the
> > > > mariadb-server is Version: 1:10.11.2-1.
> > > >
> > > > Failed to stop mariadb.service: Unit mariadb.service not loaded.
> > > > invoke-rc.d: initscript mariadb, action "stop" failed.
> > > > Failed to stop mysql.service: Unit mysql.service not loaded.
> > > > invoke-rc.d: initscript mysql, action "stop" failed.
> > > > Attempt to stop MariaDB/MySQL server returned exitcode 5
> > > > There is a MariaDB/MySQL server running, but we failed in our
> attempts to
> > > > stop it.
> > > > Stop it yourself and try again!
> > >
> > > Have you done that?
> > >
> >
> > I do not have any instances of MySQL or MariaDB running. The unit files
> are
> > not even installed.
>
> The pre-inst script believes that you do.
>
> > > > new mariadb-server package pre-installation script subprocess
> returned
> > > > error exit status 1
> > >
> > > If there is no mariadb or mysql server running, but the system
> > > believes that there is, /var/lib/dpkg/info should contain a
> > > mariadb.preinst script which can be examined for what mechanism
> > > it is using to determine that.
>
>
> ^ That. Go read it, execute it by hand, see what it is mistaken
> about.
>
> -dsr-
>

Dan,

Thanks for the info. I got it to install. I copied the mariadb.service file
and made a soft link from it to mysql.service. I was able to successfully
run `systemctl stop` against both service files. There was nothing to stop
since there was no database installed but I tricked the script into
thinking that it stopped the database. Anyway it was a little hacky but I
got mariadb-server installed.

Tim

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀


Re: MariaDB Server is not installing on Debian 12

2023-03-20 Thread Dan Ritter
Timothy M Butterworth wrote: 
> I am unable to install MariaDB on debian 12. apt show says the
> mariadb-server is Version: 1:10.11.2-1.
> 
> Failed to stop mariadb.service: Unit mariadb.service not loaded.
> invoke-rc.d: initscript mariadb, action "stop" failed.
> Failed to stop mysql.service: Unit mysql.service not loaded.
> invoke-rc.d: initscript mysql, action "stop" failed.
> Attempt to stop MariaDB/MySQL server returned exitcode 5
> There is a MariaDB/MySQL server running, but we failed in our attempts to
> stop it.
> Stop it yourself and try again!

Have you done that?

> new mariadb-server package pre-installation script subprocess returned
> error exit status 1

If there is no mariadb or mysql server running, but the system
believes that there is, /var/lib/dpkg/info should contain a
mariadb.preinst script which can be examined for what mechanism
it is using to determine that.

-dsr-



MariaDB Server is not installing on Debian 12

2023-03-19 Thread Timothy M Butterworth
I am unable to install MariaDB on debian 12. apt show says the
mariadb-server is Version: 1:10.11.2-1.

apt upgrade
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
default-mysql-server : Depends: mariadb-server but it is not installed
mariadb-plugin-provider-bzip2 : Depends: mariadb-server (>= 1:10.11.1-1)
but it is not installed
mariadb-plugin-provider-lz4 : Depends: mariadb-server (>= 1:10.11.1-1) but
it is not installed
mariadb-plugin-provider-lzma : Depends: mariadb-server (>= 1:10.11.1-1) but
it is not installed
mariadb-plugin-provider-lzo : Depends: mariadb-server (>= 1:10.11.1-1) but
it is not installed
mariadb-plugin-provider-snappy : Depends: mariadb-server (>= 1:10.11.1-1)
but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or
specify a solution).

apt install mariadb-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
 mailx mariadb-test netcat-openbsd
The following NEW packages will be installed:
 mariadb-server
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
120 not fully installed or removed.
Need to get 0 B/3,581 kB of archives.
After this operation, 54.5 MB of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 327299 files and directories currently installed.)
Preparing to unpack .../mariadb-server_1%3a10.11.2-1_amd64.deb ...
Failed to stop mariadb.service: Unit mariadb.service not loaded.
invoke-rc.d: initscript mariadb, action "stop" failed.
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Attempt to stop MariaDB/MySQL server returned exitcode 5
There is a MariaDB/MySQL server running, but we failed in our attempts to
stop it.
Stop it yourself and try again!
dpkg: error processing archive
/var/cache/apt/archives/mariadb-server_1%3a10.11.2-1_amd64.deb (--unpack):
new mariadb-server package pre-installation script subprocess returned
error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mariadb-server_1%3a10.11.2-1_amd64.deb


-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀