Vai al contenuto


Foto

Jar avviato come servizio Win che crasha


Questa discussione e' stata archiviata Questo significa che non e' possibile rispondere
21 risposte a questa discussione

#1 Sgurbat

Sgurbat

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 9.772 Messaggi:

Inviato 23 giugno 2013 - 10:38

Ciao,

 

allora per farla breve ho un'applicazione in cui un paio di Jar vengono lanciati e rimangono in esecuzione come servizi di Windows.

 

Questi Jar sono fondamentalmente dei Consumer in ascolto su una coda, leggono i messaggi e fanno partire delle lavorazioni su FileSystem.

 

Non hanno mai dato problemi salvo che da un po di tempo gli stessi sembrano killare il processo Win in cui sono wrappati.

 

Per farli funzionare in "modalità provvisoria" abbiamo provato a lanciarli da console e lasciare appesa la sessione ma anche qui ci siamo ritrovati con i processi stoppati e le console chiuse.

 

Ora: cosa potrebbe causare questa caduta dei servizi? Ho già provato a guardare nel registro degli eventi sul server ma i log riportano tale accadimento come semplice stop del servizio senza indicarne la causa.

 

Come è possibile inoltre che lanciandoli a mano e non chiudendo la sessione sul server li abbiamo ritrovati stoppati MA SOPRATTUTTO con le console chiuse? Ho chiesto e nessuno ha riavviato il server.

 

Tnx.


Messaggio modificato da Sgurbat il 23 giugno 2013 - 10:39

We are what we repeatedly do. Excellence, then, is not an act, but a habit. (Aristotele)


#2 Sgurbat

Sgurbat

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 9.772 Messaggi:

Inviato 23 giugno 2013 - 10:47

La cosa strana è che altri Jar (quasi del tutto identici a livello di codice) funzionano senza problemi in altri contesti applicativi ovvero i servizi in cui sono wrappati non vanno giù.


We are what we repeatedly do. Excellence, then, is not an act, but a habit. (Aristotele)


#3 TigerShark

TigerShark

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStellettaStelletta
  • 16.685 Messaggi:

Inviato 23 giugno 2013 - 11:21

Ma non loggate le eccezioni al livello piu' alto su file? :mbe:
Per me è un'eccezione non catchata che fa morire il servizio..
I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain.

#4 toyo

toyo

    sono triste

  • Donatori di sperma
  • StellettaStellettaStellettaStellettaStellettaStellettaStelletta
  • 44.026 Messaggi:

Inviato 23 giugno 2013 - 11:55

anche noi come extrema ratio per le eccezioni non catchate nell'appdomain logghiamo, almeno se crasha poi sgami il perché


also per la roba critical parte una mail al reparto

FIRMA FOTTUTAMENTE EDITATA. IL FOTTUTO STAFF.
 

Mai più giorni felici


#5 Sgurbat

Sgurbat

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 9.772 Messaggi:

Inviato 23 giugno 2013 - 13:14

Ma non loggate le eccezioni al livello piu' alto su file? :mbe:
Per me è un'eccezione non catchata che fa morire il servizio..

 

Certo che logghiamo su file, ma non c'è nulla riconducibile a qualcosa che causi il down del servizio.

 

Ad ogni messaggio scodato parte un task di lavorazione, se per qualunque motivo tale task si interrompe causa eccezione gestita o meno viene comunque catchata in modo da non interrompere lo scodamento dei messaggi successivi e relativi task.

 

Ergo parrebbe impossibile che la causa sia un'eccezione non gestita.


We are what we repeatedly do. Excellence, then, is not an act, but a habit. (Aristotele)


#6 Sgurbat

Sgurbat

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 9.772 Messaggi:

Inviato 23 giugno 2013 - 13:15

anche noi come extrema ratio per le eccezioni non catchate nell'appdomain logghiamo, almeno se crasha poi sgami il perché


also per la roba critical parte una mail al reparto

 

L'invio della mail in caso di errore l'abbiamo anche noi, solo spiegami quella cosa delle eccezioni non gestite nell'appdomain che mi sfugge.

 

Tnx


We are what we repeatedly do. Excellence, then, is not an act, but a habit. (Aristotele)


#7 Sgurbat

Sgurbat

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 9.772 Messaggi:

Inviato 23 giugno 2013 - 13:20

Domanda: potrebbe essere qualcosa legato all'uso della memoria?


Messaggio modificato da Sgurbat il 23 giugno 2013 - 13:20

We are what we repeatedly do. Excellence, then, is not an act, but a habit. (Aristotele)


#8 TigerShark

TigerShark

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStellettaStelletta
  • 16.685 Messaggi:

Inviato 23 giugno 2013 - 13:23

Certo che logghiamo su file, ma non c'è nulla riconducibile a qualcosa che causi il down del servizio.
 
Ad ogni messaggio scodato parte un task di lavorazione, se per qualunque motivo tale task si interrompe causa eccezione gestita o meno viene comunque catchata in modo da non interrompere lo scodamento dei messaggi successivi e relativi task.
 
Ergo parrebbe impossibile che la causa sia un'eccezione non gestita.

fai un catch di exception o di throwable?
I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain.

#9 TigerShark

TigerShark

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStellettaStelletta
  • 16.685 Messaggi:

Inviato 23 giugno 2013 - 13:25

L'invio della mail in caso di errore l'abbiamo anche noi, solo spiegami quella cosa delle eccezioni non gestite nell'appdomain che mi sfugge.
 
Tnx

l'application domain è un concetto di c# per separare varie parti di un'applicazione in una specie di versione leggera dei processi, cosicché un crash dovuto al managed code di un dominio non causi il crash dell'intera applicazione.
Per l'unmanaged code però ovviamente non funziona.
E cmq non esiste in Java.
I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain.

#10 TigerShark

TigerShark

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStellettaStelletta
  • 16.685 Messaggi:

Inviato 23 giugno 2013 - 13:28

Domanda: potrebbe essere qualcosa legato all'uso della memoria?

potrebbe essere un crash della vm che potrebbe essere anche causato da problemi di memoria se stai già catchando throwable.
Però in quel caso avrai dei log file generati dalla jvm nella stessa dir da dove parte l'eseguibile se non ricordo male.
I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain.

#11 toyo

toyo

    sono triste

  • Donatori di sperma
  • StellettaStellettaStellettaStellettaStellettaStellettaStelletta
  • 44.026 Messaggi:

Inviato 23 giugno 2013 - 14:25

che è throwable?


FIRMA FOTTUTAMENTE EDITATA. IL FOTTUTO STAFF.
 

Mai più giorni felici


#12 TigerShark

TigerShark

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStellettaStelletta
  • 16.685 Messaggi:

Inviato 23 giugno 2013 - 14:28

che è throwable?

la classe base per le eccezioni in Java che comprende anche le unchecked come runtimeexception
I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain.

#13 toyo

toyo

    sono triste

  • Donatori di sperma
  • StellettaStellettaStellettaStellettaStellettaStellettaStelletta
  • 44.026 Messaggi:

Inviato 23 giugno 2013 - 14:32

ah ok


FIRMA FOTTUTAMENTE EDITATA. IL FOTTUTO STAFF.
 

Mai più giorni felici


#14 Sgurbat

Sgurbat

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 9.772 Messaggi:

Inviato 23 giugno 2013 - 15:25

potrebbe essere un crash della vm che potrebbe essere anche causato da problemi di memoria se stai già catchando throwable.
Però in quel caso avrai dei log file generati dalla jvm nella stessa dir da dove parte l'eseguibile se non ricordo male.

 

Io faccio un catch di Exception nel livello più alto del mio codice


We are what we repeatedly do. Excellence, then, is not an act, but a habit. (Aristotele)


#15 TigerShark

TigerShark

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStellettaStelletta
  • 16.685 Messaggi:

Inviato 23 giugno 2013 - 16:19

Io faccio un catch di Exception nel livello più alto del mio codice

devi catchare throwable perché altrimenti ti perdi tutte le unchecked exception che ti fanno crashare.
E ovviamente rilanciarla dopo che l'hai loggate perché tutte le subclass di error rappresentano errori che non è possibile recuperare.

Messaggio modificato da TigerShark il 23 giugno 2013 - 16:21

I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain.

#16 Sgurbat

Sgurbat

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 9.772 Messaggi:

Inviato 23 giugno 2013 - 16:38

Ma possibile che un'eccezione unchecked faccia crashare il servizio?


We are what we repeatedly do. Excellence, then, is not an act, but a habit. (Aristotele)


#17 ally

ally

    Banned

  • Bannati
  • StellettaStellettaStellettaStellettaStellettaStellettaStelletta
  • 11.498 Messaggi:

Inviato 23 giugno 2013 - 18:46

Ma possibile che un'eccezione unchecked faccia crashare il servizio?

 

...assolutamente si...hai i sorgenti?...


... ...le rose son rosse...le viole son blu...io sono schizofrenico...e lo sono anche io...

 

as-shape.gifAthlon Xp 2000+ - MSI K7T266 Pro Raid - 512Mb DDR cas2 - 2xIBM 60Gb - Kyro2 64Mb - FireWire PCI - ATI-TV Wonder - Alice 256 
as-shape.gifPentium 233MMX - 128 MB SDR - 1xMaxtor 40GbGb - 3D Rage - SB16 as-crash.gif Sitolo  hideing_behind_computer_1_.gifCercoScheda Video - V.M.18 :D


#18 Sgurbat

Sgurbat

    Schiavo

  • Membri
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 9.772 Messaggi:

Inviato 23 giugno 2013 - 19:02

...assolutamente si...hai i sorgenti?..

 

Si ... al lavoro.  :)


We are what we repeatedly do. Excellence, then, is not an act, but a habit. (Aristotele)


#19 toyo

toyo

    sono triste

  • Donatori di sperma
  • StellettaStellettaStellettaStellettaStellettaStellettaStelletta
  • 44.026 Messaggi:

Inviato 23 giugno 2013 - 19:55

si ma basta java dai

FIRMA FOTTUTAMENTE EDITATA. IL FOTTUTO STAFF.
 

Mai più giorni felici


#20 matti157

matti157

    Schiavo

  • GRULLINO
  • 15.041 Messaggi:

Inviato 23 giugno 2013 - 20:20

si ma basta java dai

C#?


Cooler Master 690|Intel Core i7 920 @3.7Ghz|Gigabyte GTX 770 OC|12GB Corsair DDR3 1600|Noctua NH-U12P|Corsair TX550

 

 

Un giorno ho visto per strada un tizio barcollante , sporco, pieno di chiazze verdi e pus, infastidiva bambine e rubava i soldi alle vecchiette: era uno che postava nel DS.


ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้