almost getting a mobile modem 5G connection - linux

I try to connect to a 3G/4G/5G mobile network using the Telit 5G modem FN990, and I even see an IP address in the logs, however it is not getting assigned to network device wwan0.
the PIN of the SIM is removed, as documented in https://wiki.archlinux.org/title/Mobile_broadband_modem#Remove_the_PIN .
there's basically two routes I took, both of which fail.
a) using nmcli
host:~# nmcli con show
NAME UUID TYPE DEVICE
Wired connection 2 9f1bf5da-f9e9-3f30-9f49-e567adf1f1b7 ethernet eth1
Wired connection 1 67fdb9dc-d570-3d55-ad2b-68281b3ca03d ethernet --
host:~# nmcli connection add type gsm con-name conn5g ifname cdc-wdm0
Connection 'conn5g' (50c76297-5289-452f-a105-2525122cf9c0) successfully added.
host:~# nmcli con show
NAME UUID TYPE DEVICE
Wired connection 2 9f1bf5da-f9e9-3f30-9f49-e567adf1f1b7 ethernet eth1
Wired connection 1 67fdb9dc-d570-3d55-ad2b-68281b3ca03d ethernet --
conn5g 50c76297-5289-452f-a105-2525122cf9c0 gsm --
host:~#
host:~# nmcli con up conn5g
Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).
host:~#
b) using mmcli
host:~# mmcli -m 0 --simple-connect="apn=internet.telekom,user=telekom,password=telekom"
successfully connected the modem
host:~#
during that, /var/log/messages says:
Feb 20 08:45:09 host daemon.debug ModemManager[319]: <debug> [modem0] processing 3GPP info...
Feb 20 08:45:09 host daemon.debug ModemManager[319]: <debug> [modem0] 3GPP cell id updated: '2<XXX>9->2<XXX>1'
Feb 20 08:45:09 host daemon.debug ModemManager[319]: <debug> [modem0] 3GPP location updated (MCC: '262', MNC: '1', location area code: '0', tracking area code: '<XXX>', cell ID: '2<XXX>1')
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0] user request to connect modem
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0] simple connect started...
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0] PIN: unspecified
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0] operator ID: unspecified
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0] allowed roaming: yes
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0] APN: internet.telekom
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0] IP family: unspecified
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0] allowed authentication: unspecified
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0] User: telekom
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0] Password: telekom
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0] simple connect state (4/8): wait to get fully enabled
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0] simple connect state (5/8): register
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0] already registered automatically in network '26201', automatic registration not launched...
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0] simple connect state (6/8): bearer
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0] Using already existing bearer at '/org/freedesktop/ModemManager1/Bearer/1'...
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0] simple connect state (7/8): connect
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0/bearer1] connecting...
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0] state changed (registered -> connecting)
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0/bearer1] launching connection with QMI port (cdc-wdm0) and data port (wwan0)
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0/bearer1] no specific IP family requested, defaulting to ipv4
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0/bearer1] defaulting to use static IP method
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0/bearer1] running IPv4 connection setup
[...]
Feb 20 08:46:34 host daemon.debug ModemManager[319]: [/dev/cdc-wdm0] Received generic response (translated)... <<<<<< QMUX: <<<<<< length = 69 <<<<<< flags = 0x80 <<<<<< service = "wds" <<<<<< client = 16 <<<<<< QMI: <<<<<< flags = "response" <<<<<<
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0/bearer1] IP Family: IPv4
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0/bearer1] QMI IPv4 Settings:
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0/bearer1] address: 10.156.137.45/30
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0/bearer1] gateway: 10.156.137.46
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0/bearer1] DNS #1: 10.74.210.210
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0/bearer1] DNS #2: 10.74.210.211
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0/bearer1] MTU: 1500
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0/bearer1] domains:
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0/wwan0/net] port now connected
Feb 20 08:46:34 host daemon.debug ModemManager[319]: <debug> [modem0/bearer1] connected
Feb 20 08:46:34 host daemon.info ModemManager[319]: <info> [modem0] state changed (connecting -> connected)
to me this looks good, but wwan0 is down, and has no IP:
host:~# ip a s wwan0
6: wwan0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/none
the state of the modem at this time:
host:~# mmcli -m 0
-----------------------------------
General | path: /org/freedesktop/ModemManager1/Modem/0
| device id: 4<XXX>e
-----------------------------------
Hardware | manufacturer: Telit
| model: FN990A28
| firmware revision: M0R.000001-B003
| carrier config: default
| h/w revision: 1.00
| supported: gsm-umts, lte, 5gnr
| current: gsm-umts, lte, 5gnr
| equipment id: 359<XXX>7
-----------------------------------
System | device: /sys/devices/platform/soc#0/32f10108.usb/38200000.dwc3/xhci-hcd.1.auto/usb3/3-1
| drivers: option, qmi_wwan
| plugin: telit
| primary port: cdc-wdm0
| ports: cdc-wdm0 (qmi), ttyUSB2 (at), ttyUSB3 (at), ttyUSB4 (at),
| wwan0 (net)
-----------------------------------
Numbers | own: +49<XXX>
-----------------------------------
Status | lock: sim-pin2
| unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
| state: connected
| power state: on
| access tech: lte
| signal quality: 100% (cached)
-----------------------------------
Modes | supported: allowed: 3g; preferred: none
| allowed: 4g; preferred: none
| allowed: 3g, 4g; preferred: 4g
| allowed: 3g, 4g; preferred: 3g
| allowed: 5g; preferred: none
| allowed: 3g, 5g; preferred: 5g
| allowed: 3g, 5g; preferred: 3g
| allowed: 4g, 5g; preferred: 5g
| allowed: 4g, 5g; preferred: 4g
| allowed: 3g, 4g, 5g; preferred: 5g
| allowed: 3g, 4g, 5g; preferred: 4g
| allowed: 3g, 4g, 5g; preferred: 3g
| current: allowed: 3g, 4g, 5g; preferred: 5g
-----------------------------------
Bands | supported: utran-1, utran-4, utran-6, utran-5, utran-8, utran-2,
| eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8,
| eutran-12, eutran-13, eutran-14, eutran-17, eutran-18, eutran-19,
| eutran-20, eutran-25, eutran-26, eutran-28, eutran-29, eutran-30,
| eutran-32, eutran-34, eutran-38, eutran-39, eutran-40, eutran-41,
| eutran-42, eutran-43, eutran-46, eutran-48, eutran-66, eutran-71,
| utran-19
| current: utran-1, utran-4, utran-6, utran-5, utran-8, utran-2,
| eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8,
| eutran-12, eutran-13, eutran-14, eutran-17, eutran-18, eutran-19,
| eutran-20, eutran-25, eutran-26, eutran-28, eutran-29, eutran-30,
| eutran-32, eutran-34, eutran-38, eutran-39, eutran-40, eutran-41,
| eutran-42, eutran-43, eutran-46, eutran-48, eutran-66, eutran-71,
| utran-19
-----------------------------------
IP | supported: ipv4, ipv6, ipv4v6
-----------------------------------
3GPP | imei: 359<XXX>7
| enabled locks: fixed-dialing
| operator id: 26201
| operator name: Telekom.de
| registration: home
-----------------------------------
3GPP EPS | ue mode of operation: csps-2
| initial bearer path: /org/freedesktop/ModemManager1/Bearer/0
| initial bearer apn: internet.telekom
| initial bearer ip type: ipv4
-----------------------------------
SIM | primary sim path: /org/freedesktop/ModemManager1/SIM/0
| sim slot paths: slot 1: /org/freedesktop/ModemManager1/SIM/0 (active)
| slot 2: none
-----------------------------------
Bearer | paths: /org/freedesktop/ModemManager1/Bearer/1
host:~#
here's some info about the tool versions:
host:~# nmcli --version
nmcli tool, version 1.30.4
host:~# mmcli --version
mmcli 1.16.2
Copyright (2011 - 2021) Aleksander Morgado
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
host:~#
here's some info about the kernel:
host:~# zcat /proc/config.gz | grep CDC
CONFIG_USB_NET_CDCETHER=y
# CONFIG_USB_NET_CDC_EEM is not set
CONFIG_USB_NET_CDC_NCM=y
# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set
CONFIG_USB_NET_CDC_MBIM=y
# CONFIG_USB_NET_CDC_SUBSET is not set
CONFIG_BRCMFMAC_PROTO_BCDC=y
# CONFIG_MFD_ATMEL_HLCDC is not set
CONFIG_USB_CDC_COMPOSITE=m
CONFIG_USB_G_MULTI_CDC=y
# CONFIG_COMMON_CLK_CDCE706 is not set
# CONFIG_COMMON_CLK_CDCE925 is not set
host:~#
host:~# zcat /proc/config.gz | grep WWAN
CONFIG_USB_NET_QMI_WWAN=y
CONFIG_USB_SERIAL_WWAN=y
host:~#
can anyone point me to what's going wrong, or how I can further debug the issue? Why is wwan0 not assigned the IP despite the line [modem0/wwan0/net] port now connected?

Related

NodeJS converting Docker Redis hostname to localhost

It seems the Redis container hostname is being converted to localhost by NodeJS.
Here are my files:
.env
REDIS_HOST=redis-eventsystem
REDIS_PORT=6379
REDIS_SECRET=secret
index.ts
// there are things above this
let Redis = require('redis');
let client : any = Redis.createClient({
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT,
legacyMode: true
});
client.on('error', (err : Error) : void => {
console.error(
`Redis connection error: ${err}`
);
});
client.on('connect', (err : Error) : void => {
console.info(
`Redis connection success.`
);
});
client.connect();
// there are things bellow this
docker-compose.yml
version: '3.8'
services:
eventsystem:
image: eventsystem
restart: always
depends_on:
- "redis-eventsystem"
ports:
- "80:3000"
networks:
- eventsystem
redis-eventsystem:
image: redis
command: ["redis-server", "--bind", "redis-eventsystem", "--port", "6379", "--protected-mode", "no"]
restart: always
networks:
- eventsystem
networks:
eventsystem:
driver: bridge
docker log
2022-11-21 17:50:41 eventsystem-redis-eventsystem-1 | 1:C 21 Nov 2022 20:50:41.106 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
2022-11-21 17:50:41 eventsystem-redis-eventsystem-1 | 1:C 21 Nov 2022 20:50:41.106 # Redis version=7.0.5, bits=64, commit=00000000, modified=0, pid=1, just started
2022-11-21 17:50:41 eventsystem-redis-eventsystem-1 | 1:C 21 Nov 2022 20:50:41.106 # Configuration loaded
2022-11-21 17:50:41 eventsystem-redis-eventsystem-1 | 1:M 21 Nov 2022 20:50:41.106 * monotonic clock: POSIX clock_gettime
2022-11-21 17:50:41 eventsystem-redis-eventsystem-1 | 1:M 21 Nov 2022 20:50:41.108 * Running mode=standalone, port=6379.
2022-11-21 17:50:41 eventsystem-redis-eventsystem-1 | 1:M 21 Nov 2022 20:50:41.108 # Server initialized
2022-11-21 17:50:41 eventsystem-redis-eventsystem-1 | 1:M 21 Nov 2022 20:50:41.108 * Ready to accept connections
2022-11-21 17:50:41 eventsystem-eventsystem-1 |
2022-11-21 17:50:41 eventsystem-eventsystem-1 | > eventsystem#1.0.0 start
2022-11-21 17:50:41 eventsystem-eventsystem-1 | > node index.js serve
2022-11-21 17:50:41 eventsystem-eventsystem-1 |
2022-11-21 17:50:42 eventsystem-eventsystem-1 | Application is listening at http://localhost:3000
2022-11-21 17:50:42 eventsystem-eventsystem-1 | Mon Nov 21 2022 20:50:42 GMT+0000 (Coordinated Universal Time) - Redis connection error: Error: connect ECONNREFUSED 127.0.0.1:6379
As you all can see the connection is refused for the IP 127.0.0.1 but on my application the redis is set to work on the hostname for the container which holds the redis server. I can't think of anything that may be causing this problem.
So to answer my own question, basically the problem was related to the variables passed on createClient at my code.
It seems that for some unknown reason the host and port variables need to be passed inside a variable called socket inside the createClient argument object.
So, instead of doing the usual and passing the host and port inside the argument object, you must do the following:
let client : any = Redis.createClient({
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT,
socket: {
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT
},
legacyMode: true
});
Hope to have helped someone else besides me.
Cheers!

Unable to send email - ISPConfig / Roundcube

I have got ISPConfig installed on my VPS and I'm trying to set up the email function.
My Server IP is 146.71.76.30 and hostname is set to dutyhosts.tk
Whenever I try and send an email via Roundcube I am getting the below error in the mail logs
Can someone advise on what I have missed or need to sort?
Aug 25 12:44:06 dutyhosts dovecot: imap-login: Login: user=<support#dutyhosts.tk>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11098, secured, session=<DBQKD7Otrtx/AAAB>
Aug 25 12:44:06 dutyhosts postfix/pickup[10367]: A6C04A558D: uid=33 from=<support#dutyhosts.tk>
Aug 25 12:44:06 dutyhosts dovecot: imap(support#dutyhosts.tk): Logged out in=451 out=640
Aug 25 12:44:06 dutyhosts postfix/cleanup[11095]: warning: connect to Milter service inet:localhost:11332: Connection refused
Aug 25 12:44:06 dutyhosts postfix/cleanup[11095]: A6C04A558D: message-id=<f003feab44aba7e7cd98fba5afbea994#dutyhosts.tk>
Aug 25 12:44:06 dutyhosts postfix/qmgr[10368]: A6C04A558D: from=<support#dutyhosts.tk>, size=549, nrcpt=1 (queue active)
Aug 25 12:44:08 dutyhosts dovecot: imap-login: Login: user=<support#dutyhosts.tk>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11102, secured, session=<bZwnD7OtwNx/AAAB>
Aug 25 12:44:08 dutyhosts dovecot: imap(support#dutyhosts.tk): Logged out in=70 out=633
Aug 25 12:44:10 dutyhosts dovecot: imap-login: Login: user=<support#dutyhosts.tk>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11106, secured, session=<dio+D7Otwtx/AAAB>
Aug 25 12:44:10 dutyhosts dovecot: imap(support#dutyhosts.tk): Logged out in=76 out=546
Aug 25 12:44:10 dutyhosts dovecot: imap-login: Login: user=<support#dutyhosts.tk>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11108, secured, session=<daxCD7OtxNx/AAAB>
Aug 25 12:44:10 dutyhosts dovecot: imap(support#dutyhosts.tk): Logged out in=120 out=766
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: 941C0A5586: from=<dave#dutyhosts.tk>, size=542, nrcpt=1 (queue active)
Aug 25 12:44:12 dutyhosts postfix/trivial-rewrite[11099]: warning: do not list domain dutyhosts.tk in BOTH mydestination and virtual_mailbox_domains
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: 79F61A5585: from=<dave#dutyhosts.tk>, size=541, nrcpt=1 (queue active)
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: 1459AA5550: from=<dave#dutyhosts.tk>, size=539, nrcpt=1 (queue active)
Aug 25 12:44:12 dutyhosts postfix/smtp[11115]: fatal: valid hostname or network address required in server description: admin#dutyhosts.tk
Aug 25 12:44:12 dutyhosts postfix/smtp[11116]: fatal: valid hostname or network address required in server description: admin#dutyhosts.tk
Aug 25 12:44:12 dutyhosts postfix/smtp[11117]: fatal: valid hostname or network address required in server description: admin#dutyhosts.tk
Aug 25 12:44:12 dutyhosts postfix/smtp[11100]: A6C04A558D: to=<silv3r.sc0rpion#gmail.com>, relay=gmail-smtp-in.l.google.com[172.217.197.26]:25, delay=5.9, delays=0.26/0.04/0.32/5.3, dsn=5.7.26, status=bounced (host gmail-smtp-in.l.google.com[172.217.197.26] said: 550-5.7.26 This message does not have authentication information or fails to 550-5.7.26 pass authentication checks. To best protect our users from spam, the 550-5.7.26 message has been blocked. Please visit 550-5.7.26 https://support.google.com/mail/answer/81126#authentication for more 550 5.7.26 information. r1si9530921qvm.98 - gsmtp (in reply to end of DATA command))
Aug 25 12:44:12 dutyhosts postfix/cleanup[11095]: 7E798A558E: message-id=<20200825124412.7E798A558E#dutyhosts.tk>
Aug 25 12:44:12 dutyhosts postfix/bounce[11118]: A6C04A558D: sender non-delivery notification: 7E798A558E
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: 7E798A558E: from=<>, size=3210, nrcpt=1 (queue active)
Aug 25 12:44:12 dutyhosts postfix/trivial-rewrite[11099]: warning: do not list domain dutyhosts.tk in BOTH mydestination and virtual_mailbox_domains
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: A6C04A558D: removed
Aug 25 12:44:12 dutyhosts postfix/smtp[11100]: fatal: valid hostname or network address required in server description: admin#dutyhosts.tk
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: process /usr/lib/postfix/sbin/smtp pid 11115 exit status 1
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: /usr/lib/postfix/sbin/smtp: bad command startup -- throttling
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: private/smtp socket: malformed response
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: private/smtp socket: malformed response
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: private/smtp socket: malformed response
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: process /usr/lib/postfix/sbin/smtp pid 11116 exit status 1
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: process /usr/lib/postfix/sbin/smtp pid 11117 exit status 1
Aug 25 12:44:13 dutyhosts postfix/error[11121]: 941C0A5586: to=<dave#dutyhosts.tk>, relay=none, delay=938, delays=937/1.2/0/0.03, dsn=4.3.0, status=deferred (unknown mail transport error)
Aug 25 12:44:13 dutyhosts postfix/error[11122]: 79F61A5585: to=<dave#dutyhosts.tk>, relay=none, delay=999, delays=998/1.2/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: private/smtp socket: malformed response
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: process /usr/lib/postfix/sbin/smtp pid 11100 exit status 1
Aug 25 12:44:13 dutyhosts postfix/error[11121]: 1459AA5550: to=<dave#dutyhosts.tk>, relay=none, delay=571, delays=569/1.4/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Aug 25 12:44:13 dutyhosts postfix/error[11124]: 7E798A558E: to=<support#dutyhosts.tk>, relay=none, delay=1.1, delays=0.02/1.1/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Did you set your server up according to the Perfect Server tutorial?

Can't connect to mongo with nodeJs on raspberry Pi

with this code on nodeJS :
var MongoClient = require('mongodb').MongoClient;
...
MongoClient.connect('mongodb://127.0.0.1:27017', { useUnifiedTopology: true }, (error, db) => {
if (error) {
obs.error(this.throwExceptionError(error));
} else {
this.dbConnect = db.db(dbb);
obs.next(true);
}
});
i can connect to MongoDB on windows and it works well.
I try to execute this code on my raspberry Pi but the code didn't work.
I installed mongodb, launch :
service mongodb start
When i execute mongo in a console, it works and i see my dbs and my collections.
The log of the mongoDb are :
Sun Jun 28 13:43:51.566 [initandlisten]
Sun Jun 28 13:43:51.566 [initandlisten] db version v2.4.14
Sun Jun 28 13:43:51.566 [initandlisten] git version: nogitversion
Sun Jun 28 13:43:51.566 [initandlisten] build info: Linux bm-wb-03 3.19.0-trunk-armmp #1 SMP Debian 3.19.1-1~exp1+plugwash1 (2015-03-28) armv7l BOOST_LIB_VERSION=1_58
Sun Jun 28 13:43:51.566 [initandlisten] allocator: system
Sun Jun 28 13:43:51.566 [initandlisten] options: { bind_ip: "127.0.0.1", config: "/etc/mongodb.conf", dbpath: "/var/lib/mongodb", journal: "true", logappend: "true", logpath: "/var/log/mongodb/mongodb.log", port: 27017 }
Sun Jun 28 13:43:51.578 [initandlisten] journal dir=/var/lib/mongodb/journal
Sun Jun 28 13:43:51.578 [initandlisten] recover : no journal files present, no recovery needed
Sun Jun 28 13:43:51.606 [websvr] admin web console waiting for connections on port 28017
Sun Jun 28 13:43:51.606 [initandlisten] waiting for connections on port 27017
And the command "netstat -tulpn"
pi#raspberrypi:~ $ sudo netstat -tulpn
Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 3407/mongod
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 486/vncserver-x11-c
tcp 0 0 127.0.0.1:28017 0.0.0.0:* LISTEN 3407/mongod
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 495/sshd
So i think the server is running...
I don't understand why i can't connect to mongoDB on my raspberry pi.
help plz ^^

mongodb : SyncSourceFeedbackThread] SEVERE: Invalid access at address: 0xa8

last night out mongodb replset r1 was crashed ,then monit restart it.
this is process stats:
mongod 1390 1 0 Aug15 ? 00:39:29 /usr/bin/mongod -f /etc/mongod.conf
root 1967 1 8 Aug15 ? 18:53:29 /usr/bin/mongos -f /etc/mongod_route.conf
mongod 2127 1 0 Aug15 ? 00:56:07 /usr/bin/mongod -f /etc/mongod_r2.conf
mongod 2514 1 0 Aug15 ? 01:07:33 /usr/bin/mongod -f /etc/mongod_config.conf
mongod 2552 1 0 Aug15 ? 00:49:41 /usr/bin/mongod -f /etc/mongod_arbiter.conf
root 7722 21913 0 03:04 ? 00:00:00 [mongod_r1] <defunct>
mongod 7733 1 0 03:04 ? 00:05:06 /usr/bin/mongod -f /etc/mongod_r1.conf
root 13964 12745 0 11:52 pts/0 00:00:00 grep --color mongo
this is mongodb log:
2015-08-25T03:03:53.425+0800 [conn140823] authenticate db: local { authenticate: 1, nonce: "xxx", user: "__system", key: "xxx" }
2015-08-25T03:03:53.430+0800 [conn140823] replset couldn't find a slave with id 0, not tracking 53d71c612ea2da0bd4c469e6
2015-08-25T03:03:53.432+0800 [SyncSourceFeedbackThread] SEVERE: Invalid access at address: 0xa8
2015-08-25T03:03:53.565+0800 [SyncSourceFeedbackThread] SEVERE: Got signal: 11 (Segmentation fault).
Backtrace:0x11bd301 0x11bc6de 0x11bc7cf 0x33d060f710 0xeacaf6 0xeb19e8 0x1145332 0x1201c99 0x33d06079d1 0x36818e88fd
/usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0x11bd301]
/usr/bin/mongod() [0x11bc6de]
/usr/bin/mongod() [0x11bc7cf]
/lib64/libpthread.so.0() [0x33d060f710]
/usr/bin/mongod(_ZN5mongo18SyncSourceFeedback13replHandshakeEv+0xb86) [0xeacaf6]
/usr/bin/mongod(_ZN5mongo18SyncSourceFeedback3runEv+0x9b8) [0xeb19e8]
/usr/bin/mongod(_ZN5mongo13BackgroundJob7jobBodyEv+0xd2) [0x1145332]
/usr/bin/mongod() [0x1201c99]
/lib64/libpthread.so.0() [0x33d06079d1]
/lib64/libc.so.6(clone+0x6d) [0x36818e88fd]
2015-08-25T03:04:17.172+0800 ***** SERVER RESTARTED *****
2015-08-25T03:04:17.178+0800 [initandlisten] MongoDB starting : pid=7733 port=1201 dbpath=/data/mongo_r1 64-bit host=x2
2015-08-25T03:04:17.178+0800 [initandlisten] db version v2.6.0
2015-08-25T03:04:17.178+0800 [initandlisten] git version: 1c1c76aeca21c5983dc178920f5052c298db616c
2015-08-25T03:04:17.178+0800 [initandlisten] build info: Linux build14.nj1.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-08-25T03:04:17.178+0800 [initandlisten] allocator: tcmalloc
2015-08-25T03:04:17.178+0800 [initandlisten] options: { config: "/etc/mongod_r1.conf", net: { bindIp: "10.165.46.132", port: 1201 }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod_r1.pid" },
what happened?

Issue sending metrics with statsd

I was using the following instructions to install and configure StatsD on a Graphite server:
https://www.digitalocean.com/community/tutorials/how-to-configure-statsd-to-collect-arbitrary-stats-for-graphite-on-ubuntu-14-04
Now that I have a server with StatsD running, I do not see the metrics being logged under /var/log/statsd/statsd.log when I am testing sending them from the command line. Here is what I see:
29 Oct 02:30:39 - server is up
29 Oct 02:47:49 - reading config file: /etc/statsd/localConfig.js
29 Oct 02:47:49 - server is up
29 Oct 14:16:45 - reading config file: /etc/statsd/localConfig.js
29 Oct 14:16:45 - server is up
29 Oct 15:36:47 - reading config file: /etc/statsd/localConfig.js
29 Oct 15:36:47 - DEBUG: Loading server: ./servers/udp
29 Oct 15:36:47 - server is up
29 Oct 15:36:47 - DEBUG: Loading backend: ./backends/graphite
29 Oct 15:36:47 - DEBUG: numStats: 3
The log stays at the last entry of 'numStats: 3', even though I keep entering different metrics at the command line.
Here are a sample of the metrics I entered:
echo "sample.gauge:14|g" | nc -u -w0 127.0.0.1 8125
echo "sample.gauge:10|g" | nc -u -w0 127.0.0.1 8125
echo "sample.count:1|c" | nc -u -w0 127.0.0.1 8125
echo "sample.set:50|s" | nc -u -w0 127.0.0.1 8125
Of interest, I see this under /var/log/statsd/stderr.log:
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1039:14)
at listen (net.js:1061:10)
at Server.listen (net.js:1135:5)
at /usr/share/statsd/stats.js:383:16
at null.<anonymous> (/usr/share/statsd/lib/config.js:40:5)
at EventEmitter.emit (events.js:95:17)
at /usr/share/statsd/lib/config.js:20:12
at fs.js:268:14
at Object.oncomplete (fs.js:107:15)
Here is what my localConfig.js file looks like:
{
graphitePort: 2003
, graphiteHost: "localhost"
, port: 8125
, graphite: {
legacyNamespace: false
},
debug: true,
dumpMessages: true
}
Would anybody be able to shed some light as to where the problem lies?
Thanks!
There is a management interface available by default on port 8126: https://github.com/etsy/statsd/blob/master/docs/admin_interface.md
You likely have another service listening on that port in the same system.
Try this:
# localConfig.js
{
graphitePort: 2003
, graphiteHost: "localhost"
, port: 8125
, mgmt_port: 8127
, graphite: {
legacyNamespace: false
},
debug: true,
dumpMessages: true
}
See https://github.com/etsy/statsd/blob/master/exampleConfig.js#L28

Resources