|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Sep 2010
Città: L'Aquila
Messaggi: 576
|
[Risolto][Ubuntu] [APC Smart-UPS 1400] Errore "NISERR NIS network error"
Ciao!
Ho postato una discussione simile sul forum di Ubuntu ma non ho avuto risposta ed ormai è quasi una settimana che aspetto. Non so se sia consentito riproporla in questa sede . . . se non lo fosse potete chiudere senza problemi. Detto ciò, questa era la questione . . . Recentemente ho comprato un UPS APC modello Smart-UPS SU1400I di seconda mano (costato anche una bella somma) http://www.apc.com/resource/include/...se_sku=su1400i Sto lavorando in Ubuntu 10.10 alternate in ambiente 64bit e come software uso gapcmon http://gapcmon.sourceforge.net/ Provo a collegarlo tramite cavo seriale ma ricevo sempre la seguente schermata: ![]() Il cavo che utilizzo è un cavo specifico per il mio UPS e più precisamente è del modello 940-0024 Ho provato a seguire ogni guida trovata nel forum e con google (tutte dicono più o meno la stessa cosa) ma il problema persiste invariato. Il mio file /etc/apcupsd/apcupsd.conf attualmente è così: Codice:
# # ========= General configuration parameters ============ # #UPSNAME UPSCABLE smart UPSTYPE apcsmart DEVICE /dev/ttyS0 #POLLTIME 60 LOCKFILE /var/lock SCRIPTDIR /etc/apcupsd PWRFAILDIR /etc/apcupsd NOLOGINDIR /etc ONBATTERYDELAY 6 BATTERYLEVEL 5 MINUTES 3 TIMEOUT 0 ANNOY 300 ANNOYDELAY 60 NOLOGON disable KILLDELAY 0 # # ==== Configuration statements for Network Information Server ==== # NETSERVER on NISIP 127.0.0.1 NISPORT 3551 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 10 # # ========== Configuration statements used if sharing ============= # a UPS with more than one machine UPSCLASS standalone UPSMODE disable # # ===== Configuration statements to control apcupsd system logging ======== # STATTIME 0 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0 Codice:
apcupsd: 127.0.0.1 Codice:
*-serial UNCLAIMED
description: SMBus
product: 5 Series/3400 Series Chipset SMBus Controller
vendor: Intel Corporation
physical id: 1f.3
bus info: pci@0000:00:1f.3
version: 05
width: 64 bits
clock: 33MHz
configuration: latency=0
resources: memory:fbffc000-fbffc0ff ioport:500(size=32)
Ultima modifica di LastStarDust : 10-12-2011 alle 11:27. |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Aug 1999
Città: Tolmezzo (UD) - Milano
Messaggi: 13744
|
Immagino che per forum di Ubuntu tu intenda quello ufficiale e non la sezione dedicata a Linux di Hwupgrade, visto che là non ho trovato niente.
Ti sposto proprio in tale sezione. Ciao
__________________
...to go where no one has gone before. One ring to rule them all, one ring to find them, one ring to bring them all and in darkness bind them. Caron, non ti crucciare: vuolsi così colà dove si puote ciò che si vuole, e più non dimandare. |
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: Sep 2010
Città: L'Aquila
Messaggi: 576
|
Up mensile!
|
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
La configurazione mi sembra ineccepibile, considerando che non ha mai avuto a che fare con un UPS.
Uniche osservazioni che posso fare:
Potresti provare ad interrogare direttamente l'UPS via seriale, per esempio usando sjinn. Un comando che dovrebbe fornire una risposta dovrebbe essere questo: Codice:
sjinn -d /dev/ttyS0 -b2400 --send "B" -r6
Se non ricevi nulla potrebbero esserci problemi con il comando, l'impostazione della porta COM nel BIOS, con l'impostazione del driver del kernel, con il cavo...
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
|
|
|
|
|
#5 | ||
|
Senior Member
Iscritto dal: Sep 2010
Città: L'Aquila
Messaggi: 576
|
Grazie della risposta!
Quote:
Quote:
Codice:
... ... Onboard Serial Port 1 Disabled 3F8/IRQ4 3F8/IRQ3 * 3E8/IRQ4 3E8/IRQ3 Per quanto riguarda il comando Codice:
sjinn -d /dev/ttyS0 -b2400 --send "B" -r6 Codice:
error setting tcsetattr on /dev/ttyS0 |
||
|
|
|
|
|
#6 |
|
Senior Member
Iscritto dal: Sep 2010
Città: L'Aquila
Messaggi: 576
|
Scusa se ci ho messo tanto tempo per rispondere ma vorrei risolvere la situazione una volta per tutte.
Il comando Codice:
sjinn -d /dev/ttyS0 -b2400 --send "B" -r6 Codice:
sjinn -d /dev/ttyS0 -b2400 --send "B" -r6 --verbose /dev/ttyS0 2400 8n1 +dtr -rts -cts +dsr send B wait 0.500000 seconds read 6 characters ...... |
|
|
|
|
|
#7 |
|
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
Beh, effettivamente hai provato martedì
Il risultato della lettura non è granché, mi sarei aspettato qualche cosa che potesse somigliare ad un numero, non 6 punti. Almeno hai ottenuto una risposta e non un erroraccio. Ti propongo di provare a modificare una impostazione del file di configurazione che avevi riportato: Codice:
UPSCABLE smart UPSTYPE smartups DEVICE /dev/ttyS0 Codice:
# Apcupsd-devel internal configuration APCACCESS=/sbin/apcaccess ISCONFIGURED=yes
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
|
|
|
|
|
#8 | |
|
Senior Member
Iscritto dal: Sep 2010
Città: L'Aquila
Messaggi: 576
|
Quote:
Avevo già letto la guida che mi hai linkato e avevo già editato il file /etc/default/apcupsd. Ho provato a dare il comando Codice:
apctest Codice:
apctest 2011-11-30 16:29:44 apctest 3.14.8 (16 January 2010) debian Checking configuration ... Attached to driver: apcsmart sharenet.type = DISABLE cable.type = CUSTOM_SMART You are using a SMART cable type, so I'm entering SMART test mode mode.type = SMART Setting up the port ... apctest FATAL ERROR in smartsetup.c at line 184 PANIC! Cannot communicate with UPS via serial port. Please make sure the port specified on the DEVICE directive is correct, and that your cable specification on the UPSCABLE directive is correct. apctest error termination completed |
|
|
|
|
|
|
#9 |
|
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
Hai fatto un tentativo con UPSTYPE smartups?
Non l'hai specificato esplicitamente ad anche l'output di apctest dice apcsmart. Se hai più di una porta seriale (fisica ed attiva) ai provato con tutte le combinazioni device/porta fisica? Altre prove potrebbero essere:
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
|
|
|
|
|
#10 | |||
|
Senior Member
Iscritto dal: Sep 2010
Città: L'Aquila
Messaggi: 576
|
Quote:
Quote:
Quote:
Codice:
2011-12-01 09:32:31 apctest 3.14.8 (16 January 2010) debian Checking configuration ... Attached to driver: dumb sharenet.type = DISABLE cable.type = CUSTOM_SIMPLE Unknown mode.type: 1 Setting up the port ... Doing prep_device() ... Hello, this is the apcupsd Cable Test program. We are beginning testing for dumb UPSes, which use signaling rather than commands. Most tests enter a loop polling every second for 10 seconds. 1) Test 1 - normal mode 2) Test 2 - no cable 3) Test 3 - no power 4) Test 4 - low battery (requires test 3 first) 5) Test 5 - battery exhausted 6) Test 6 - kill UPS power 7) Test 7 - run tests 1 through 5 8) Guess which is the appropriate cable Q) Quit Select test number: 1 For the first test, everything should be normal. The UPS should be plugged in to the power, and the serial cable should be connected to the computer. Please enter any character when ready to continue: 2011-12-01 09:32:54 IOCTL GET: 4102 DTR DSR 2011-12-01 09:33:04 Test 1: normal condition, completed. Codice:
apcaccess status Codice:
***@***:~$ /etc/init.d/apcupsd start Starting UPS power management: apcupsd. ***@***:~$ apcaccess status Error contacting apcupsd @ localhost:3551: Connection refused |
|||
|
|
|
|
|
#11 |
|
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
Hai provato il test 8 di apctest? ("Guess which is the appropriate cable")
Durante lo start vedi comparire qualcosa nel file degli eventi /var/log/apcupsd.events ? Apri un terminale e tienilo in osservazione mentre avvii il demone in un'altro: Codice:
tail -f /var/log/apcupsd.events Per finire si potrebbe controllare anche /var/log/messages
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
|
|
|
|
|
#12 |
|
Senior Member
Iscritto dal: Sep 2010
Città: L'Aquila
Messaggi: 576
|
A dire il vero avevo disinstallato apcupsd per installare nut.
L'ho configurato così:
Codice:
[APC_SU1400I] driver = apcsmart port = /dev/ttyS0
Codice:
[APC_SU1400I] LISTEN 127.0.0.1 3493 ACL all 0.0.0.0/0 ACL localhost 127.0.0.1/32 ACCEPT localhost REJECT all
Codice:
[APC_SU1400I] [admin] password = miapassword actions = SET instcmds = ALL
Codice:
FINALDELAY 5 POWERDOWNFLAG /etc/killpower MONITOR pw3105@localhost 1 nut miapassword master SHUTDOWNCMD "/sbin/shutdown -h +0" Codice:
***@***:~$ sudo upsdrvctl start Network UPS Tools - UPS driver controller 2.6.1 Network UPS Tools - APC Smart protocol driver 2.1 (2.6.1) APC command table version 2.2 Unable to detect an APC Smart protocol UPS on port /dev/ttyS0 Check the cabling, port name or model name and try again Driver failed to start (exit status=1) |
|
|
|
|
|
#13 |
|
Senior Member
Iscritto dal: Sep 2010
Città: L'Aquila
Messaggi: 576
|
Inizio a pensare che ci sia qualcosa che non vada a livello hardware . . .
|
|
|
|
|
|
#14 | |
|
Senior Member
Iscritto dal: Sep 2010
Città: L'Aquila
Messaggi: 576
|
il file /var/log/apcupsd.events è pieno degli errori che ottenevo con apctest, cioè:
Codice:
2011-12-01 09:29:14 +0100 apcupsd FATAL ERROR in smartsetup.c at line 184 PANIC! Cannot communicate with UPS via serial port. Please make sure the port specified on the DEVICE directive is correct, and that your cable specification on the UPSCABLE directive is correct. Quote:
Ultima modifica di LastStarDust : 02-12-2011 alle 11:47. |
|
|
|
|
|
|
#15 |
|
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
Mi dispiace ma devo arrendermi, non ho più idee né indizi che mi ispirino qualcosa...
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
|
|
|
|
|
#16 |
|
Senior Member
Iscritto dal: Sep 2010
Città: L'Aquila
Messaggi: 576
|
Ti ringrazio per l'aiuto. Ho apprezzato i tuoi sforzi.
|
|
|
|
|
|
#17 |
|
Senior Member
Iscritto dal: Sep 2010
Città: L'Aquila
Messaggi: 576
|
Alla fine ho venduto il gruppo. Si può chiudere.
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 20:16.




















