SnapOverflow

SnapOverflow Logo SnapOverflow Logo

SnapOverflow Navigation

  • Home
  • Server
  • Ubuntu

Mobile menu

Close
  • Home
  • System Administrators
    • Hot Questions
    • New Questions
    • Tags
  • Ubuntu
    • Hot Questions
    • New Questions
    • Tags
  • Help
Home / user-240339

Luis Masuelli's questions

Martin Hope
Luis Masuelli
Asked: 2018-01-04 06:57:22 +0800 CST

How can I restore the apparmor settings for /var/lib/mysql?

  • 0

I had to stop the mysql service, blow away the /var/lib/mysql, then recreated it with a copy of /var/lib/mysql from a remote server. Such reckless action was in order to ... "import"? ... a really huge database quickly.

Now I cannot restart mysql due to apparmor, and is the first time I ever knew about it.

When trying to start the mysql service again, what I see is this:

developer@developer-Inspiron-5559:~$ sudo service mysql start
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
developer@developer-Inspiron-5559:~$ journalctl -xe
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysql.service has failed.
-- 
-- The result is failed.
ene 02 18:05:34 developer-Inspiron-5559 systemd[1]: mysql.service: Unit entered failed state.
ene 02 18:05:34 developer-Inspiron-5559 systemd[1]: mysql.service: Failed with result 'exit-code'.
ene 02 18:05:35 developer-Inspiron-5559 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
ene 02 18:05:35 developer-Inspiron-5559 systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysql.service has finished shutting down.
ene 02 18:05:35 developer-Inspiron-5559 systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysql.service has begun starting up.
ene 02 18:05:35 developer-Inspiron-5559 audit[23831]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/23831/status" pid=23831 comm="mysqld" requested_mask="r" denied_mask="r"
ene 02 18:05:35 developer-Inspiron-5559 audit[23831]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=23831 comm="mysqld" requested_mask="r" denied_m
ene 02 18:05:35 developer-Inspiron-5559 audit[23831]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/23831/status" pid=23831 comm="mysqld" requested_mask="r" denied_mask="r"
ene 02 18:05:35 developer-Inspiron-5559 kernel: audit: type=1400 audit(1514934335.367:51): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/23831/status" pid=23831 comm="mysqld" r
ene 02 18:05:35 developer-Inspiron-5559 kernel: audit: type=1400 audit(1514934335.367:52): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=23831 comm="my
ene 02 18:05:35 developer-Inspiron-5559 kernel: audit: type=1400 audit(1514934335.367:53): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/23831/status" pid=23831 comm="mysqld" r
ene 02 18:05:36 developer-Inspiron-5559 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
ene 02 18:06:03 developer-Inspiron-5559 sudo[23927]: developer : TTY=pts/18 ; PWD=/home/developer ; USER=root ; COMMAND=/usr/sbin/service mysql start
ene 02 18:06:03 developer-Inspiron-5559 sudo[23927]: pam_unix(sudo:session): session opened for user root by (uid=0)
ene 02 18:06:05 developer-Inspiron-5559 systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysql.service has failed.
-- 
-- The result is failed.
ene 02 18:06:05 developer-Inspiron-5559 systemd[1]: mysql.service: Unit entered failed state.
ene 02 18:06:05 developer-Inspiron-5559 systemd[1]: mysql.service: Failed with result 'exit-code'.
ene 02 18:06:05 developer-Inspiron-5559 sudo[23927]: pam_unix(sudo:session): session closed for user root
ene 02 18:06:06 developer-Inspiron-5559 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
ene 02 18:06:06 developer-Inspiron-5559 systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysql.service has finished shutting down.
ene 02 18:06:06 developer-Inspiron-5559 systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysql.service has begun starting up.
ene 02 18:06:06 developer-Inspiron-5559 audit[23982]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/23982/status" pid=23982 comm="mysqld" requested_mask="r" denied_mask="r"
ene 02 18:06:06 developer-Inspiron-5559 audit[23982]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=23982 comm="mysqld" requested_mask="r" denied_m
ene 02 18:06:06 developer-Inspiron-5559 audit[23982]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/23982/status" pid=23982 comm="mysqld" requested_mask="r" denied_mask="r"
ene 02 18:06:06 developer-Inspiron-5559 kernel: audit: type=1400 audit(1514934366.079:54): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/23982/status" pid=23982 comm="mysqld" r
ene 02 18:06:06 developer-Inspiron-5559 kernel: audit: type=1400 audit(1514934366.079:55): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=23982 comm="my
ene 02 18:06:06 developer-Inspiron-5559 kernel: audit: type=1400 audit(1514934366.079:56): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/23982/status" pid=23982 comm="mysqld" r
ene 02 18:06:06 developer-Inspiron-5559 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE

So, after the disaster, how can I make apparmor allow again mysql accessing that directory?

Edit also tried (as suggested by oracle) this one:

sudo nano /etc/apparmor.d/local/usr.sbin.mysqld

Content:

# Site-specific additions and overrides for usr.sbin.mysqld.
# For more details, please see /etc/apparmor.d/local/README.
/var/lib/mysql/ r,
/var/lib/mysql/** rwk,

And after saving...

$ sudo service apparmor reload  
$ sudo service mysql restart
mysql
  • 0 Answers
  • 521 Views
Martin Hope
Luis Masuelli
Asked: 2016-07-09 08:54:42 +0800 CST

How can I run a non-interactive ibus-setup or fix this misconfiguration in ubuntu 16.04?

  • 2

Based on this answer I learned that somehow Ubuntu 16.04, after upgrading from 15.10, made accents stop working in all my applications, and that by running ibus-setup and accepting the dialogs would make the accents work again.

However I must run that command everytime I turn on my computer.

How can I (one of these two)...

  • Fix this so it works as it worked in 15.10, with no workaround?
  • Execute this command silently on my .bashrc? By silently I want to remark that the command should not expect input from user, but turn on ibus immediately for the keys to work.
ibus
  • 1 Answers
  • 244 Views
Martin Hope
Luis Masuelli
Asked: 2016-05-21 05:09:07 +0800 CST

Cannot upgrade software in Ubuntu 15.10

  • 0

After running sudo apt-get update, sudo apt-get upgrade reports many 404 errors for the updated urls.

me@me:~$ sudo apt-get upgrade
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias       
Leyendo la información de estado... Hecho
Calculando la actualización... Los paquetes indicados a continuación se instalaron de forma automática y ya no son necesarios.
  account-plugin-identica account-plugin-twitter gir1.2-ebook-1.2
  gir1.2-ebookcontacts-1.2 gir1.2-edataserver-1.2 gir1.2-messagingmenu-1.0
  gir1.2-networkmanager-1.0 libntdb1 linux-image-4.2.0-19-generic
  linux-image-4.2.0-21-generic linux-image-4.2.0-22-generic
  linux-image-4.2.0-23-generic linux-image-4.2.0-25-generic
  linux-image-4.2.0-27-generic linux-image-4.2.0-34-generic
  linux-image-extra-4.2.0-19-generic linux-image-extra-4.2.0-21-generic
  linux-image-extra-4.2.0-22-generic linux-image-extra-4.2.0-23-generic
  linux-image-extra-4.2.0-25-generic linux-image-extra-4.2.0-27-generic
  linux-image-extra-4.2.0-34-generic python-ntdb
Utilice «apt-get autoremove» para eliminarlos.
Listo
Se actualizarán los siguientes paquetes:
  firefox firefox-locale-en firefox-locale-es thunderbird-globalmenu
4 actualizados, 0 nuevos se instalarán, 0 para eliminar y 0 no actualizados.
Se necesita descargar 47,0 MB de archivos.
Se utilizarán 12,3 kB de espacio de disco adicional después de esta operación.
¿Desea continuar? [S/n] 
Err http://archive.linux.duke.edu/ubuntu/ wily-security/main firefox amd64 46.0.1+build1-0ubuntu0.15.10.2
  404  Not Found
Err http://archive.linux.duke.edu/ubuntu/ wily-security/main firefox-locale-en amd64 46.0.1+build1-0ubuntu0.15.10.2
  404  Not Found
Err http://archive.linux.duke.edu/ubuntu/ wily-security/main firefox-locale-es amd64 46.0.1+build1-0ubuntu0.15.10.2
  404  Not Found
Err http://archive.linux.duke.edu/ubuntu/ wily-security/universe thunderbird-globalmenu amd64 1:38.8.0+build1-0ubuntu0.15.10.1
  404  Not Found
E: Fallo al obtener http://archive.linux.duke.edu/ubuntu/pool/main/f/firefox/firefox_46.0.1+build1-0ubuntu0.15.10.2_amd64.deb  404  Not Found

E: Fallo al obtener http://archive.linux.duke.edu/ubuntu/pool/main/f/firefox/firefox-locale-en_46.0.1+build1-0ubuntu0.15.10.2_amd64.deb  404  Not Found

E: Fallo al obtener http://archive.linux.duke.edu/ubuntu/pool/main/f/firefox/firefox-locale-es_46.0.1+build1-0ubuntu0.15.10.2_amd64.deb  404  Not Found

E: Fallo al obtener http://archive.linux.duke.edu/ubuntu/pool/universe/t/thunderbird/thunderbird-globalmenu_38.8.0+build1-0ubuntu0.15.10.1_amd64.deb  404  Not Found

E: No se pudieron obtener algunos archivos, ¿quizás deba ejecutar «apt-get update» o deba intentarlo de nuevo con --fix-missing?

What can I do to make it work? (using --fix-missing didn't change anything).

Answers in this question did not help me.

Additional background: Yesterday my connection broke while trying to update Ubuntu. My connection broke in the download stage. I was trying now to update the packages and distribution, but I am getting these errors.

apt
  • 1 Answers
  • 257 Views
Martin Hope
Luis Masuelli
Asked: 2016-04-09 13:39:43 +0800 CST

What does MANUFACTURER: CE80 mean?

  • 1

What's the meaning of Manufacturer: CE80 in a memory description when listing with command sudo dmidecode -t memory? (Ubuntu 15.10)

dmidecode
  • 1 Answers
  • 3193 Views
Martin Hope
Luis Masuelli
Asked: 2015-12-02 12:05:02 +0800 CST

After formatting and installing Ubuntu 15.10, and gnome-session-flashback, cannot view desktop icons or drag anything to the desktop

  • 1

I installed a brand-new Ubuntu 15.10 (formatted previous installation), and installed gnome-session-flashback (sudo apt-get install gnome-session-flashback).

I cannot drag anything to the desktop. There is no contextual menu for cut, copy, paste, create empty document, or anything like that when I right-click the desktop. A folder named Escritorio (such name appears when you use spanish language) exists in my user and I can put files there, but it does not get reflected in the screen. Attached image with the problem.

How can I fix that?

Cannot see the IntelliJ icon, nor see any useful contextual menu

gnome
  • 1 Answers
  • 543 Views
Martin Hope
Luis Masuelli
Asked: 2015-07-10 15:09:29 +0800 CST

How do I solve a "server version mismatch" with pg_dump when I need BOTH PostgreSQL servers installed?

  • 21

I installed two PostgreSQL servers in my computer. One is 9.1 and the other is 9.3. I need both servers installed.

When I run pg_dump, however, I get a version mismatch error:

server version: 9.3.6; pg_dump version: 9.1.15
pg_dump: aborting because of server version mismatch

How can I solve it? (Cannot uninstall either version - I installed the 9.1 first and the 9.3 many months later - I need both database servers installed).

postgresql
  • 3 Answers
  • 99233 Views
Martin Hope
Luis Masuelli
Asked: 2015-06-09 09:45:15 +0800 CST

Why I can't write a file in /tmp/ even when it is root:root and has "t" flag?

  • 6

I am using the postgres user to execute some special commands. For that, I am trying the following:

$ sudo su - postgres  
postgres$ ls -l /tmp
drwxrwxrwt  13 root root  4096 jun  8 12:20 tmp  
PGPASSWORD=mypasswordhere time pg_dump --username=postgres --no-password -f /tmp/myfilehere.sql mydatabasehere
pg_dump: [archiver] could not open output file "/tmp/myfilehere.sql": Permiso denegado  
Command exited with non-zero status 1  
0.25user 0.06system 0:02.04elapsed 15%CPU (0avgtext+0avgdata 58064maxresident)k  
0inputs+0outputs (0major+5110minor)pagefaults 0swaps

Question: Why can't I write in /tmp with user postgres? Noticing the sticky flag is set on /tmp.

command-line
  • 1 Answers
  • 32685 Views
Martin Hope
Luis Masuelli
Asked: 2014-07-21 19:16:53 +0800 CST

Apache - server not resolving by /etc/hosts if I have not internet connection

  • 4

I have configured many virtualhosts in my current apache2 server, in my local machine (Ubuntu 13.10).

Those are different local sites, with domains which are set in my /etc/hosts:

127.0.0.1       localhost
127.0.0.1       agroplasticos.dev
127.0.0.1       resources.dev
127.0.1.1       luismasuelli-inspiron14

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Where the agroplasticos.dev and resources.dev sites were created by me, and the previous settings were set by default.

For localhost, agroplasticos.dev, and resources.dev, I have site entries in /etc/apache2/sites-enabled directory (only those 3 entries exist in this directory), which are links to the corresponding files in /etc/apache2/sites-available:

agroplasticos.dev looks like:

<VirtualHost agroplasticos.dev:80>
    ServerName agroplasticos.dev:80
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/agroplasticos
    <Directory /var/www/agroplasticos>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order allow,deny
        allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/agroplasticos-error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/agroplasticos-access.log combined
</VirtualHost>

and resources.dev looks like:

<VirtualHost resources.dev:80>
    ServerName resources.dev:80
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/resources
    <Directory /var/www/resources>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order allow,deny
        allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/resources-error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/resources-access.log combined
</VirtualHost>

And -last but not least- localhost looks like this:

<VirtualHost localhost:80>
    ServerName localhost:80
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

What I expect is that if I access such domains, they are resolved to 127.0.0.1 and they are served by apache using the different settings for each site. In particular, resources.dev is just a static files website (it has only images I load externally via http from programs / scripts I'm making), so I don't care about even having PHP for such site. This means: I hit http://resources.dev/mirrorlings/images/sample.png in my browser, and I retrieve an image.

However -and there's the catch- the site is successfully mounted if I have network connection. If i'm not connected, then:

  1. I can access http://localhost/ (the sample, never-modified, "it works" screen appears).
  2. I cannot access http://resources.dev/ (the server did not mount it; http clients like browsers or ActionScript loaders cannot reach such url).
  3. I cannot access http://agroplasticos.dev/ (the server did not mount it; same about http clients).
  4. I'm getting this error log when running sudo service apache2 restart:

    [Sun Jul 20 15:39:55 2014] [error] (111)Connection refused: Could not resolve host name localhost -- ignoring!
    [Sun Jul 20 15:39:55 2014] [error] (111)Connection refused: Could not resolve host name agroplasticos.dev -- ignoring!
    [Sun Jul 20 15:39:55 2014] [warn] The Alias directive in /etc/apache2/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias.
    [Sun Jul 20 15:39:55 2014] [error] (111)Connection refused: Could not resolve host name agroplasticos.dev -- ignoring!
    [Sun Jul 20 15:39:55 2014] [error] (111)Connection refused: Could not resolve host name localhost -- ignoring!
    [Sun Jul 20 15:39:55 2014] [error] (111)Connection refused: Could not resolve host name resources.dev -- ignoring!
    apache2: apr_sockaddr_info_get() failed for luismasuelli-inspiron14
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Sun Jul 20 15:39:56 2014] [error] (111)Connection refused: Could not resolve host name localhost -- ignoring!
    [Sun Jul 20 15:39:56 2014] [error] (111)Connection refused: Could not resolve host name agroplasticos.dev -- ignoring!
    [Sun Jul 20 15:39:56 2014] [warn] The Alias directive in /etc/apache2/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias.
    [Sun Jul 20 15:39:56 2014] [error] (111)Connection refused: Could not resolve host name agroplasticos.dev -- ignoring!
    [Sun Jul 20 15:39:56 2014] [error] (111)Connection refused: Could not resolve host name localhost -- ignoring!
    [Sun Jul 20 15:39:56 2014] [error] (111)Connection refused: Could not resolve host name resources.dev -- ignoring!
    apache2: apr_sockaddr_info_get() failed for luismasuelli-inspiron14
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    

    Also do not understand why does this log appeared twice. You can see the same line block is repeated with one-second delay.

And my question here: Why do I need to have internet connection when what I want is that Apache resolved such fake domains as local, since they are in /etc/hosts? What do I have to configure in order to allow local, networkless, resolution?

I was trying to develop without having internet connection and could not hit my local servers using local /etc/hosts domain resolution to local (loopback) ip address.

networking
  • 4 Answers
  • 14659 Views

Sidebar

Stats

  • Questions 681965
  • Answers 980273
  • Best Answers 280204
  • Users 287326
  • Popular
  • Answers
  • Marko Smith

    How to install Google Chrome

    • 8 Answers
  • Marko Smith

    Is there a command to list all users? Also to add, delete, modify users, in the terminal?

    • 9 Answers
  • Marko Smith

    How to delete a non-empty directory in Terminal?

    • 4 Answers
  • Marko Smith

    How to unzip a zip file from the Terminal?

    • 9 Answers
  • Marko Smith

    How can I copy the contents of a folder to another folder in a different directory using terminal?

    • 8 Answers
  • Marko Smith

    How do I install a .deb file via the command line?

    • 11 Answers
  • Marko Smith

    How do I run .sh scripts?

    • 16 Answers
  • Marko Smith

    How do I install a .tar.gz (or .tar.bz2) file?

    • 14 Answers
  • Marko Smith

    How to list all installed packages

    • 24 Answers
  • Marko Smith

    Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

    • 25 Answers
  • Martin Hope
    Flimm How can I use docker without sudo? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    led-Zepp How do I save terminal output to a file? 2014-02-15 11:49:07 +0800 CST
  • Martin Hope
    ubuntu-nerd How to unzip a zip file from the Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    pandisvezia How can I copy the contents of a folder to another folder in a different directory using terminal? 2011-12-11 17:19:37 +0800 CST
  • Martin Hope
    TheXed How do I install a .deb file via the command line? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    Ivan How to list all installed packages 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra Unable to lock the administration directory (/var/lib/dpkg/) is another process using it? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry How do I determine the total size of a directory (folder) from the command line? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "The following packages have been kept back:" Why and how do I solve it? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford How can PPAs be removed? 2010-07-30 01:09:42 +0800 CST

Related Questions

Trending Tags

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • Home
  • Questions
    • Hot Questions
    • New Questions
  • Tags
  • Help

Footer

SnapOverflow

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Help

© 2022 SOF-TR. All Rights Reserve