Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
blocco al boot
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Thu Oct 22, 2015 12:59 pm    Post subject: blocco al boot Reply with quote

Ciao, della serie "i problemi non vegono mai da soli", dopo firefox non funzionante, adesso il sistema neppure si avvia e cioè:

-accendo il laptop premendo il pulsante di accensione
-seleziono dal grub il sistema operativo
-parte gentoo ed iniziano a scorrere i POST che però si bloccano su questa linea
Code:
Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...


anche attendendo un pò non succede niente, il boot rimane bloccato su quella linea e devo quindi terminare con ctrl+alt+del.


Il sistema sembra funzionare in chroot, ma mi sono accorto che "emerge --sync" non va, nel senso che dopo aver dato invio non appare la solita lista dei pacchetti che vengono via via sincronizzati e, per terminare non funziona neppure ctrl+c e così non mi rimane che chiudere la finestra dell'emulatore di terminale dalla quale ero entrato in chroot. L'aggiornamento a world invece sembra andare.


Il blocco all'avvio è successo dopo aver fatto un aggiornamento con "etc-update" e poi "-3" dove venivano modificati due file uno dei quali era appunto syslog-ng (l'altro non lo ricordo).

Vi sarei grato per un piccolo aiuto
Ciao
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1008

PostPosted: Thu Oct 22, 2015 5:53 pm    Post subject: Reply with quote

se può aiutarti , il seguente è il mio (Versione 3.6.4)

Backup del file
Code:
# cp /etc/syslog-ng/syslog-ng.conf  /etc/syslog-ng/syslog-ng.conf.bak



/etc/syslog-ng/syslog-ng.conf Versione 3.6.4 wrote:

Code:
@version: 3.6
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/3.6/syslog-ng.conf.gentoo,v 1.1 2014/11/09 08:10:43 mr_bones_ Exp $
#
# Syslog-ng default configuration file for Gentoo Linux

# https://bugs.gentoo.org/show_bug.cgi?id=426814
@include "scl.conf"

options {
        threaded(yes);
        chain_hostnames(no);

        # The default action of syslog-ng is to log a STATS line
        # to the file every 10 minutes.  That's pretty ugly after a while.
        # Change it to every 12 hours so you get a nice daily update of
        # how many messages syslog-ng missed (0).
        stats_freq(43200);
        # The default action of syslog-ng is to log a MARK line
        # to the file every 20 minutes.  That's seems high for most
        # people so turn it down to once an hour.  Set it to zero
        # if you don't want the functionality at all.
        mark_freq(3600);
};

source src { system(); internal(); };

destination messages { file("/var/log/messages"); };

# By default messages are logged to tty12...
destination console_all { file("/dev/tty12"); };
# ...if you intend to use /dev/console for programs like xconsole
# you can comment out the destination line above that references /dev/tty12
# and uncomment the line below.
#destination console_all { file("/dev/console"); };

log { source(src); destination(messages); };
log { source(src); destination(console_all); };

_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Thu Oct 22, 2015 7:14 pm    Post subject: Reply with quote

Ciao Sabayonino e grazie per aver postato il tuo file solo che mi sembra uguale al mio
Code:
@version: 3.6
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/3.6/syslog-ng.conf.gentoo,v 1.1 2014/11/09 08:10:43 mr_bones_ Exp $
#
# Syslog-ng default configuration file for Gentoo Linux

# https://bugs.gentoo.org/show_bug.cgi?id=426814
@include "scl.conf"

options {
   threaded(yes);
   chain_hostnames(no);

   # The default action of syslog-ng is to log a STATS line
   # to the file every 10 minutes.  That's pretty ugly after a while.
   # Change it to every 12 hours so you get a nice daily update of
   # how many messages syslog-ng missed (0).
   stats_freq(43200);
   # The default action of syslog-ng is to log a MARK line
   # to the file every 20 minutes.  That's seems high for most
   # people so turn it down to once an hour.  Set it to zero
   # if you don't want the functionality at all.
   mark_freq(3600);
};

source src { system(); internal(); };

destination messages { file("/var/log/messages"); };

# By default messages are logged to tty12...
destination console_all { file("/dev/tty12"); };
# ...if you intend to use /dev/console for programs like xconsole
# you can comment out the destination line above that references /dev/tty12
# and uncomment the line below.
#destination console_all { file("/dev/console"); };

log { source(src); destination(messages); };
log { source(src); destination(console_all); };


deduco quindi che il problema sta altrove .... forse
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1008

PostPosted: Fri Oct 23, 2015 4:24 pm    Post subject: Reply with quote

se stai utilizzando OpenRC e lo hai configurato in modo che ne scriva il log (/var/log/rc.log) , potresti controllare più chiaramente se ci sono altre cose
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Fri Oct 23, 2015 5:35 pm    Post subject: Reply with quote

...provvedo a postare il log

eccolo qua. è solo la parte finale (ultime 500 linee) dovrebbero bastare, il file è lunghissimo


ad un certo punto si vede la linea
Code:
Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...
e subito dopo inizia lo shut down perchè avevo dato il comando con ctrl+alt+del


http://pastebin.com/uF9Wj4TC


EDIT: posto di nuovo rc.log (adesso è più breve e un pò più leggibile)

Code:

rc shutdown logging started at Sun Oct 25 08:26:45 2015

 * Saving random seed ...
 [ ok ]
 * Deactivating additional swap space ...
 [ ok ]
 * Storing ALSA Mixer Levels ...
 [ ok ]
 * Stopping D-BUS system messagebus ...
 [ ok ]
 * Unmounting loop devices
 * Unmounting filesystems
 * Deactivating swap devices ...
 [ ok ]
 * Stopping udev ...
 [ ok ]
 * Setting hardware clock using the system clock [UTC] ...
 [ ok ]

rc shutdown logging stopped at Sun Oct 25 08:26:47 2015


rc sysinit logging started at Sun Oct 25 08:30:38 2015


   OpenRC 0.17 is starting up Gentoo Linux (i686)

 * /proc is already mounted
 * Mounting /run ...
 * /run/openrc: creating directory
 * /run/lock: creating directory
 * /run/lock: correcting owner
 * Remounting devtmpfs on /dev ...
 [ ok ]
 * Mounting /dev/mqueue ...
 [ ok ]
 * Mounting /dev/shm ...
 [ ok ]
 * Creating list of required static device nodes for the current kernel ...
 [ ok ]
 * Mounting debug filesystem ...
 [ ok ]
 * Mounting cgroup filesystem ...
 [ ok ]
 * Mounting fuse control filesystem ...
 [ ok ]
 * Setting up tmpfiles.d entries for /dev ...
 [ ok ]
 * Starting udev ...
 [ ok ]
 * Generating a rule to create a /dev/root symlink ...
 [ ok ]
 * Populating /dev with existing devices through uevents ...
 [ ok ]
 * Waiting for uevents to be processed ...
 [ ok ]

rc sysinit logging stopped at Sun Oct 25 08:30:38 2015


rc boot logging started at Sun Oct 25 08:30:38 2015

 * Setting system clock using the hardware clock [UTC] ...
 [ ok ]
 * Autoloaded 0 module(s)
 * Checking local filesystems  ...
/dev/sda4: clean, 951789/2932736 files, 9416361/11725961 blocks
 [ ok ]
 * Remounting root filesystem read/write ...
 [ ok ]
 * Remounting filesystems ...
 [ ok ]
 * Activating swap devices ...
 [ ok ]
 * Mounting local filesystems ...
 [ ok ]
 * Configuring kernel parameters ...
 [ ok ]
 * Creating user login records ...
 [ ok ]
 * Wiping /tmp directory ...
 [ ok ]
 * Restoring Mixer Levels ...
 [ ok ]
 * Mounting misc binary format filesystem ...
 [ ok ]
 * Loading custom binary format handlers ...
 [ ok ]
 * Setting hostname to miogentoo ...
 [ ok ]
 * Setting terminal encoding [UTF-8] ...
 [ ok ]
 * Setting keyboard mode [UTF-8] ...
 [ ok ]
 * Loading key mappings [us] ...
 [ ok ]
 * Bringing up network interface lo ...
 [ ok ]
 * Activating additional swap space ...
 [ ok ]
 * Setting up tmpfiles.d entries ...
 [ ok ]
 * Initializing random number generator ...
 [ ok ]

rc boot logging stopped at Sun Oct 25 08:30:42 2015


rc default logging started at Sun Oct 25 08:30:42 2015

 * Starting D-BUS system messagebus ...
 [ ok ]
 * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...

rc default logging stopped at Sun Oct 25 08:32:29 2015


rc shutdown logging started at Sun Oct 25 08:32:30 2015

 * Saving random seed ...
 [ ok ]
 * Deactivating additional swap space ...
 [ ok ]
 * Storing ALSA Mixer Levels ...
 [ ok ]
 * Stopping D-BUS system messagebus ...
 [ ok ]
 * Unmounting loop devices
 * Unmounting filesystems
 * Deactivating swap devices ...
 [ ok ]
 * Stopping udev ...
 [ ok ]
 * Setting hardware clock using the system clock [UTC] ...
 [ ok ]

rc shutdown logging stopped at Sun Oct 25 08:32:32 2015
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Sat Oct 31, 2015 3:42 pm    Post subject: Reply with quote

e se installassi systemd al posto di openrc? mi pare che systemd non ha bisogno di syslog o mi sbaglio? forse così il boot lo farebbe...
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sat Oct 31, 2015 4:41 pm    Post subject: Reply with quote

Hal-10000 wrote:
e se installassi systemd al posto di openrc? mi pare che systemd non ha bisogno di syslog o mi sbaglio? forse così il boot lo farebbe...

bo.

un sistema deve partire sia con systemd che con openrc.
e poi syslog non centra nulla. neppure openrc ha bisogno di syslog.

anzi, è probabile che tu non riesca a fare una buona diagnosi proprio perché usi openrc in modalità parallela, in stile systemd.

piuttosto:

modifica il file /etc/rc.conf in modo da avere:
Code:

rc_parallel="NO"
rc_interactive="YES"


durante la fase di avvio, avrai la possibilità di interrompere il boot premendo la lettera I (cerca di farlo il più presto possibile).
successivamente potrai avviare uno alla volta i singoli servizi e di fare login come root in qualunque momento.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Sat Oct 31, 2015 4:54 pm    Post subject: Reply with quote

OK ci provo, 1000 grazie per il suggerimento. Faccio sapere :-)



Allora, ho modificato rc.conf in modo da avere la possibilità di interagire e avviare i servizi uno alla volta.

Quando arrivo al servizio syslog-ng lo devo per forza skippare, altrimenti il boot si blocca sempre sulla stessa linea che ho detto sopra. Skippando il servizio gentoo poi si avvia.

Ma ancora non riesco a risolvere
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Sat Nov 07, 2015 12:49 pm    Post subject: Reply with quote

piccola nota di aggiornamento:

siccome il boot si bloccava allavvio del servizio syslog-ng, l'ho tolto da default
Code:
# rc-update del syslog-ng default
così il sistema si avvia e funziona. Poi, una volta che il sistema è già avviato, posso dare
Code:
 # /etc/init.d/syslog-ng start
 * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...           [ ok ]
 * Starting syslog-ng ...                                                 [ ok ]


insomma ... è sempre meglio che reinstallare
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sun Nov 08, 2015 12:28 pm    Post subject: Reply with quote

Hal-10000 wrote:

insomma ... è sempre meglio che reinstallare

condivido :).

ma questa cosa che syslog.ng possa bloccare un intero sistema è un po' strana.
non riesci proprio a raccogliere nessun messaggio di errore significativo?

non ho capito se riesci a riprodurre il sistema avviando i processi a mano nel modo che ho suggerito sopra.

l'ipotesi che si potrebbe azzardare, comunque, è che, per ragioni da identificare, si verifichi un blocco dell'accesso in scrittura a qualche file importante per syslog-ng.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Sun Nov 08, 2015 12:46 pm    Post subject: Reply with quote

cloc3 wrote:

non riesci proprio a raccogliere nessun messaggio di errore significativo?

purtroppo no, non so proprio dove guardare, provo di nuovo con dmesg...




cloc3 wrote:
non ho capito se riesci a riprodurre il sistema avviando i processi a mano nel modo che ho suggerito sopra.

sì sì, proprio così (modalità interattiva); in pratica al boot premo il tasto "I" (shift + i) e faccio partire uno alla volta tutti i servizi; poi quando arrivo al servizio di syslog-ng, premo il tasto 2, lo skippo, e passo agli altri servizi fino a che il sistema si avvia. Ma adesso ho tolto syslog-ng da default, così il systema si avvia normalmente, salvo a ricordarmi di avviare syslog-ng a sistema già avviato.


cloc3 wrote:
l'ipotesi che si potrebbe azzardare, comunque, è che, per ragioni da identificare, si verifichi un blocco dell'accesso in scrittura a qualche file importante per syslog-ng.
eh...risucissi a scoprirlo
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sun Nov 08, 2015 12:59 pm    Post subject: Reply with quote

Hal-10000 wrote:

poi quando arrivo al servizio di syslog-ng, premo il tasto 2, lo skippo

no. se lo skippi è finita la festa.

se vuoi indagare, devi rimettere syslog-ng nello stesso runlevel di prima (boot, immagino).
lanciare i servizi a mano fino a syslog-ng escluso.
entrare nel sistema con il tasto 4, digitando la password di root e fare la tua analisi.

potresti, per esempio, lanciare syslog-ng a mano, aggiungendo una & in fondo alla command line, così puoi osservare meglio quello che accade e rimanere libero di muoverti.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Sun Nov 08, 2015 2:13 pm    Post subject: Reply with quote

cloc3 wrote:
potresti, per esempio, lanciare syslog-ng a mano, aggiungendo una & in fondo alla command line, così puoi osservare meglio quello che accade e rimanere libero di muoverti.


ho fatto così, ma dopo, appena lancio
Code:
/etc/init.d/syslog-ng start
ritorna l'errore di prima per cui la linea di comando si blocca su
Code:
   
Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...

a questo punto dando ctrl + c posso ritornare alla riga di comando ma ... davvero non so come fare questa diagnostica (non sono un esperto :oops: )
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Mon Nov 09, 2015 12:30 pm    Post subject: Reply with quote

Hal-10000 wrote:
(non sono un esperto :oops: )

niente paura.
nessuno nasce imparato.

prima di lanciare il servizio, puoi controllare se il file di configurazione che hai citato è accessibile in lettura.
e puoi controllare se le cartelle /run e /var/log sono accessibili in lettura e scrittura.

puoi anche digitare il comando mount e verificare quali sono, in quel momento i filesystem caricati.

inoltre, il demone di log può essere anche avviato a mano, senza passare necessariamente per il servizio.
io non uso syslog-ng, ma metalog.

con metalog farei così:
Code:

$ metalog /usr/sbin/metalog --pidfile /var/run/metalog.pid >/root/out.txt 2>&1 &

immagino che per te possa funzionare qualcosa di analogo (controlla /etc/init.d/syslog-ng per ricavare il comando esatto di avvio.
nel file /root/out.txt potresti trovare qualche ouput interessante.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Mon Nov 09, 2015 8:32 pm    Post subject: Reply with quote

Quote:
prima di lanciare il servizio, puoi controllare se il file di configurazione che hai citato è accessibile in lettura.
e puoi controllare se le cartelle /run e /var/log sono accessibili in lettura e scrittura.

puoi anche digitare il comando mount e verificare quali sono, in quel momento i filesystem caricati.



ovviamente ti ringrazio per i suggerimenti

ecco i risultati:

/etc/syslog-ng/syslog-ng.conf ha permessi di lettura e scrittura
Code:
drwxr-xr-x   3 root root 4096 Nov  9 16:30 .
drwxr-xr-x 103 root root 4096 Nov  6 14:46 ..
drwxr-xr-x   2 root root 4096 Oct 31 20:54 patterndb.d
-rw-r--r--   1 root root 1413 Oct 31 22:57 scl.conf
-rw-r--r--   1 root root 1210 Oct 31 20:54 syslog-ng.conf


/var e /run pure:
Code:
drwxr-xr-x  22 giulio users  4096 Nov  9 16:26 .
drwxr-xr-x  22 giulio users  4096 Nov  9 16:26 ..
drwx------   5 giulio users  4096 Jan  8  2015 .Trash-1000
drwxr-xr-x   2 root   root   4096 Nov  6 13:35 bin
drwxr-xr-x   2 giulio users  4096 Aug 20 13:48 boot
drwxr-xr-x  15 root   root   4020 Nov  9 21:15 dev
drwxr-xr-x 103 root   root   4096 Nov  6 14:46 etc
drwxr-xr-x   6 giulio users  4096 Oct 10 09:40 home
drwxr-xr-x  15 root   root  12288 Nov  6 13:35 lib
drwx------   2 giulio users 16384 Mar  1  2013 lost+found
drwxr-xr-x   4 giulio users  4096 Nov  8 11:09 media
drwxr-xr-x   7 giulio users  4096 Jun 29 16:39 mnt
drwxr-xr-x   6 giulio users  4096 Apr 17  2015 opt
dr-xr-xr-x  74 root   root      0 Nov  9 21:14 proc
drwx------  27 giulio users  4096 Nov  9 15:00 root
drwxr-xr-x  17 root   root    380 Nov  9 21:15 run
drwxr-xr-x   2 root   root   4096 Nov  6 13:35 sbin
drwxr-xr-x   3 root   root   4096 Jan 28  2014 srv
dr-xr-xr-x  12 root   root      0 Nov  9 21:16 sys
drwxrwxrwt   5 giulio users 12288 Nov  9 21:15 tmp
drwxr-xr-x  12 root   root   4096 Dec 12  2013 usr
drwxr-xr-x  13 giulio users  4096 Nov  9 16:27 var


/var/log
Code:
drwxr-xr-x 13 giulio users 4096 Nov  9 16:27 .
drwxr-xr-x 22 giulio users 4096 Nov  9 16:26 ..
drwxr-xr-x 12 giulio users 4096 Apr 18  2015 cache
drwxr-xr-x  5 giulio users 4096 Nov  8 09:49 db
drwxr-xr-x  2 root   users 4096 Nov  6 14:34 empty
drwxr-xr-x  3 ftp    ftp   4096 Feb  2  2014 ftp
drwxr-xr-x 33 giulio users 4096 Jun 28 19:01 lib
lrwxrwxrwx  1 giulio users    9 Dec 13  2012 lock -> /run/lock
drwxr-xr-x 13 giulio users 4096 Nov  9 16:32 log
lrwxrwxrwx  1 root   root    15 Sep 28  2014 mail -> /var/spool/mail
drwxr-xr-x  2 root   root  4096 Feb  1  2014 nmbd
drwxr-xr-x  5 giulio users 4096 Feb  7  2015 nullmailer
lrwxrwxrwx  1 giulio users    4 Mar  2  2013 run -> /run
drwxr-xr-x  5 giulio users 4096 Dec 28  2013 spool
drwxrwxrwt  4 giulio users 4096 Nov  9 14:40 tmp
drwxr-xr-x  3 apache root  4096 Jul 25  2013 www


e questo è mount:
Code:
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=127115,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda4 on / type ext4 (rw,noatime,data=ordered)
tmpfs on /run type tmpfs (rw,nodev,relatime,size=101880k,mode=755)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib/rc/sh/cgroup-release-agent.sh,name=openrc)
cpuset on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cpu on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
cpuacct on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
freezer on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)


per quanto riguarda la possibilità di avviare il demone di log senza avviare anche il relativo servizio, sto cercando ancora come fare
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Wed Nov 11, 2015 8:40 pm    Post subject: Reply with quote

non c'è nulla di anomalo nel filesystem.
Hal-10000 wrote:

per quanto riguarda la possibilità di avviare il demone di log senza avviare anche il relativo servizio, sto cercando ancora come fare

basta digitare il nome del servizio da tastiera.
per riprodurre esattamente gli stessi parametri del demone, si può consultare il file /etc/init.d/syslog-ng.

non posso darteli esattamente, perché uso metalog, ma nel mio caso leggo:
Code:

cloc3 ~ # cat /etc/init.d/metalog
...
ssd() { start-stop-daemon --exec /usr/sbin/metalog --pidfile "${PIDFILE}" "$@" ; }

start() {
        ebegin "Starting metalog"
        ssd --start -- \
            --daemonize --pidfile="${PIDFILE}" ${METALOG_OPTS}
...


dunque il comando sarebbe:
Code:

/usr/sbin/metalog --pidfile "${PIDFILE}  --start -- --daemonize --pidfile="${PIDFILE}" ${METALOG_OPTS} &

le METALOG_OPTS si trovano in /etc/conf.d/metalog. nel mio caso è una stringa vuota.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Thu Nov 12, 2015 12:53 pm    Post subject: Reply with quote

il mio /etc/init.d/syslog-ng è il seguente, diverso dal tuo, e quindi non saprei estrarne il comando giusto

Code:
$ cat /etc/init.d/syslog-ng
#!/sbin/runscript
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

SYSLOG_NG_CONFIGFILE=${SYSLOG_NG_CONFIGFILE:-/etc/syslog-ng/${RC_SVCNAME}.conf}
SYSLOG_NG_STATEFILE_DIR=${SYSLOG_NG_STATEFILE_DIR:-/var/lib/syslog-ng}
SYSLOG_NG_STATEFILE=${SYSLOG_NG_STATEFILE:-${SYSLOG_NG_STATEFILE_DIR}/syslog-ng.persist}
SYSLOG_NG_PIDFILE_DIR=${SYSLOG_NG_PIDFILE_DIR:-/run}
SYSLOG_NG_PIDFILE=${SYSLOG_NG_PIDFILE:-${SYSLOG_NG_PIDFILE_DIR}/${RC_SVCNAME}.pid}

SYSLOG_NG_GROUP=${SYSLOG_NG_GROUP:-root}
SYSLOG_NG_USER=${SYSLOG_NG_USER:-root}

command="/usr/sbin/syslog-ng"
command_args="--persist-file \"${SYSLOG_NG_STATEFILE}\" --cfgfile \"${SYSLOG_NG_CONFIGFILE}\" --pidfile \"${SYSLOG_NG_PIDFILE}\" ${SYSLOG_NG_OPTS}"
extra_commands="checkconfig"
extra_started_commands="reload"
pidfile="${SYSLOG_NG_PIDFILE}"
start_stop_daemon_args="--user \"${SYSLOG_NG_USER}\":\"${SYSLOG_NG_GROUP}\""
description="Syslog-ng is a syslog replacement with advanced filtering features."
description_checkconfig="Check the configuration file that will be used by \"start\""
description_reload="Reload the configuration without exiting"
required_files="${SYSLOG_NG_CONFIGFILE}"
required_dirs="${SYSLOG_NG_PIDFILE_DIR}"

depend() {
   use clock
   need hostname localmount
   after bootmisc
   provide logger
}

checkconfig() {
   ebegin "Checking your configfile (${SYSLOG_NG_CONFIGFILE})"
   syslog-ng -s -f "${SYSLOG_NG_CONFIGFILE}"
   eend $? "Configuration error. Please fix your configfile (${SYSLOG_NG_CONFIGFILE})"
}

start_pre() {
   checkconfig || return 1
   checkpath \
      -d \
      --mode 0700 \
      --owner "${SYSLOG_NG_USER}:${SYSLOG_NG_GROUP}" \
      "${SYSLOG_NG_STATEFILE_DIR}"
}

stop_pre() {
   [ "$RC_CMD" = restart ] && sleep 1
   return 0
}

reload() {
   checkconfig || return 1
   ebegin "Reloading configuration and re-opening log files"
   start-stop-daemon --signal HUP --pidfile "${pidfile}"
   eend $?
}




e poi in /root/ non ho alcun file out.txt


EDIT Ho anche avviato syslog-ng senza ulteriori parametri
Code:
 $ sudo /usr/sbin/syslog-ng
giulio@miogentoo ~ $ ps aux |grep syslog-ng
root      2778  0.0  0.1   6640  1764 ?        S    14:02   0:00 supervising syslog-ng
root      2779  0.0  0.4  25808  4100 ?        Ssl  14:02   0:00 /usr/sbin/syslog-ng
giulio    2783  0.0  0.1   3076  1588 pts/1    S+   14:02   0:00 grep --colour=auto syslog-ng
e quindi? non vedo anomalie, il demone sembra avviatosi correttamente
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sat Nov 14, 2015 10:13 pm    Post subject: Reply with quote

Hal-10000 wrote:

EDIT Ho anche avviato syslog-ng senza ulteriori parametri
Code:
 $ sudo /usr/sbin/syslog-ng
giulio@miogentoo ~ $ ps aux |grep syslog-ng
root      2778  0.0  0.1   6640  1764 ?        S    14:02   0:00 supervising syslog-ng
root      2779  0.0  0.4  25808  4100 ?        Ssl  14:02   0:00 /usr/sbin/syslog-ng
giulio    2783  0.0  0.1   3076  1588 pts/1    S+   14:02   0:00 grep --colour=auto syslog-ng
e quindi? non vedo anomalie, il demone sembra avviatosi correttamente

ho provato a installare syslog-ng qui da me:
Code:

cloc3 ~ # /etc/init.d/syslog-ng start
 * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...                                                                                                                             [ ok ]
 * Starting syslog-ng ...                                                                                                                                                                   [ ok ]
cloc3 ~ # ps axu|grep syslog-ng
root      6320  0.0  0.0  38592  2092 ?        S    23:02   0:00 supervising syslog-ng
root      6321  0.0  0.0 200956  4568 ?        Ssl  23:02   0:00 /usr/sbin/syslog-ng --persist-file /var/lib/syslog-ng/syslog-ng.persist --cfgfile /etc/syslog-ng/syslog-ng.conf --pidfile /run/syslog-ng.pid

il comando di avvio generato dal demone di rc, in configurazione di default, sembra un po' più complesso del tuo.
prova a capire se quel comando può essere lanciato a mano in fase di boot.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Sun Nov 15, 2015 2:26 pm    Post subject: Reply with quote

cloc3 wrote:
il comando di avvio generato dal demone di rc, in configurazione di default, sembra un po' più complesso del tuo.


attenzione perchè io ho dato
Code:
/usr/sbin/syslog-ng
mentre tu hai dato
Code:
/etc/init.d/syslog-ng start


se anch'io dò /etc/init.d/syslog-ng start (ma solo a sistema già avviato) ecco cosa esce (non mi sembra più complesso, anzi mi pare la stessa cosa):
Code:
 # /etc/init.d/syslog-ng start
 * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...                                                          [ ok ]
 * Starting syslog-ng ...                                                                                                [ ok ]
miogentoo giulio #  ps axu|grep syslog-ng
root      2519  0.0  0.1   6668  1772 ?        S    15:17   0:00 supervising syslog-ng
root      2520  0.0  0.4  25836  4112 ?        Ss   15:17   0:00 /usr/sbin/syslog-ng --persist-file /var/lib/syslog-ng/syslog-ng.persist --cfgfile /etc/syslog-ng/syslog-ng.conf --pidfile /run/syslog-ng.pid
root      2529  0.0  0.1   3076  1704 pts/1    S+   15:17   0:00 grep --colour=auto syslog-ng




cloc3 wrote:
prova a capire se quel comando può essere lanciato a mano in fase di boot.

Se invece dò /etc/init.d/syslog-ng start in fase di boot selettivo (premendo shift+i) il comando si blocca sempre sullo stesso errore
Code:
 * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...




EDIT: Ho provato anche a dare questo comando al boot (con avvio interattivo)
Code:
/usr/sbin/syslog-ng --persist-file /var/lib/syslog-ng/syslog-ng.persist --cfgfile /etc/syslog-ng/syslog-ng.conf --pidfile /run/syslog-ng.pid
ma sembra bloccarsi, poichè il terminale non dà alcun output e devo terminare con ctrl+ c.
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Tue Nov 17, 2015 5:53 am    Post subject: Reply with quote

Hal-10000 wrote:

EDIT: Ho provato anche a dare questo comando al boot (con avvio interattivo)
Code:
/usr/sbin/syslog-ng --persist-file /var/lib/syslog-ng/syslog-ng.persist --cfgfile /etc/syslog-ng/syslog-ng.conf --pidfile /run/syslog-ng.pid
ma sembra bloccarsi, poichè il terminale non dà alcun output e devo terminare con ctrl+ c.

bravo. qui volevo arrivare.
bisogna capire perché si blocca con quel comando in fase di boot.
se aggiungi una e commerciale (& - vedi man bash) in fondo alla linea di comando il terminale ti lascia libero di continuare le tue indagini. puoi vedere se il processo è acceso o spento, e puoi vedere se i file dichiarati in linea di comando sono stati correttamente generati.
forse c'è qualcosa che ostacola l'accesso al filesystem, anche se per adesso non riusciamo proprio a individuarlo.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Tue Nov 17, 2015 2:24 pm    Post subject: Reply with quote

ho provato a seguire questi passaggi:

-avvio il sistema in modalità interattiva (shift + i), avviando uno per uno i vari servizi (tasto 1);

-quando arrivo a dover avviare syslog-ng, premo il tasto 4, immetto la passwd e dalla linea di comando dò
Code:
/usr/sbin/syslog-ng --persist-file /var/lib/syslog-ng/syslog-ng.persist --cfgfile /etc/syslog-ng/syslog-ng.conf --pidfile /run/syslog-ng.pid &

con la & finale, così syslog si avvia in background;

-esco dalla linea di comando con ctrl + d e ritorno così alla fase di avvio interattivo, dove mi si chiede di nuovo se intendo avviare il servizio syslog-ng che però skippo (tasto 2) perchè lo avevo già avviato prima con il lunghissimo comando di cui sopra;

-continuo a fare avviare tutti i restanti servizi finchè parte X e arrivo all'interfaccia grafica di Openbox (uso Slim come login manager);

-qui apro l'emulatore di terminale e immetto:
Code:
 #  ps axu|grep syslog-ng
root      2059  0.0  0.4   6668  4360 ?        S    15:08   0:00 /usr/sbin/syslog-ng --persist-file /var/lib/syslog-ng/syslog-ng.persist --cfgfile /etc/syslog-ng/syslog-ng.conf --pidfile /run/syslog-ng.pid
root      2060  0.0  0.1   6668  1692 ?        S    15:08   0:00 supervising syslog-ng
root      2061  0.0  0.4   9184  4608 ?        Ss   15:08   0:00 /usr/sbin/syslog-ng --persist-file /var/lib/syslog-ng/syslog-ng.persist --cfgfile /etc/syslog-ng/syslog-ng.conf --pidfile /run/syslog-ng.pid
root      2443  0.0  0.1   3072  1680 pts/1    R+   15:09   0:00 grep --colour=auto syslog-ng


La cosa strana è che syslog-ng sembra avviato due volte, anche se io lo avevo avviato una sola volta da linea di comando + & e poi, tornato in fase di avvio interattivo, lo avevo skippato.

Non saprei cos'altro andare a verificare...
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1008

PostPosted: Tue Nov 17, 2015 8:33 pm    Post subject: Reply with quote

sto seguendo tacito questa cosa ... onestamente sembra roba da fantasmi :mrgreen:

hai provato a controllare il servizio di boot in /etc/init.d/syslog-ng ??

qui di seguto per Versione 3.7.1
Code:
#!/sbin/runscript
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

SYSLOG_NG_CONFIGFILE=${SYSLOG_NG_CONFIGFILE:-/etc/syslog-ng/${RC_SVCNAME}.conf}
SYSLOG_NG_STATEFILE_DIR=${SYSLOG_NG_STATEFILE_DIR:-/var/lib/syslog-ng}
SYSLOG_NG_STATEFILE=${SYSLOG_NG_STATEFILE:-${SYSLOG_NG_STATEFILE_DIR}/syslog-ng.persist}
SYSLOG_NG_PIDFILE_DIR=${SYSLOG_NG_PIDFILE_DIR:-/run}
SYSLOG_NG_PIDFILE=${SYSLOG_NG_PIDFILE:-${SYSLOG_NG_PIDFILE_DIR}/${RC_SVCNAME}.pid}

SYSLOG_NG_GROUP=${SYSLOG_NG_GROUP:-root}
SYSLOG_NG_USER=${SYSLOG_NG_USER:-root}

command="/usr/sbin/syslog-ng"
command_args="--persist-file \"${SYSLOG_NG_STATEFILE}\" --cfgfile \"${SYSLOG_NG_CONFIGFILE}\" --pidfile \"${SYSLOG_NG_PIDFILE}\" ${SYSLOG_NG_OPTS}"
extra_commands="checkconfig"
extra_started_commands="reload"
pidfile="${SYSLOG_NG_PIDFILE}"
start_stop_daemon_args="--user \"${SYSLOG_NG_USER}\":\"${SYSLOG_NG_GROUP}\""
description="Syslog-ng is a syslog replacement with advanced filtering features."
description_checkconfig="Check the configuration file that will be used by \"start\""
description_reload="Reload the configuration without exiting"
required_files="${SYSLOG_NG_CONFIGFILE}"
required_dirs="${SYSLOG_NG_PIDFILE_DIR}"

depend() {
        use clock
        need hostname localmount
        after bootmisc
        provide logger
}

checkconfig() {
        ebegin "Checking your configfile (${SYSLOG_NG_CONFIGFILE})"
        syslog-ng -s -f "${SYSLOG_NG_CONFIGFILE}"
        eend $? "Configuration error. Please fix your configfile (${SYSLOG_NG_CONFIGFILE})"
}

start_pre() {
        checkconfig || return 1
        checkpath \
                -d \
                --mode 0700 \
                --owner "${SYSLOG_NG_USER}:${SYSLOG_NG_GROUP}" \
                "${SYSLOG_NG_STATEFILE_DIR}"
}

stop_pre() {
        [ "$RC_CMD" = restart ] && sleep 1
        return 0
}

reload() {
        checkconfig || return 1
        ebegin "Reloading configuration and re-opening log files"
        start-stop-daemon --signal HUP --pidfile "${pidfile}"
        eend $?
}

_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
Hal-10000
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2013
Posts: 120

PostPosted: Wed Nov 18, 2015 1:48 pm    Post subject: Reply with quote

mah, mi sembra identico al mio
Code:
eix syslog-ng
[?] app-admin/syslog-ng
     Available versions:  3.4.8^t 3.6.2^t 3.6.4^t ~3.7.1^t ~3.7.1-r1^t {amqp caps dbi geoip ipv6 json libressl mongodb pacct +pcre python redis smtp spoof-source ssl systemd tcpd}
     Installed versions:  3.7.1^t(20:54:47 10/31/15)(ipv6 tcpd -amqp -caps -dbi -geoip -json -mongodb -pacct -python -redis -smtp -spoof-source -systemd)
     Homepage:            http://www.balabit.com/network-security/syslog-ng
     Description:         syslog replacement with advanced filtering features



Code:
#!/sbin/runscript
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

SYSLOG_NG_CONFIGFILE=${SYSLOG_NG_CONFIGFILE:-/etc/syslog-ng/${RC_SVCNAME}.conf}
SYSLOG_NG_STATEFILE_DIR=${SYSLOG_NG_STATEFILE_DIR:-/var/lib/syslog-ng}
SYSLOG_NG_STATEFILE=${SYSLOG_NG_STATEFILE:-${SYSLOG_NG_STATEFILE_DIR}/syslog-ng.persist}
SYSLOG_NG_PIDFILE_DIR=${SYSLOG_NG_PIDFILE_DIR:-/run}
SYSLOG_NG_PIDFILE=${SYSLOG_NG_PIDFILE:-${SYSLOG_NG_PIDFILE_DIR}/${RC_SVCNAME}.pid}

SYSLOG_NG_GROUP=${SYSLOG_NG_GROUP:-root}
SYSLOG_NG_USER=${SYSLOG_NG_USER:-root}

command="/usr/sbin/syslog-ng"
command_args="--persist-file \"${SYSLOG_NG_STATEFILE}\" --cfgfile \"${SYSLOG_NG_CONFIGFILE}\" --pidfile \"${SYSLOG_NG_PIDFILE}\" ${SYSLOG_NG_OPTS}"
extra_commands="checkconfig"
extra_started_commands="reload"
pidfile="${SYSLOG_NG_PIDFILE}"
start_stop_daemon_args="--user \"${SYSLOG_NG_USER}\":\"${SYSLOG_NG_GROUP}\""
description="Syslog-ng is a syslog replacement with advanced filtering features."
description_checkconfig="Check the configuration file that will be used by \"start\""
description_reload="Reload the configuration without exiting"
required_files="${SYSLOG_NG_CONFIGFILE}"
required_dirs="${SYSLOG_NG_PIDFILE_DIR}"

depend() {
   use clock
   need hostname localmount
   after bootmisc
   provide logger
}

checkconfig() {
   ebegin "Checking your configfile (${SYSLOG_NG_CONFIGFILE})"
   syslog-ng -s -f "${SYSLOG_NG_CONFIGFILE}"
   eend $? "Configuration error. Please fix your configfile (${SYSLOG_NG_CONFIGFILE})"
}

start_pre() {
   checkconfig || return 1
   checkpath \
      -d \
      --mode 0700 \
      --owner "${SYSLOG_NG_USER}:${SYSLOG_NG_GROUP}" \
      "${SYSLOG_NG_STATEFILE_DIR}"
}

stop_pre() {
   [ "$RC_CMD" = restart ] && sleep 1
   return 0
}

reload() {
   checkconfig || return 1
   ebegin "Reloading configuration and re-opening log files"
   start-stop-daemon --signal HUP --pidfile "${pidfile}"
   eend $?
}
Back to top
View user's profile Send private message
unix67
n00b
n00b


Joined: 12 Dec 2009
Posts: 5

PostPosted: Mon Nov 23, 2015 7:00 pm    Post subject: Reply with quote

Potrebbe essere una questione di permessi?
in /var/log root non ha i permessi di scrittura (potresti cambiargli l'owner a root)
Addirittura la / appartiene a giulio così come la /root /home /boot /opt /lost+found ...
Mi sbaglierò ma mi sembra insolito. ciao
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1008

PostPosted: Tue Nov 24, 2015 12:26 pm    Post subject: Reply with quote

unix67 wrote:
Potrebbe essere una questione di permessi?
in /var/log root non ha i permessi di scrittura (potresti cambiargli l'owner a root)
Addirittura la / appartiene a giulio così come la /root /home /boot /opt /lost+found ...
Mi sbaglierò ma mi sembra insolito. ciao


rileggendo i post sopra è vero !
sarà partito un chown da qualche parte 8O
_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum