refusing to link journals

Asked by Joe Maier

Hello forum,

What does the following message mean, especially "refusing to link journals" ?

You have entered the virtual environment.
Host and machine ids are equal (..32chars...): refusing to link journals
root@cubic:~#

Thanks!

Joe

Question information

Language:
English Edit question
Status:
Solved
For:
Cubic Edit question
Assignee:
No assignee Edit question
Solved by:
Joe Maier
Solved:
Last query:
Last reply:
Revision history for this message
Cubic PPA (cubic-wizard) said :
#1

Joe,

I've never seen this before.

Did you copy any files from your host machine to the /etc directory inside Cubic?

Journal entries from the container (i.e. Cubic's terminal environment) are made visible to the host system.
(But you can not view the journal entries from your host in Cubic).
This is just default behavior for the container, and is normal.

In your case, it is complaining that journal entries from the container (Cubic) will NOT be made available to the host system.

The explanation given is that your host machine's ID is the same as the ID used by the container in Cubic.

However, this should not be the case.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MACHINE IDs
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

To see your host's machine id, execute the following in on your host computer:

    $ sudo cat /etc/machine-id

This should display a 32 btye alpha-numeric value, like:

    20c9720679d647f6a35d7035f223022f

To see the container's machine id, execute the following in Cubic's terminal environment:

    $ cat /etc/machine-id

This ~should~ be blank (ie, no value is displayed).

However, I suspect, in your case, you see the same value as on your host machine. For example:

    20c9720679d647f6a35d7035f223022f

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
JOURNAL LOGS
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

To view the list of journal logs on your host machine, execute:

    $ cd /var/log/journal
    $ ls -1

    20c9720679d647f6a35d7035f223022f

You will see a sub-directory with the same name as your host machine-id.
The journal files are inside this sub-directory.
(You probably already know `journalctl` is the command used to view the log files).

Conversely, the journal logs directory in Cubic's Terminal environment is usually empty:

    $ cd /var/log/journal
    $ ls -1

    <Blank>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
WHAT TO DO?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

If you see that the machine id for your host machine and for Cubic Terminal environment is the same, I ~think~ it would be safe to put a blank id in the /etc/machine-id file in Cubic's Terminal environment.

    $ rm /etc/machine-id
    $ touch /etc/machine-id
    $ chmod a-w /etc/machine-id

Revision history for this message
Joe Maier (joe890) said :
#2

->Did you copy any files from your host machine to the /etc directory
->inside Cubic?
No and it's a fresh install of cubic (2021.03.47) under Mint 20.1.

Surprisingly the situation on Mint 20.0 looks slightly different. Pls. see 2. log.

->sudo cat /etc/machine-id
root@cubic:~# sudo cat /etc/machine-id
939972095cf1459c8b22cc608eff85da
root@cubic:~#

->To view the list of journal logs on your host machine, execute:
-> $ cd /var/log/journal
-> $ ls -1

root@cubic:~# cd /var/log/journal
root@cubic:/var/log/journal# ls -1
root@cubic:/var/log/journal# ls
root@cubic:/var/log/journal# ls -li
total 0
root@cubic:/var/log/journal#

root@cubic:/var/log/journal# $ rm /etc/machine-id
$: command not found
root@cubic:/var/log/journal# cd /etc
root@cubic:/etc# $ rm /etc/machine-id
$: command not found
root@cubic:/etc#

root@cubic:/etc#
root@cubic:/etc# $ touch /etc/machine-id
$: command not found
root@cubic:/etc# chmod a-w /etc/machine-id
root@cubic:/etc#

->sudo cat /etc/machine-id
root@cubic:~# sudo cat /etc/machine-id
939972095cf1459c8b22cc608eff85da
root@cubic:~#

->To view the list of journal logs on your host machine, execute:
-> $ cd /var/log/journal
-> $ ls -1

root@cubic:~# cd /var/log/journal
root@cubic:/var/log/journal# ls -1
root@cubic:/var/log/journal# ls
root@cubic:/var/log/journal# ls -li
total 0
root@cubic:/var/log/journal#

root@cubic:/var/log/journal# $ rm /etc/machine-id
$: command not found
root@cubic:/var/log/journal# cd /etc
root@cubic:/etc# $ rm /etc/machine-id
$: command not found
root@cubic:/etc#

root@cubic:/etc#
root@cubic:/etc# $ touch /etc/machine-id
$: command not found
root@cubic:/etc# chmod a-w /etc/machine-id

--------------------------------------------------------------------------------------------------------------
Linux Mint 20.0 log's:
--------------------------------------------------------------------------------------------------------------

->Did you copy any files from your host machine to the /etc directory
->inside Cubic?
No

->sudo cat /etc/machine-id
b76cc7b1bbdc489e93909d2043031de8

-> $ cat /etc/machine-id
b76cc7b1bbdc489e93909d2043031de8

->cd /var/log/journal
->ls -1
b76cc7b1bbdc489e93909d2043031de8

/var/log/journal$ rm /etc/machine-id
rm: remove write-protected regular file '/etc/machine-id'? yes
rm: cannot remove '/etc/machine-id': Permission denied
test@machinename:/var/log/journal$

/var/log/journal$ touch /etc/machine-id
touch: cannot touch '/etc/machine-id': Permission denied

chmod a-w /etc/machine-id
chmod: changing permissions of '/etc/machine-id': Operation not permitted
test@machinename:/var/log/journal$

root@cubic:/etc#

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

You need sudo for these commands

sudo rm /etc/machine-id
sudo touch /etc/machine-id
sudo chmod a-w /etc/machine-id

Revision history for this message
Joe Maier (joe890) said :
#4

->sudo rm /etc/machine-id
->sudo touch /etc/machine-id
->sudo chmod a-w /etc/machine-id

This commands did solve the problem :)

->You have entered the virtual environment.
->root@cubic:~#

Thank you very much for your help!

Joe

Revision history for this message
Cubic PPA (cubic-wizard) said :
#5

Note: I posted a one-line solution that you can run directly inside Cubic's Terminal page:

https://answers.launchpad.net/cubic/+question/696939