gammu-smsd not sending SMS's - gammu
I compiled gammu-1.42 on Ubuntu and I can succesfully send SMS's using the command:
echo "test" | /opt/gammu/bin/gammu --sendsms TEXT "0740...29"
But I need to use the gammu-smsd to send SMS's from a Postgresql database. The problem is I can't see no error message and I don't know why gammu-smsd is not sending the SMS's, I copied the configuration from a working server.
So the config file is:
[gammu]
port = /dev/ttyUSB1
connection = at19200
logformat = textall
[smsd]
logfile = syslog
debuglevel = 999
service = sql
driver = native_pgsql
Host = 192.168.1.2
User = sms
Password = xxx
Database = hospital
inboxpath = /var/spool/gammu/inbox/
outboxpath = /var/spool/gammu/outbox/
sentsmspath = /var/spool/gammu/sent/
I launch gammu-smsd like this:
/opt/gammu/bin/gammu-smsd -c /opt/gammu/gammu-smsdrc
I can see in the log that gammu-smsd is reading the outbox table with this query:
SELECT "ID", "InsertIntoDB", "SendingDateTime", "SenderID" FROM outbox WHERE "SendingDateTime" < now() AND "SendingTimeOut" < now() AND "SendBefore" >= localtime AND "SendAfter" <= localtime AND ( "SenderID" is NULL OR "SenderID" = '' OR "SenderID" = '' ) ORDER BY "Priority" DESC, "InsertIntoDB" ASC LIMIT 1
I ran the query against Postgresql and is fine, the query returns the SMS that I inserted in this table.
And the log is big, I keep increasing the debug level hoping I will see something wrong but no luck(I also deleted a lot of lines as I touched stackoverflow maximum):
Apr 28 20:26:11 caido gammu-smsd[4822]: Using SQL service
Apr 28 20:26:11 caido gammu-smsd[4822]: Configuring Gammu SMSD...
Apr 28 20:26:11 caido gammu-smsd[4822]: SHM token: 0x1001112 (16781586)
Apr 28 20:26:11 caido gammu-smsd[4822]: Warning: No PIN code in /opt/gammu/gammu-smsdrc file
Apr 28 20:26:11 caido gammu-smsd[4822]: CommTimeout=30, SendTimeout=30, ReceiveFrequency=15, ResetFrequency=0, HardResetFrequency=0
Apr 28 20:26:11 caido gammu-smsd[4822]: checks: CheckSecurity=1, CheckBattery=1, CheckSignal=1, CheckNetwork=1
Apr 28 20:26:11 caido gammu-smsd[4822]: mode: Send=1, Receive=1
Apr 28 20:26:11 caido gammu-smsd[4822]: deliveryreport = no
Apr 28 20:26:11 caido gammu-smsd[4822]: phoneid =
Apr 28 20:26:11 caido gammu-smsd[4822]: Connected to database: hospital on 192.168.1.2. Server version: 120006 Protocol: 3
Apr 28 20:26:11 caido gammu-smsd[4822]: Execute SQL: SELECT * FROM gammu LIMIT 1
Apr 28 20:26:11 caido gammu-smsd[4822]: Execute SQL: SELECT * FROM inbox LIMIT 1
Apr 28 20:26:11 caido gammu-smsd[4822]: Execute SQL: SELECT * FROM sentitems LIMIT 1
Apr 28 20:26:11 caido gammu-smsd[4822]: Execute SQL: SELECT * FROM outbox LIMIT 1
Apr 28 20:26:11 caido gammu-smsd[4822]: Execute SQL: SELECT * FROM outbox_multipart LIMIT 1
Apr 28 20:26:11 caido gammu-smsd[4822]: Execute SQL: SELECT * FROM phones LIMIT 1
Apr 28 20:26:11 caido gammu-smsd[4822]: Execute SQL: SELECT "Version" FROM gammu
Apr 28 20:26:11 caido gammu-smsd[4822]: Database structures version: 17, SMSD current version: 17
Apr 28 20:26:11 caido gammu-smsd[4822]: Connected to Database native_pgsql: hospital on 192.168.1.2
Apr 28 20:26:11 caido gammu-smsd[4822]: Created POSIX RW shared memory at 0x7f1ac0d93000
Apr 28 20:26:11 caido gammu-smsd[4822]: Starting phone communication...
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: [Gammu - 1.42.0]
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: [Connection - "at19200"]
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: [Connection index - 0]
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: [Model type - ""]
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: [Device - "/dev/ttyUSB1"]
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: [Running on - Linux, kernel 5.4.0-72-generic (#80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021)]
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: Serial device: DTR is up, RTS is up, CAR is up, CTS is up
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: Setting speed to 19200
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: [Module - "auto"]
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: Escaping SMS mode
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x02/2
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: 1B |0D ..
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: Sending simple AT command to wake up some devices
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x03/3
Apr 28 20:26:11 caido gammu-smsd[4822]: gammu: 41A|54T|0D AT.
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 1 "AT"
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 2 "OK"
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: Checking line: OK
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: AT reply state: 1
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x09/9
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 41A|54T|0D |0D |0A |4FO|4BK|0D |0A AT...OK..
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: Enabling echo
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x05/5
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 41A|54T|45E|311|0D ATE1.
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 1 "ATE1"
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 2 "OK"
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: Checking line: OK
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: AT reply state: 1
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x0B/11
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 41A|54T|45E|311|0D |0D |0A |4FO|4BK|0D |0A ATE1...OK..
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: Trying Motorola mode switch
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x0A/10
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D AT+MODE=2.
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 1 "AT+MODE=2"
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 2 "ERROR"
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: Checking line: ERROR
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: AT reply state: 3
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x13/19
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|4DM|4FO|44D|45E|3D=|322|0D |0D |0A |45E|52R|52R|4FO AT+MODE=2...ERRO
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 52R|0D |0A R..
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: Seems not to be supported
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: Enabling CME errors
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x0A/10
Apr 28 20:26:12 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D AT+CMEE=1.
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: 1 "AT+CMEE=1"
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: 2 "OK"
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: Checking line: OK
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: AT reply state: 1
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x10/16
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|4DM|45E|45E|3D=|311|0D |0D |0A |4FO|4BK|0D |0A AT+CMEE=1...OK..
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x09/9
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|53S|43C|53S|3F?|0D AT+CSCS?.
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: 1 "AT+CSCS?"
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: 2 "+CSCS: "GSM""
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: 3 "OK"
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: Checking line: OK
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: AT reply state: 1
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x1F/31
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|53S|43C|53S|3F?|0D |0D |0A |2B+|43C|53S|43C|53S AT+CSCS?...+CSCS
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: 3A:|20 |22"|47G|53S|4DM|22"|0D |0A |0D |0A |4FO|4BK|0D |0A : "GSM"....OK..
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x0A/10
Apr 28 20:26:13 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D AT+CSCS=?.
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 1 "AT+CSCS=?"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 2 "+CSCS: ("IRA","GSM","UCS2")"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 3 "OK"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Checking line: OK
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: AT reply state: 1
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x2F/47
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|53S|43C|53S|3D=|3F?|0D |0D |0A |2B+|43C|53S|43C AT+CSCS=?...+CSC
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 53S|3A:|20 |28(|22"|49I|52R|41A|22"|2C,|22"|47G|53S|4DM|22"|2C, S: ("IRA","GSM",
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 22"|55U|43C|53S|322|22"|29)|0D |0A |0D |0A |4FO|4BK|0D |0A "UCS2")....OK..
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Chosen GSM as normal charset
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Chosen UCS2 as unicode charset
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Getting model
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x08/8
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|47G|4DM|4DM|0D AT+CGMM.
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 1 "AT+CGMM"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 2 "+CGMM: LTE WIRELESS MODEM"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 3 "OK"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Checking line: OK
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: AT reply state: 1
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x2B/43
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|47G|4DM|4DM|0D |0D |0A |2B+|43C|47G|4DM|4DM|3A: AT+CGMM...+CGMM:
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 20 |4CL|54T|45E|20 |57W|49I|52R|45E|4CL|45E|53S|53S|20 |4DM|4FO LTE WIRELESS MO
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 44D|45E|4DM|0D |0A |0D |0A |4FO|4BK|0D |0A DEM....OK..
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Unknown model, but it should still work
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: [Model name: `LTE WIRELESS MODEM']
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: [Model data: `']
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: [Model data: `unknown']
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: [Connected model - "LTE WIRELESS MODEM"]
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x08/8
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|47G|4DM|49I|0D AT+CGMI.
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 1 "AT+CGMI"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 2 "OK"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Checking line: OK
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: AT reply state: 1
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x0E/14
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|47G|4DM|49I|0D |0D |0A |4FO|4BK|0D |0A AT+CGMI...OK..
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Manufacturer info received
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: [Manufacturer: OK]
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Checking for OBEX support
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x0B/11
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D AT+CPROT=?.
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 1 "AT+CPROT=?"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 2 "ERROR"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Checking line: ERROR
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: AT reply state: 3
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x14/20
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|50P|52R|4FO|54T|3D=|3F?|0D |0D |0A |45E|52R|52R AT+CPROT=?...ERR
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 4FO|52R|0D |0A OR..
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Checking for SYNCML/OBEX support
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x0C/12
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D AT+SYNCML=?.
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 1 "AT+SYNCML=?"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 2 "ERROR"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Checking line: ERROR
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: AT reply state: 3
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x15/21
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|53S|59Y|4EN|43C|4DM|4CL|3D=|3F?|0D |0D |0A |45E|52R AT+SYNCML=?...ER
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 52R|4FO|52R|0D |0A ROR..
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x0D/13
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 41A|54T|24$|54T|53S|53S|50P|43C|53S|57W|3D=|3F?|0D AT$TSSPCSW=?.
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 1 "AT$TSSPCSW=?"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: 2 "ERROR"
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: Checking line: ERROR
Apr 28 20:26:14 caido gammu-smsd[4822]: gammu: AT reply state: 3
......................
Apr 28 20:26:46 caido gammu-smsd[4822]: gammu: Leaving GSM_GetSMSStatus
Apr 28 20:26:46 caido gammu-smsd[4822]: Execute SQL: SELECT "ID", "InsertIntoDB", "SendingDateTime", "SenderID" FROM outbox WHERE "SendingDateTime" < now() AND "SendingTimeOut" < now() AND "SendBefore" >= localtime AND "SendAfter" <= localtime AND ( "SenderID" is NULL OR "SenderID" = '' OR "SenderID" = '' ) ORDER BY "Priority" DESC, "InsertIntoDB" ASC LIMIT 1
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: Entering GSM_GetSecurityStatus
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: Getting security code status
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x09/9
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|50P|49I|4EN|3F?|0D AT+CPIN?.
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: 1 "AT+CPIN?"
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: 2 "+CPIN: READY"
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: 3 "OK"
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: Checking line: OK
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: AT reply state: 1
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x1F/31
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|50P|49I|4EN|3F?|0D |0D |0A |2B+|43C|50P|49I|4EN AT+CPIN?...+CPIN
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: 3A:|20 |52R|45E|41A|44D|59Y|0D |0A |0D |0A |4FO|4BK|0D |0A : READY....OK..
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: Parsing +CPIN: READY with +CPIN: #r
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: Grabbed string from reply: "READY" (parsed 5 bytes)
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: Parsed raw string "READY"
Apr 28 20:27:00 caido gammu-smsd[4822]: gammu: Security status received - nothing to enter
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Leaving GSM_GetSecurityStatus
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Entering GSM_GetSMSStatus
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Getting SIM SMS status
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x12/18
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|53S|4DM|22"|2C,|22"|53S|4DM AT+CPMS="SM","SM
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 22"|0D ".
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 1 "AT+CPMS="SM","SM""
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 2 "+CPMS: 0,5,0,5,0,5"
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 3 "OK"
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Checking line: OK
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: AT reply state: 1
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x2E/46
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|53S|4DM|22"|2C,|22"|53S|4DM AT+CPMS="SM","SM
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 22"|0D |0D |0A |2B+|43C|50P|4DM|53S|3A:|20 |300|2C,|355|2C,|300 "...+CPMS: 0,5,0
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 2C,|355|2C,|300|2C,|355|0D |0A |0D |0A |4FO|4BK|0D |0A ,5,0,5....OK..
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: SMS status received
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Parsing +CPMS: 0,5,0,5,0,5 with +CPMS: #i, #i, #0
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Parsed int 0
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Parsed int 5
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Used : 0
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Size : 5
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Getting phone SMS status
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: SENDING frame type 0x00/length 0x12/18
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|4DM|45E|22"|2C,|22"|4DM|45E AT+CPMS="ME","ME
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 22"|0D ".
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 1 "AT+CPMS="ME","ME""
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 2 "+CPMS: 0,23,0,23,0,5"
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 3 "OK"
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Checking line: OK
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: AT reply state: 1
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: RECEIVED frame type 0x00/length 0x30/48
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 41A|54T|2B+|43C|50P|4DM|53S|3D=|22"|4DM|45E|22"|2C,|22"|4DM|45E AT+CPMS="ME","ME
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 22"|0D |0D |0A |2B+|43C|50P|4DM|53S|3A:|20 |300|2C,|322|333|2C, "...+CPMS: 0,23,
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: 300|2C,|322|333|2C,|300|2C,|355|0D |0A |0D |0A |4FO|4BK|0D |0A 0,23,0,5....OK..
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: SMS status received
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Parsing +CPMS: 0,23,0,23,0,5 with +CPMS: #i, #i, #0
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Parsed int 0
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Parsed int 23
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Used : 0
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Size : 23
Apr 28 20:27:01 caido gammu-smsd[4822]: gammu: Leaving GSM_GetSMSStatus
I solved this problem, the issue was not gammu-ssmd related but postgresql related.
The timezone was wrong in the postgresql.conf, it was different by the server's timezone.
If I runned "SELECT NOW();" in a postgres client on a distant computer the time was wrong but if I runned "SELECT NOW();" on the server than the time was fine. I'm not sure why this happened, I was hoping posgres NOW() will always give the same timezone.
Anyway, this resulted in weird behaviour from gammu-ssmd as wrong dates were inserted in the columns SendingDateTime, SendingTimeOut... from outbox table of gammu.
So I corrected the timezone, restarted postgresql and now everything is fine.
Related
Can't start elasticsearch service on centos 7
I just install the elasticsearch but when I try to start is not work. Anyone have any idea what I can do? sudo journalctl --unit elasticsearch -- Logs begin at Sat 2020-08-29 09:54:58 UTC, end at Sat 2020-08-29 13:15:35 UTC. -- Aug 29 10:10:28 meriadoc.dallas-idc.com systemd[1]: Starting Elasticsearch... Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: fatal error in thread [main], exiting Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.systemd.Libsystemd.lambda$static$0(Libsystemd.java:34) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at java.base/java.security.AccessController.doPrivileged(AccessController.java:312) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.systemd.Libsystemd.<clinit>(Libsystemd.java:33) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.systemd.SystemdPlugin.sd_notify(SystemdPlugin.java:126) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.systemd.SystemdPlugin.onNodeStarted(SystemdPlugin.java:137) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at java.base/java.util.ArrayList.forEach(ArrayList.java:1510) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.node.Node.start(Node.java:868) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:317) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:402) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.cli.Command.main(Command.java:90) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) Aug 29 10:10:35 meriadoc.dallas-idc.com systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE Aug 29 10:10:35 meriadoc.dallas-idc.com systemd[1]: Failed to start Elasticsearch. Aug 29 10:10:35 meriadoc.dallas-idc.com systemd[1]: Unit elasticsearch.service entered failed state. Thank you so much
If you notice carefully the error message in startup logs, which seems to cause the startup failure. Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native Please follow the https://www.jetbrains.com/help/upsource/error-could-not-initialize-class-com-sun-jna-native.html#8182b, which explained in detail the cause of the error and 2 ways to resolve that.
How should I load resources from src/main/resources in Kotlin?
I'm working on a Spring Boot application written in Kotlin (using Maven), and everything works fine but after generating the jar of my application, it throws an Exception because it can't find the folder src/main/resources: Caused by: java.io.FileNotFoundException: src\main\resources\data\circuits-arrets.json I read that could be because I use File class, and it doesn't work properly after generating the jar. Here's how I read my file: var line: String? val bufferedReader = BufferedReader(FileReader(File(csvLocation))) do { line = bufferedReader.readLine() if (line != null) { //Do something with 'line' } } while (line != null) I found some solutions using InputStream instead of File in the BufferedReader. My question is: Does it really change something for the jar? If yes, how should I do then? Thank you in advance. EDIT: Here's the output of the command jar tvf my-jar.jar : 0 Fri Feb 15 10:34:14 CET 2019 META-INF/ 552 Fri Feb 15 10:34:14 CET 2019 META-INF/MANIFEST.MF 0 Fri Feb 15 10:34:14 CET 2019 org/ 0 Fri Feb 15 10:34:14 CET 2019 org/springframework/ 0 Fri Feb 15 10:34:14 CET 2019 org/springframework/boot/ 0 Fri Feb 15 10:34:14 CET 2019 org/springframework/boot/loader/ 0 Fri Feb 15 10:34:14 CET 2019 org/springframework/boot/loader/data/ 2688 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/data/RandomAccessDataFile$DataInputStream.class 0 Fri Feb 15 10:34:14 CET 2019 org/springframework/boot/loader/jar/ 9736 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarURLConnection.class 1374 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFile$JarFileType.class 14915 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFile.class 3414 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarEntry.class 345 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/FileHeader.class 3172 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/StringSequence.class 4976 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/AsciiBytes.class 1593 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFileEntries$1.class 1997 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFileEntries$EntryIterator.class 10728 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFileEntries.class 540 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/CentralDirectoryVisitor.class 299 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarEntryFilter.class 5267 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/CentralDirectoryFileHeader.class 3116 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/CentralDirectoryEndRecord.class 4624 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/CentralDirectoryParser.class 1693 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/ZipInflaterInputStream.class 11509 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/Handler.class 0 Fri Feb 15 10:34:14 CET 2019 org/springframework/boot/loader/archive/ 302 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/Archive$Entry.class 437 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/Archive$EntryFilter.class 945 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/Archive.class 1487 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/ExplodedArchive$FileEntryIterator$EntryComparator.class 3837 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/ExplodedArchive$FileEntryIterator.class 5243 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/ExplodedArchive.class 1484 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/PropertiesLauncher$ArchiveEntryFilter.class 19737 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/PropertiesLauncher.class 282 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/data/RandomAccessDataFile$1.class 2062 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFile$1.class 1233 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFile$2.class 3263 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/data/RandomAccessDataFile$FileAccess.class 4015 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/data/RandomAccessDataFile.class 1102 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/ExplodedArchive$FileEntry.class 1081 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/JarFileArchive$JarFileEntry.class 7336 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/JarFileArchive.class 1502 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/MainMethodRunner.class 3608 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/ExecutableArchiveLauncher.class 0 Fri Feb 15 10:34:14 CET 2019 org/springframework/boot/loader/util/ 5203 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/util/SystemPropertyUtils.class 485 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/data/RandomAccessData.class 273 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/ExplodedArchive$1.class 1779 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/JarFileArchive$EntryIterator.class 1953 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/PropertiesLauncher$PrefixMatchingArchiveFilter.class 266 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/PropertiesLauncher$1.class 4684 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/Launcher.class 1721 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/WarLauncher.class 1585 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/JarLauncher.class 1527 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/LaunchedURLClassLoader$UseFastConnectionExceptionsEnumeration.class 5687 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/LaunchedURLClassLoader.class 616 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/Bytes.class 702 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarURLConnection$1.class 4306 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarURLConnection$JarEntryName.class 0 Fri Feb 15 10:34:14 CET 2019 BOOT-INF/ 0 Fri Feb 15 10:34:14 CET 2019 BOOT-INF/classes/ 0 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/constants/ 0 Fri Feb 15 10:33:50 CET 2019 BOOT-INF/classes/data/ 0 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/ 0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/ 0 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/ 0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/entities/ 0 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/jsonEntities/ 0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/ 0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/entities/viewModels/ 0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/repositories/ 0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/security/ 0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/services/ 0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/utils/ 0 Fri Feb 15 10:34:12 CET 2019 META-INF/maven/ 0 Fri Feb 15 10:34:12 CET 2019 META-INF/maven/com.auth0.samples/ 0 Fri Feb 15 10:34:12 CET 2019 META-INF/maven/com.auth0.samples/kotlin-spring-boot/ 584 Fri Feb 15 10:33:50 CET 2019 BOOT-INF/classes/application.properties 87499 Fri Feb 15 10:33:50 CET 2019 BOOT-INF/classes/data/circuits-arrets.json 261015 Fri Feb 15 10:33:50 CET 2019 BOOT-INF/classes/data/tan-arrets.csv 1029 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/Configuration.class 3471 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/ApplicationUserController.class 6013 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/BaseController.class 1701 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/BikeStationController.class 1692 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/BusStationController.class 612 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/FavoriteController$WhenMappings.class 5385 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/FavoriteController.class 1778 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/LineController.class 7389 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/StationController.class 1868 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/entities/jsonEntities/Arret.class 1079 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/entities/jsonEntities/BusLineLibelle.class 3252 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/ApplicationUser.class 2977 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/BikeStation.class 2140 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/Favorite.class 2981 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/Station.class 1195 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/entities/viewModels/BaseVM.class 3691 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/entities/viewModels/StationVM.class 1663 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/KotlinSpringBootApplicationKt.class 812 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/repositories/BaseRepository.class 702 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/repositories/BusStationRepository.class 672 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/repositories/LineRepository.class 5530 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/security/JWTAuthenticationFilter.class 2578 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/security/UserDetailsServiceImpl.class 4617 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/services/BaseService.class 1186 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/services/LineService.class 5525 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/StartingDataInjector.class 7943 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/utils/ParsersKt.class 121 Fri Feb 15 10:34:08 CET 2019 META-INF/kotlin-spring-boot.kotlin_module 7216 Fri Feb 15 10:31:38 CET 2019 META-INF/maven/com.auth0.samples/kotlin-spring-boot/pom.xml 1693 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/constants/ConstantsKt.class 1805 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/AccessCondition.class 1065 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/BaseEntity.class 3506 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/BusStation.class 1434 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/FavoriteType.class 2945 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/Line.class 2056 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/StationType.class 2081 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/entities/viewModels/LineVM.class 613 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/KotlinSpringBootApplication.class 1101 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/repositories/ApplicationUserRepository.class 707 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/repositories/BikeStationRepository.class 692 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/repositories/FavoriteRepository.class 687 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/repositories/StationRepository.class 4738 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/security/JWTAuthorizationFilter.class 6776 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/security/WebSecurity.class 1235 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/services/BikeStationService.class 1228 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/services/BusStationService.class 1207 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/services/StationService.class 2405 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/utils/FindersKt.class 5205 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/VMUtils.class 114 Fri Feb 15 10:34:12 CET 2019 META-INF/maven/com.auth0.samples/kotlin-spring-boot/pom.properties 29487 Fri Feb 15 10:33:50 CET 2019 BOOT-INF/classes/data/stations-velos-libre-service-nantes-metropole.csv 0 Fri Feb 15 10:34:14 CET 2019 BOOT-INF/lib/ 628 Wed May 09 13:41:28 CEST 2018 BOOT-INF/lib/spring-boot-starter-data-jpa-2.0.2.RELEASE.jar 593 Wed May 09 13:30:56 CEST 2018 BOOT-INF/lib/spring-boot-starter-2.0.2.RELEASE.jar 927496 Wed May 09 13:19:02 CEST 2018 BOOT-INF/lib/spring-boot-2.0.2.RELEASE.jar 1161361 Wed May 09 13:25:34 CEST 2018 BOOT-INF/lib/spring-boot-autoconfigure-2.0.2.RELEASE.jar 613 Wed May 09 13:30:56 CEST 2018 BOOT-INF/lib/spring-boot-starter-logging-2.0.2.RELEASE.jar 290339 Fri Mar 31 21:27:54 CEST 2017 BOOT-INF/lib/logback-classic-1.2.3.jar 471901 Fri Mar 31 21:27:16 CEST 2017 BOOT-INF/lib/logback-core-1.2.3.jar 17519 Sun Nov 19 01:08:44 CET 2017 BOOT-INF/lib/log4j-to-slf4j-2.10.0.jar 255485 Sun Nov 19 00:48:58 CET 2017 BOOT-INF/lib/log4j-api-2.10.0.jar 4596 Thu Mar 16 17:37:48 CET 2017 BOOT-INF/lib/jul-to-slf4j-1.7.25.jar 26586 Wed Feb 21 15:54:16 CET 2018 BOOT-INF/lib/javax.annotation-api-1.3.2.jar 297518 Sat Oct 14 11:44:44 CEST 2017 BOOT-INF/lib/snakeyaml-1.19.jar 600 Wed May 09 13:41:20 CEST 2018 BOOT-INF/lib/spring-boot-starter-aop-2.0.2.RELEASE.jar 1930381 Wed Nov 15 11:26:54 CET 2017 BOOT-INF/lib/aspectjweaver-1.8.13.jar 598 Wed May 09 13:41:22 CEST 2018 BOOT-INF/lib/spring-boot-starter-jdbc-2.0.2.RELEASE.jar 143471 Thu Apr 05 17:30:38 CEST 2018 BOOT-INF/lib/HikariCP-2.7.9.jar 401279 Tue May 08 08:06:44 CEST 2018 BOOT-INF/lib/spring-jdbc-5.0.6.RELEASE.jar 6739203 Thu Apr 26 11:06:04 CEST 2018 BOOT-INF/lib/hibernate-core-5.2.17.Final.jar 66469 Wed Feb 14 13:23:28 CET 2018 BOOT-INF/lib/jboss-logging-3.3.2.Final.jar 113371 Fri Jul 26 12:01:34 CEST 2013 BOOT-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar 739582 Tue Oct 10 18:04:58 CEST 2017 BOOT-INF/lib/javassist-3.22.0-GA.jar 445288 Wed Sep 06 11:15:06 CEST 2006 BOOT-INF/lib/antlr-2.7.7.jar 186741 Tue Aug 02 13:41:56 CEST 2016 BOOT-INF/lib/jandex-2.0.3.Final.jar 65100 Sat Sep 09 14:47:28 CEST 2017 BOOT-INF/lib/classmate-1.3.4.jar 313898 Mon May 16 14:19:12 CEST 2005 BOOT-INF/lib/dom4j-1.6.1.jar 75288 Tue Nov 24 15:03:08 CET 2015 BOOT-INF/lib/hibernate-commons-annotations-5.0.1.Final.jar 30724 Mon May 13 15:11:34 CEST 2013 BOOT-INF/lib/javax.transaction-api-1.2.jar 335660 Tue May 08 14:29:02 CEST 2018 BOOT-INF/lib/spring-data-jpa-2.0.7.RELEASE.jar 1076871 Tue May 08 14:23:50 CEST 2018 BOOT-INF/lib/spring-data-commons-2.0.7.RELEASE.jar 191789 Tue May 08 08:07:28 CEST 2018 BOOT-INF/lib/spring-orm-5.0.6.RELEASE.jar 255201 Tue May 08 08:06:38 CEST 2018 BOOT-INF/lib/spring-tx-5.0.6.RELEASE.jar 41203 Thu Mar 16 17:36:32 CET 2017 BOOT-INF/lib/slf4j-api-1.7.25.jar 46745 Tue May 08 08:08:48 CEST 2018 BOOT-INF/lib/spring-aspects-5.0.6.RELEASE.jar 588 Wed May 09 13:41:32 CEST 2018 BOOT-INF/lib/spring-boot-starter-web-2.0.2.RELEASE.jar 645 Wed May 09 13:41:30 CEST 2018 BOOT-INF/lib/spring-boot-starter-json-2.0.2.RELEASE.jar 33392 Mon Mar 26 15:55:48 CEST 2018 BOOT-INF/lib/jackson-datatype-jdk8-2.9.5.jar 99630 Mon Mar 26 15:56:26 CEST 2018 BOOT-INF/lib/jackson-datatype-jsr310-2.9.5.jar 8646 Mon Mar 26 15:54:04 CEST 2018 BOOT-INF/lib/jackson-module-parameter-names-2.9.5.jar 591 Wed May 09 13:41:32 CEST 2018 BOOT-INF/lib/spring-boot-starter-tomcat-2.0.2.RELEASE.jar 3115994 Fri Apr 27 21:24:52 CEST 2018 BOOT-INF/lib/tomcat-embed-core-8.5.31.jar 240244 Fri Apr 27 21:24:54 CEST 2018 BOOT-INF/lib/tomcat-embed-el-8.5.31.jar 256776 Fri Apr 27 21:24:54 CEST 2018 BOOT-INF/lib/tomcat-embed-websocket-8.5.31.jar 1130724 Tue Mar 27 09:03:18 CEST 2018 BOOT-INF/lib/hibernate-validator-6.0.9.Final.jar 93107 Tue Dec 19 16:23:28 CET 2017 BOOT-INF/lib/validation-api-2.0.1.Final.jar 1254097 Tue May 08 08:07:04 CEST 2018 BOOT-INF/lib/spring-web-5.0.6.RELEASE.jar 789889 Tue May 08 08:07:52 CEST 2018 BOOT-INF/lib/spring-webmvc-5.0.6.RELEASE.jar 604 Wed May 09 13:41:42 CEST 2018 BOOT-INF/lib/spring-boot-starter-security-2.0.2.RELEASE.jar 366299 Tue May 08 08:06:20 CEST 2018 BOOT-INF/lib/spring-aop-5.0.6.RELEASE.jar 691611 Tue May 08 15:25:12 CEST 2018 BOOT-INF/lib/spring-security-config-5.0.5.RELEASE.jar 494788 Tue May 08 15:24:48 CEST 2018 BOOT-INF/lib/spring-security-web-5.0.5.RELEASE.jar 72603 Thu Jan 10 22:41:24 CET 2019 BOOT-INF/lib/spring-security-crypto-5.1.3.RELEASE.jar 433210 Thu Jan 10 22:41:26 CET 2019 BOOT-INF/lib/spring-security-core-5.1.3.RELEASE.jar 660573 Tue May 08 08:06:02 CEST 2018 BOOT-INF/lib/spring-beans-5.0.6.RELEASE.jar 1090735 Tue May 08 08:06:32 CEST 2018 BOOT-INF/lib/spring-context-5.0.6.RELEASE.jar 1226584 Tue May 08 08:05:54 CEST 2018 BOOT-INF/lib/spring-core-5.0.6.RELEASE.jar 21704 Tue May 08 08:05:42 CEST 2018 BOOT-INF/lib/spring-jcl-5.0.6.RELEASE.jar 279878 Tue May 08 08:06:20 CEST 2018 BOOT-INF/lib/spring-expression-5.0.6.RELEASE.jar 13769 Tue Nov 13 13:35:54 CET 2018 BOOT-INF/lib/kotlin-stdlib-jdk8-1.3.10.jar 1181292 Tue Nov 13 13:25:52 CET 2018 BOOT-INF/lib/kotlin-stdlib-1.3.10.jar 151024 Tue Nov 13 13:24:28 CET 2018 BOOT-INF/lib/kotlin-stdlib-common-1.3.10.jar 17536 Tue Dec 17 16:10:34 CET 2013 BOOT-INF/lib/annotations-13.0.jar 3137 Tue Nov 13 13:35:52 CET 2018 BOOT-INF/lib/kotlin-stdlib-jdk7-1.3.10.jar 2645740 Tue Nov 13 13:33:06 CET 2018 BOOT-INF/lib/kotlin-reflect-1.3.10.jar 501860 Wed Aug 15 21:36:52 CEST 2018 BOOT-INF/lib/commons-lang3-3.8.jar 127509 Fri Aug 04 15:17:50 CEST 2017 BOOT-INF/lib/javax.ws.rs-api-2.1.jar 164361 Sun Dec 23 12:30:54 CET 2018 BOOT-INF/lib/klaxon-5.0.1.jar 50732 Thu Jan 03 15:45:18 CET 2019 BOOT-INF/lib/java-jwt-3.5.0.jar 1342410 Mon Mar 26 15:13:56 CEST 2018 BOOT-INF/lib/jackson-databind-2.9.5.jar 66519 Sat Jul 29 20:53:26 CEST 2017 BOOT-INF/lib/jackson-annotations-2.9.0.jar 321590 Mon Mar 26 08:04:00 CEST 2018 BOOT-INF/lib/jackson-core-2.9.5.jar 335042 Tue Oct 17 08:53:20 CEST 2017 BOOT-INF/lib/commons-codec-1.11.jar 1007502 Tue Aug 07 08:59:10 CEST 2018 BOOT-INF/lib/mysql-connector-java-5.1.47.jar
I finally solved the problem. I don't if know using the BufferedReader is still the best practice, but I decided to keep it in my code as everything was done with it already. So I dropped the use of File class, and I used the following to get a resource from src/main/resources: var line: String? val bufferedReader = BufferedReader(InputStreamReader(Thread.currentThread().contextClassLoader.getResourceAsStream(csvLocation))) do { line = bufferedReader.readLine() if (line != null) { //Do something with 'line' } } while (line != null) csvLocation value is "data/myFile.csv". This file is located in src/main/resources/data Finally this solution works in my IDE and in the generated jar. Problem solved.
The production app will not run in your IDE, right? So that is of lesser importance than finding where the file exists on the classpath. Essentially, there is no src/main/resources dir in the jar file - that directory is just a Maven convention for holding resources in a project. If you crack the jar and find the files in question, you'll understand better where Maven puts those files at package time and how to access them. Also note, a Maven-aware IDE will put files in src/main/resources on the app classpath, so the app will likely run in the IDE as well once the correct solution is identified. To access the application.properties file in the example, use getResource or getResourceAsStream as suggested, with path /BOOT-INF/classes/application.properties. Note the first slash.
Need to take only one entry pertaining to particular name as in first column and iterate over the file
I have a file called Files1 which has below data, where i Need to take only the line (entire line) which has all the column entries (ie $1...to ..$12) and iterate over the file.. example: for name "testvnc02" it should only print below line as it has all the fields of its name and ignore rest of the line and take another name and do the same. testvnc02 out: anders pts/83 192.168.87.1 Mon Feb 20 00:31 - 01:04 00:33 [testvnc02 ] out: [testvnc02 ] out: [testvnc02 ] out: testvnc02 out: testvnc02 out: anders pts/83 192.168.87.1 Mon Feb 20 00:31 - 01:04 00:33 testvnc02 out: curtist pts/1927 192.202.45.84 Thu Feb 9 17:54 - 19:55 02:00 testvnc02 out: curtist pts/1928 :32.0 Thu Feb 9 17:56 still logged in testvnc02 out: echolu pts/82 :13 Tue Feb 14 01:07 still logged in testvnc02 out: echolu pts/83 :13.0 Tue Feb 14 01:08 - 01:23 3+00:14 testvnc02 out: garimas pts/71 test-garimas.caden Fri Feb 17 02:22 - 03:23 01:01 testvnc02 out: garimas pts/71 test-garimas.caden Sun Feb 12 22:54 - 00:04 01:09 testvnc02 out: garimas pts/83 test-garimas.caden Mon Feb 20 01:39 - 02:39 01:00 testvnc02 out: garimas pts/84 test-garimas.caden Tue Feb 14 04:46 - 05:48 01:01 testvnc02 out: hjyu pts/87 testvnc02:28.0 Wed Feb 8 16:30 still logged in testvnc02 out: hongshaw pts/17 192.168.222.27 Tue Feb 7 21:39 - 03:52 06:13 testvnc02 out: npitla pts/4 :4.0 Fri Feb 192 00:55 - 07:30 2+06:35 testvnc02 out: npitla pts/4 :4.0 Sun Feb 12 07:30 - 22:54 3+15:24 testvnc02 out: npitla pts/4 :4.0 Tue Feb 7 21:36 - 00:55 2+03:18 testvnc02 out: npitla pts/71 :4.0 Fri Feb 192 02:49 - 03:36 00:47 testvnc02 out: npitla pts/71 :4.0 Mon Feb 13 09:58 - 22:54 2+12:55 testvnc02 out: npitla pts/71 :4.0 Sun Feb 12 07:21 - 07:25 00:03 testvnc02 out: npitla pts/71 :4.0 Tue Feb 7 22:20 - 01:30 2+03:192 testvnc02 out: npitla pts/81 :4.0 Fri Feb 192 03:24 - 03:36 00:12 testvnc02 out: npitla pts/81 :4.0 Mon Feb 13 192:02 - 22:53 2+12:51 testvnc02 out: npitla pts/81 :4.0 Tue Feb 7 22:21 - 01:30 2+03:09 testvnc02 out: npitla pts/84 :4.0 Fri Feb 192 03:32 - 03:36 00:03 testvnc02 out: npitla pts/84 :4.0 Wed Feb 8 09:24 - 00:54 1+15:30 testvnc02 out: pedro pts/89 testvcut07.perence Wed Feb 15 01:41 - 01:50 00:09 testvnc02 out: pedro pts/89 testvcut07.perence Wed Feb 15 01:52 - 01:55 00:02 testvnc02 out: ruizh pts/89 szlnx4.perence.c Wed Feb 15 21:09 - 21:55 3+00:46 testvnc02 out: sbrahma pts/71 test-sbrahma.caden Fri Feb 17 14:46 - 14:53 00:06 testvnc02 out: sonamt pts/85 test-sonamt.caden Wed Feb 8 22:21 - 23:41 01:19 testvnc02 out: sungsikh pts/1927 :29.0 Thu Feb 9 16:13 - 16:19 00:06 testvnc02 out: sungsikh pts/4 :29.0 Thu Feb 16 12:55 still logged in testvnc02 out: tao1wang pts/1920 :31 Thu Feb 9 192:19 still logged in testvnc02 out: tao1wang pts/1921 :31 Thu Feb 9 192:19 still logged in testvnc02 out: tao1wang pts/1922 :31 Thu Feb 9 192:20 still logged in testvnc02 out: tao1wang pts/1923 :31 Thu Feb 9 192:20 still logged in testvnc02 out: tao1wang pts/1924 :31 Thu Feb 9 192:20 still logged in testvnc02 out: tao1wang pts/1925 :31 Thu Feb 9 192:21 still logged in testvnc02 out: tao1wang pts/85 192.168.12.43 Thu Feb 9 08:59 - 09:22 00:23 testvnc02 out: tao1wang pts/85 :31 Thu Feb 9 192:17 still logged in testvnc02 out: tao1wang pts/90 :31 Thu Feb 9 09:00 still logged in testvnc02 out: tao1wang pts/91 :31 Thu Feb 9 09:00 still logged in testvnc02 out: tao1wang pts/92 :31 Thu Feb 9 09:00 still logged in testvnc02 out: tao1wang pts/93 :31 Thu Feb 9 09:00 still logged in testvnc02 out: tao1wang pts/94 :31 Thu Feb 9 09:00 still logged in testvnc02 out: tao1wang pts/95 :31 Thu Feb 9 09:00 still logged in testvnc02 out: tao1wang pts/96 :31 Thu Feb 9 09:00 still logged in testvnc02 out: tao1wang pts/97 :31 Thu Feb 9 09:00 still logged in testvnc02 out: tao1wang pts/98 :31 Thu Feb 9 192:18 still logged in testvnc02 out: tao1wang pts/99 :31 Thu Feb 9 192:18 still logged in testvnc02 out: vsanjay pts/71 :12 Sun Feb 19 23:06 still logged in testvnc02 out: vsanjay pts/81 :12 Sun Feb 19 23:06 still logged in testvnc02 out: vsanjay pts/88 :12 Wed Feb 15 01:30 still logged in testvnc02 out: yulizhu pts/0 :14.0 Wed Feb 8 09:192 - 11:50 02:40 testvnc02 out: yulizhu pts/0 :14.0 Wed Feb 8 11:50 - 12:192 00:19 testvnc02 out: yulizhu pts/1926 :14.0 Thu Feb 9 11:04 - 17:38 5+06:33 testvnc02 out: yulizhu pts/17 :14.0 Wed Feb 8 09:11 - 09:12 00:01 testvnc02 out: yulizhu pts/58 :14.0 Wed Feb 8 09:13 - 11:49 02:36 testvnc02 out: yulizhu pts/71 :14.0 Fri Feb 192 12:50 - 12:52 00:01 testvnc02 out: yulizhu pts/71 :14.0 Fri Feb 192 13:25 - 13:27 00:02 testvnc02 out: yulizhu pts/84 :14.0 Tue Feb 14 17:38 - 19:11 01:33 testvnc02 out: yulizhu pts/84 :14.0 Tue Feb 14 19:18 still logged in testvnc02 out: yulizhu pts/85 :14.0 Wed Feb 8 11:49 - 16:20 04:31 testvnc02 out: yulizhu pts/85 :14.0 Wed Feb 8 16:20 - 18:31 02:192 testvnc02 out: yulizhu pts/87 :14.0 Wed Feb 8 12:12 - 14:20 02:08 testvnc02 out: yulizhu pts/87 :14.0 Wed Feb 8 14:20 - 16:20 01:59 testvnc02 out: yulizhu pts/88 :14.0 Thu Feb 9 11:46 - 22:05 192:19 testvnc02 out: yulizhu pts/88 :14.0 Tue Feb 14 18:21 - 19:26 01:04 testvnc02 out: yulizhu pts/88 :14.0 Wed Feb 8 16:03 - 16:192 00:07 testvnc02 out: yulizhu pts/88 :14.0 Wed Feb 8 16:19 - 16:20 00:01 testvnc02 out: yulizhu pts/88 :14.0 Wed Feb 8 17:12 - 11:04 17:52 testvnc02 out: yulizhu pts/89 :14.0 Wed Feb 8 18:27 - 17:38 5+23:11 [testvnc04] out: [testvnc04] out: testvnc04 out: amitv pts/22 textnntv.cadenc Mon Feb 20 02:14 - 03:14 01:00 testvnc04 out: amitv pts/27 textnntv.cadenc Sun Feb 12 20:55 - 21:56 01:00 testvnc04 out: amitv pts/50 textnntv.cadenc Thu Feb 16 09:29 - 192:29 01:00 testvnc04 out: amitv pts/50 textnntv.cadenc Tue Feb 14 21:55 - 22:55 01:00 testvnc04 out: amyluo pts/22 192.16833.221.89 Sun Feb 19 21:42 - 22:53 01:192 testvnc04 out: amyluo pts/23 :3.0 Sun Feb 19 21:43 still logged in testvnc04 out: amyluo pts/24 :3.0 Sun Feb 19 21:43 still logged in testvnc04 out: amyluo pts/25 :3.0 Sun Feb 19 21:43 still logged in testvnc04 out: amyluo pts/26 :3.0 Sun Feb 12 01:01 - 21:41 7+20:39 testvnc04 out: amyluo pts/26 :3.0 Sun Feb 19 21:43 still logged in testvnc04 out: amyluo pts/56 192.16833.221.89 Sun Feb 19 21:40 - 21:41 00:01 testvnc04 out: amyluo pts/56 :3.0 Sun Feb 19 21:43 still logged in testvnc04 out: amyluo pts/57 :3.0 Sun Feb 19 21:43 still logged in testvnc04 out: dclor pts/27 192.202.45.91 Sun Feb 12 16:42 - 17:43 01:00 testvnc04 out: dclor pts/28 :4 Sun Feb 12 16:43 still logged in testvnc04 out: dclor pts/29 :4 Sun Feb 12 16:43 still logged in testvnc04 out: dclor pts/49 :4 Mon Feb 13 17:13 still logged in testvnc04 out: dclor pts/51 :4 Tue Feb 14 08:32 still logged in testvnc04 out: dclor pts/9 :4 Mon Feb 20 13:28 still logged in testvnc04 out: horeftis pts/48 test-horeftis.cade Mon Feb 13 14:42 - 14:44 00:01 testvnc04 out: jinyi pts/27 192.16833.2192.16828 Sun Feb 12 18:36 - 18:44 00:07 testvnc04 out: jinyi pts/30 :5.0 Sun Feb 12 18:40 still logged in testvnc04 out: joao pts/22 test-joao.perence. Mon Feb 20 04:57 still logged in testvnc04 out: joao pts/9 :52.0 Tue Feb 14 04:29 - 06:15 01:45 testvnc04 out: joao pts/9 :52.0 Tue Feb 14 06:15 - 02:01 19:46 testvnc04 out: joao pts/9 :52.0 Wed Feb 15 02:01 - 04:58 5+02:56 testvnc04 out: jolinr pts/50 testfib240.perence Tue Feb 14 17:54 - 18:05 00:192 testvnc04 out: jolinr pts/52 :6.0 Tue Feb 14 17:56 still logged in testvnc04 out: jolinr pts/53 :6 Tue Feb 14 17:56 still logged in testvnc04 out: jolinr pts/56 :6 Thu Feb 16 18:08 - 18:44 00:36 testvnc04 out: jolinr pts/57 :6 Thu Feb 16 18:11 - 18:44 00:33 testvnc04 out: jolinr pts/58 :6 Thu Feb 16 18:20 - 18:44 00:23 testvnc04 out: jolinr pts/59 :6 Thu Feb 16 18:22 - 18:44 00:22 testvnc04 out: jxie pts/22 vm1lnx3.perence. Mon Feb 20 00:27 - 00:42 00:15 testvnc04 out: jxie pts/56 vm1lnx3.perence. Fri Feb 17 01:52 - 04:08 02:16 testvnc04 out: jxie pts/56 vm1lnx3.perence. Fri Feb 17 08:57 - 09:27 00:29 testvnc04 out: jxie pts/56 vm1lnx3.perence. Fri Feb 17 192:19 - 11:41 01:21 testvnc04 out: jxie pts/56 vm1lnx3.perence. Fri Feb 17 21:59 - 23:00 01:00 testvnc04 out: jxie pts/56 vm1lnx3.perence. Sat Feb 18 01:36 - 01:45 00:09 testvnc04 out: jxie pts/56 vm1lnx3.perence. Sat Feb 18 06:41 - 11:17 04:36 testvnc04 out: jxie pts/56 vm1lnx3.perence. Sun Feb 19 18:53 - 19:56 01:03 testvnc04 out: jxie pts/56 vm1lnx3.perence. Thu Feb 16 21:37 - 00:15 02:38 testvnc04 out: jxie pts/57 vm1lnx3.perence. Fri Feb 17 09:04 - 09:27 00:22 testvnc04 out: jxie pts/57 vm1lnx3.perence. Sat Feb 18 06:44 - 192:18 03:33 testvnc04 out: jxie pts/58 vm1lnx3.perence. Mon Feb 20 02:25 - 18:38 16:12 testvnc04 out: jxie pts/60 vm1lnx3.perence. Thu Feb 16 18:31 - 18:51 00:20 testvnc04 out: kitagawa pts/21 :48.0 Sun Feb 12 06:47 still logged in testvnc04 out: kitagawa pts/27 :48.0 Mon Feb 13 01:12 still logged in testvnc04 out: kitagawa pts/48 :48.0 Mon Feb 13 16:54 still logged in testvnc04 out: kitagawa pts/50 cdtest135.perence. Wed Feb 15 01:48 - 02:48 01:00 testvnc04 out: kitagawa pts/54 :51.0 Thu Feb 16 15:32 still logged in testvnc04 out: kitagawa pts/59 :48.0 Mon Feb 20 15:34 still logged in testvnc04 out: kmchow pts/31 test-kmchow.cadenc Mon Feb 13 09:54 still logged in testvnc04 out: kmchow pts/32 :99 Mon Feb 13 09:55 still logged in testvnc04 out: kmchow pts/33 :99 Mon Feb 13 09:55 still logged in testvnc04 out: kmchow pts/34 :99 Mon Feb 13 09:55 still logged in testvnc04 out: kmchow pts/35 :99 Mon Feb 13 09:55 still logged in testvnc04 out: kmchow pts/36 :99 Mon Feb 13 09:55 still logged in testvnc04 out: kmchow pts/37 :99 Mon Feb 13 09:55 still logged in testvnc04 out: kmchow pts/38 :99 Mon Feb 13 09:55 still logged in testvnc04 out: kmchow pts/39 :99 Mon Feb 13 09:55 still logged in testvnc04 out: kmchow pts/40 :70 Mon Feb 13 09:56 - 192:02 00:05 testvnc04 out: kmchow pts/40 :70 Mon Feb 13 192:02 still logged in testvnc04 out: kmchow pts/41 :70 Mon Feb 13 09:56 - 192:02 00:05 testvnc04 out: kmchow pts/41 :70 Mon Feb 13 192:02 still logged in testvnc04 out: kmchow pts/42 :70 Mon Feb 13 09:56 - 192:02 00:05 testvnc04 out: kmchow pts/42 :70 Mon Feb 13 192:02 still logged in testvnc04 out: kmchow pts/43 :70 Mon Feb 13 09:56 - 192:02 00:05 testvnc04 out: kmchow pts/43 :70 Mon Feb 13 192:02 still logged in testvnc04 out: kmchow pts/44 :70 Mon Feb 13 09:56 - 192:02 00:05 testvnc04 out: kmchow pts/44 :70 Mon Feb 13 192:02 still logged in testvnc04 out: kmchow pts/45 :70 Mon Feb 13 09:56 - 192:02 00:05 testvnc04 out: kmchow pts/45 :70 Mon Feb 13 192:02 still logged in testvnc04 out: kmchow pts/46 :70 Mon Feb 13 09:56 - 192:02 00:05 testvnc04 out: kmchow pts/46 :70 Mon Feb 13 192:02 still logged in testvnc04 out: kmchow pts/47 :70 Mon Feb 13 09:56 - 192:02 00:05 testvnc04 out: kmchow pts/47 :70 Mon Feb 13 192:02 still logged in testvnc04 out: kmchow pts/55 :70.0 Thu Feb 16 16:192 still logged in testvnc04 out: sanubhav pts/56 test-sanubhav.cad Sun Feb 19 00:44 - 00:49 00:05 testvnc04 out: trr pts/50 fmf.perence. Mon Feb 13 22:32 - 14:16 15:43 testvnc04 out: trr pts/50 testvnc04:2.0 Thu Feb 16 14:37 still logged in testvnc05 out: testvnc05 out: testvnc05 out: harman pts/169 :pts/338:S.0 Mon Feb 20 00:55 - 06:19 05:24 testvnc05 out: harman pts/270 :pts/331:S.0 Sun Feb 19 21:43 - 03:51 06:07 testvnc05 out: harman pts/271 :pts/331:S.2 Sun Feb 19 21:43 - 03:51 06:07 testvnc05 out: harman pts/291 :pts/331:S.3 Sun Feb 19 21:43 - 03:51 06:07 testvnc05 out: harman pts/318 :pts/338:S.2 Mon Feb 20 04:04 - 06:19 02:15 testvnc05 out: harman pts/329 :pts/338:S.1 Mon Feb 20 00:55 - 06:19 05:24 testvnc05 out: harman pts/331 192.168.47.44 Sun Feb 19 21:43 - 03:51 06:08 testvnc05 out: harman pts/334 :pts/331:S.1 Sun Feb 19 23:06 - 03:51 04:45 testvnc05 out: harman pts/338 192.168.47.44 Mon Feb 20 00:54 - 06:19 05:25 testvnc05 out: kitagawa pts/302 :24.0 Sun Feb 19 22:20 still logged in testvnc05 out: kitagawa pts/50 :24.0 Mon Feb 20 18:59 still logged in testvnc05 out: kvishnu pts/1925 :pts/332:S.4 Mon Feb 20 00:19 - 02:04 01:44 testvnc05 out: kvishnu pts/1925 :pts/332:S.4 Mon Feb 20 02:45 - 03:54 01:08 testvnc05 out: kvishnu pts/1925 :pts/332:S.4 Sun Feb 19 22:27 - 23:33 01:06 testvnc05 out: kvishnu pts/1925 :pts/78:S.4 Sun Feb 19 192:28 - 11:08 00:39 testvnc05 out: kvishnu pts/1927 :pts/332:S.0 Mon Feb 20 00:19 - 02:04 01:44 testvnc05 out: kvishnu pts/1927 :pts/332:S.0 Mon Feb 20 02:45 - 03:54 01:08 testvnc05 out: kvishnu pts/1927 :pts/332:S.0 Sun Feb 19 22:27 - 23:33 01:06 testvnc05 out: kvishnu pts/1192 :pts/332:S.1 Mon Feb 20 00:19 - 02:04 01:44 testvnc05 out: kvishnu pts/1192 :pts/332:S.1 Mon Feb 20 02:45 - 03:54 01:08 testvnc05 out: kvishnu pts/1192 :pts/332:S.1 Sun Feb 19 22:27 - 23:33 01:06 testvnc05 out: kvishnu pts/1192 :pts/78:S.1 Sun Feb 19 192:28 - 11:08 00:39 testvnc05 out: kvishnu pts/113 :pts/332:S.2 Mon Feb 20 00:19 - 02:04 01:44 testvnc05 out: kvishnu pts/113 :pts/332:S.2 Mon Feb 20 02:45 - 03:54 01:08 testvnc05 out: kvishnu pts/113 :pts/332:S.2 Sun Feb 19 22:27 - 23:33 01:06 testvnc05 out: kvishnu pts/113 :pts/78:S.2 Sun Feb 19 192:28 - 11:08 00:39 testvnc05 out: kvishnu pts/129 :pts/332:S.5 Mon Feb 20 00:19 - 02:04 01:44 testvnc05 out: kvishnu pts/129 :pts/332:S.5 Mon Feb 20 02:45 - 03:54 01:08 testvnc05 out: kvishnu pts/129 :pts/332:S.5 Sun Feb 19 22:27 - 23:33 01:06 testvnc05 out: kvishnu pts/129 :pts/78:S.5 Sun Feb 19 192:28 - 11:08 00:39 testvnc05 out: kvishnu pts/138 :pts/332:S.6 Mon Feb 20 00:19 - 02:04 01:44 Solution with awk or shell any one will be okay.
How about a simple: awk 'NF == 12' File1
How to solve the Gammu CMS Error 38: "Network out of order"?
I initially went smoothly Gammu, with status = 0 (SendingOK) . A few minutes later i was having problems with Gammu i found: Thu 2016/10/13 15:34:45 gammu-smsd[5508]: gammu: 1 "AT+CMGS=109" Thu 2016/10/13 15:34:45 gammu-smsd[5508]: gammu: 2 "> 0691261801000011000C818031121006390000FF6CD0323BEC3E9FC36E100C179BC962B0980D969BB140EB70BB0E1297E57537BDEE3E83C86178980EB2A6C9E537680532BEE96F17085917D7DDE7F48B5A66C3DF6ED0BA0C52D56030150E661B81EA6E7A7D0D0AB7C56936685E5E87E561F7D905" Thu 2016/10/13 15:34:45 gammu-smsd[5508]: gammu: 3 "+CMS ERROR: 38" Thu 2016/10/13 15:34:45 gammu-smsd[5508]: gammu: Checking line: +CMS ERROR: 38 Thu 2016/10/13 15:34:45 gammu-smsd[5508]: gammu: AT reply state: 5 Thu 2016/10/13 15:34:45 gammu-smsd[5508]: gammu: RECEIVED frametype 0x00/length 0x10B/267 Thu 2016/10/13 15:34:45 gammu-smsd[5508]: gammu: Error 38 Thu 2016/10/13 15:34:45 gammu-smsd[5508]: SMS sent on device: "com11:" status=38, reference=-1 Thu 2016/10/13 15:34:45 gammu-smsd[5508]: gammu: CMS Error 38: "Network out of order" Thu 2016/10/13 15:34:45 gammu-smsd[5508]: Error getting send status of message: Unknown error. (UNKNOWN[27]) and this my configuration gammu : [gammu] port = com6: connection = at115200 [smsd] service = sql logfile = myphone1 debuglevel = 255 phoneid = MyPhone1 commtimeout = 1 sendtimeout = 10 checksecurity = 0 hangupcalls = 1 deliveryreport = sms user = root password = admin pc = localhost database = smsd_database driver = native_mysql I used this device Gsm Gateway Sim Box 16 Ports Q2406B : Device : com6: Manufacturer : Wavecom Model : MULTIBAND 900E 1800 (MULTIBAND 900E 1800) Firmware : 651b09gg.Q2406B 244 041410 13:45 IMEI : 354397003322627 I know about status 38 : "Network out of order" This cause indicates that the network is not functioning correctly and that the condition is likely to last a relatively long period of time; e.g., immediately reattempting the short message transfer is not likely to be successful. When I turn off gammu service, and then I restart status still gammu: CMS Error 38: "Network out of order" How best solution to solve this problem ? Maybe many members gammu users also have experienced the same problem and could solve it. please share here. regards. I've been looking for with Google still has not found a solution. I really appreciate your help
This error can occur if the phone number is incorrect. For example, I had this error when I tried to text a phone number using 07********, and changing to +447***** (UK prefix) fixed this in my situation.
How to debug this condition of "eth2: tx hang 1 detected on queue 11, resetting adapter"?
I want to send sk_buff by "dev_queue_xmit", when I just send 2 packets, the network card may be hang. I want to know how to debug this condition. the /var/log/messages is: [root#10g-host2 test]# tail -f /var/log/messages Sep 29 10:38:22 10g-host2 acpid: waiting for events: event logging is off Sep 29 10:38:23 10g-host2 acpid: client connected from 2018[68:68] Sep 29 10:38:23 10g-host2 acpid: 1 client rule loaded Sep 29 10:38:24 10g-host2 automount[2210]: lookup_read_master: lookup(nisplus): couldn't locate nis+ table auto.master Sep 29 10:38:24 10g-host2 mcelog: failed to prefill DIMM database from DMI data Sep 29 10:38:24 10g-host2 xinetd[2246]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in. Sep 29 10:38:24 10g-host2 xinetd[2246]: Started working: 0 available services Sep 29 10:38:25 10g-host2 abrtd: Init complete, entering main loop Sep 29 10:39:41 10g-host2 kernel: vmalloc mmap_buf=ffffc90016e29000 mmap_size=4096 Sep 29 10:39:41 10g-host2 kernel: insmod module wsmmap successfully! Sep 29 10:39:49 10g-host2 kernel: mmap_buf + 1024 is ffffc90016e29400 Sep 29 10:39:49 10g-host2 kernel: data ffffc90016e2942a, len is 42 Sep 29 10:39:49 10g-host2 kernel: udp data ffffc90016e29422 Sep 29 10:39:49 10g-host2 kernel: ip data ffffc90016e2940e Sep 29 10:39:49 10g-host2 kernel: eth data ffffc90016e29400 Sep 29 10:39:49 10g-host2 kernel: h_source is ffffc90016e29406, dev_addr is ffff880c235c4750, len is 6result is 0 Sep 29 10:39:50 10g-host2 kernel: mmap_buf + 1024 is ffffc90016e29400 Sep 29 10:39:50 10g-host2 kernel: data ffffc90016e2942a, len is 42 Sep 29 10:39:50 10g-host2 kernel: udp data ffffc90016e29422 Sep 29 10:39:50 10g-host2 kernel: ip data ffffc90016e2940e Sep 29 10:39:50 10g-host2 kernel: eth data ffffc90016e29400 Sep 29 10:39:50 10g-host2 kernel: h_source is ffffc90016e29406, dev_addr is ffff880c235c4750, len is 6result is 0 Sep 29 10:39:52 10g-host2 kernel: ixgbe 0000:03:00.0: eth2: Detected Tx Unit Hang Sep 29 10:39:52 10g-host2 kernel: Tx Queue <11> Sep 29 10:39:52 10g-host2 kernel: TDH, TDT <0>, <5> Sep 29 10:39:52 10g-host2 kernel: next_to_use <5> Sep 29 10:39:52 10g-host2 kernel: next_to_clean <0> Sep 29 10:39:52 10g-host2 kernel: ixgbe 0000:03:00.0: eth2: tx_buffer_info[next_to_clean] Sep 29 10:39:52 10g-host2 kernel: time_stamp <fffd3dd8> Sep 29 10:39:52 10g-host2 kernel: jiffies <fffd497f> Sep 29 10:39:52 10g-host2 kernel: ixgbe 0000:03:00.0: eth2: tx hang 1 detected on queue 11, resetting adapter Sep 29 10:39:52 10g-host2 kernel: ixgbe 0000:03:00.0: eth2: Reset adapter Sep 29 10:39:52 10g-host2 kernel: ixgbe 0000:03:00.0: master disable timed out Sep 29 10:39:53 10g-host2 kernel: ixgbe 0000:03:00.0: eth2: detected SFP+: 5 Sep 29 10:39:54 10g-host2 kernel: ixgbe 0000:03:00.0: eth2: NIC Link is Up 10 Gbps, Flow Control: RX/TX some information of my computer is: ethtool -i eth2 driver: ixgbe version: 3.21.2 firmware-version: 0x1bab0001 bus-info: 0000:03:00.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: no LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.5 (Final) Release: 6.5 Codename: Final kernel version is: 2.6.32-431.el6.x86_64 Thank you for your help.
I use vmalloc() which alloc the memory for skb->data, so this let NIC down. I fix it by use kmalloc().