Gammu cannot open device (DEVICEOPENERROR[2]) - gammu

I am using gammu-smsd 1.31.90, I made a udev rule for my USB 3g dongle but gammu-smsd can not connect to device. It says DEVICEOPENERROR[2].
How can I fix it?
udev-rule in /etc/udev/rules.d/10-rules.local
SUBSYSTEMS=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1001", SYMLINK+="phone", GROUP="dialout"
Gammu log:
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: Starting phone communication...
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Gammu 1.31.90 built 08:54:06 May 23 2012 using GCC 4.6]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Connection - "at"]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Connection index - 0]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Model type - ""]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Device - "/dev/phone"]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [Running on - Linux, kernel 3.4.103 (#4 SMP PREEMPT Thu Dec 18 12:55:58 CST 2014)]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: [System error - tcgetattr in serial_open, 25, "Inappropriate ioctl for device"]
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: gammu: Init:GSM_TryGetModel failed with error DEVICEOPENERROR[2]: Error opening device. Unknown, busy or no permissions.
Wed 2016/03/09 15:57:58 gammu-smsd[2466]: Can't open device: Error opening device. Unknown, busy or no permissions. (DEVICEOPENERROR[2])

You Have to config 2 files and edite 'port' and 'Connection' fields.
gammu-config
This config file is in '/home/$YOUR_USER_NAME/.gammurc'
and config this one too:
nano /etc/gammu-smsdrc
set your connection field to 'at' and port field to 'ttyUSBx' which appear your system.
Restart your gammu-smsd service, and if it's active it should work.
service gammu-smsd restart
service gammu-smsd status
● gammu-smsd.service - SMS daemon for Gammu
Loaded: loaded (/lib/systemd/system/gammu-smsd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2017-12-11 00:02:06 IRST; 10h ago
Docs: man:gammu-smsd(1)
Main PID: 650 (gammu-smsd)
Memory: 1.8M
CPU: 3min 8.684s
CGroup: /system.slice/gammu-smsd.service
└─650 /usr/bin/gammu-smsd --pid=/var/run/gammu-smsd.pid --daemon
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

Related

Macbook pro Manjaro bluetooth not working

I'm not sure if this is the write place to write my question, but here it is.
Before a week i updated my macbook pro early 2015 with manjaro gnom.
All good, but the bluetooth is not working.
I tried with bluetooth-manager but it's not opening and inside the journalctl -f it's showing
Oct 15 20:08:59 PPeev systemd[1095]: Started Application launched by gnome-shell.
Oct 15 20:09:00 PPeev blueman-manager.desktop[5014]: blueman-manager 20.09.00 ERROR Manager:118 on_dbus_name_appeared: Default adapter not found, trying first available.
Oct 15 20:09:00 PPeev blueman-manager.desktop[5014]: blueman-manager 20.09.00 ERROR Manager:122 on_dbus_name_appeared: No adapter(s) found, exiting
Oct 15 20:09:00 PPeev blueman-manager.desktop[5014]: blueman-manager version 2.1.3 starting
Oct 15 20:09:00 PPeev systemd[1095]: gnome-launched-blueman-manager.desktop-5014.scope: Succeeded.
Oct 15 20:09:04 PPeev systemd[1095]: gnome-terminal-server.service: Succeeded.
Also when i check the status systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2020-10-15 19:52:23 EEST; 19min ago
Docs: man:bluetoothd(8)
Main PID: 1083 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 9413)
Memory: 2.3M
CGroup: /system.slice/bluetooth.service
└─1083 /usr/lib/bluetooth/bluetoothd
Oct 15 19:52:23 PPeev bluetoothd[1083]: src/main.c:parse_controller_config() Key file does not have key “LEScanIntervalConnect” in group “Controller”
Oct 15 19:52:23 PPeev bluetoothd[1083]: src/main.c:parse_controller_config() Key file does not have key “LEScanWindowConnect” in group “Controller”
Oct 15 19:52:23 PPeev bluetoothd[1083]: src/main.c:parse_controller_config() Key file does not have key “LEMinConnectionInterval” in group “Controller”
Oct 15 19:52:23 PPeev bluetoothd[1083]: src/main.c:parse_controller_config() Key file does not have key “LEMaxConnectionInterval” in group “Controller”
Oct 15 19:52:23 PPeev bluetoothd[1083]: src/main.c:parse_controller_config() Key file does not have key “LEConnectionLatency” in group “Controller”
Oct 15 19:52:23 PPeev bluetoothd[1083]: src/main.c:parse_controller_config() Key file does not have key “LEConnectionSupervisionTimeout” in group “Controller”
Oct 15 19:52:23 PPeev bluetoothd[1083]: src/main.c:parse_controller_config() Key file does not have key “LEAutoconnecttimeout” in group “Controller”
Oct 15 19:52:23 PPeev systemd[1]: Started Bluetooth service.
Oct 15 19:52:23 PPeev bluetoothd[1083]: Starting SDP server
Oct 15 19:52:23 PPeev bluetoothd[1083]: Bluetooth management interface 1.17 initialized
Is running.
try disabling and re-enabling the bluetooth from the bios menu.
I checked some threads, and the only working option i got is this.
You may try this. I guess it will work for you too.

Manage Trackmania Server with systemd

Hi i just set up a trackmania server which works fine when starting via command line. Now i want to manage it with systemd, so it starts on boot and gets restartet if it crashes.
Here is my systemd service file:
[Unit]
Description=Trackmania 2020 Server
After=network.target
[Service]
User=trackmania
Group=trackmania
Restart=always
RestartSec=30
WorkingDirectory=/home/trackmania/server
ExecStart=/home/trackmania/server/TrackmaniaServer /title=Trackmania /game_Settings=Matchsettings/tracklist.txt /dedicated_cfg=dedicated_cfg.txt
[Install]
WantedBy=multi-user.target
When starting the service, the status command returns:
* trackmania_server.service - Trackmania 2020 Server
Loaded: loaded (/etc/systemd/system/trackmania_server.service; disabled; vendor preset: enabled)
Active: activating (auto-restart) since Thu 2020-07-09 21:08:31 UTC; 29s ago
Process: 1759 ExecStart=/home/trackmania/server/TrackmaniaServer /title=Trackmania /game_Settings=Matchsettings/tracklist.txt /dedicated_cfg=dedicated_cfg.txt (code=exited, status=0/SUCCESS)
Main PID: 1759 (code=exited, status=0/SUCCESS)
When stopping the service this is returned:
* trackmania_server.service - Trackmania 2020 Server
Loaded: loaded (/etc/systemd/system/trackmania_server.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Jul 09 21:11:03 vps-zap558747-2 systemd[1]: Started Trackmania 2020 Server.
Jul 09 21:11:03 vps-zap558747-2 TrackmaniaServer[1847]: Starting Trackmania Date=2020-07-07_23_30 Svn=105917 GameVersion=3.3.0...
Jul 09 21:11:03 vps-zap558747-2 TrackmaniaServer[1847]: ManiaPlanet server daemon started with pid=1848 (parent=1847).
Jul 09 21:11:03 vps-zap558747-2 TrackmaniaServer[1847]: Configuration file : dedicated_cfg.txt
Jul 09 21:11:03 vps-zap558747-2 TrackmaniaServer[1847]: Loading system configuration...
Jul 09 21:11:03 vps-zap558747-2 TrackmaniaServer[1847]: ...system configuration loaded
Jul 09 21:11:04 vps-zap558747-2 TrackmaniaServer[1847]: Loading cache...
Jul 09 21:11:04 vps-zap558747-2 TrackmaniaServer[1847]: ...OK
Jul 09 21:11:04 vps-zap558747-2 systemd[1]: trackmania_server.service: Succeeded.
Jul 09 21:11:04 vps-zap558747-2 systemd[1]: Stopped Trackmania 2020 Server.
To me it looks like the server is started when i stop the service and well then immediately terminated again. What am i doing wrong? o.O
Try using the /nodaemon switch on the server command line

Kibana failed to start

Elasticsearch working with no issues on http://localhost:9200
And Operating system is Ubuntu 18.04
Here is the error log for Kibana
root#syed-MS-7B17:/var/log# journalctl -fu kibana.service
-- Logs begin at Sat 2020-01-04 18:30:58 IST. --
Apr 03 20:22:49 syed-MS-7B17 kibana[7165]: {"type":"log","#timestamp":"2020-04-03T14:52:49Z","tags":["fatal","root"],"pid":7165,"message":"{ Error: listen EADDRNOTAVAIL: address not available 7.0.0.1:5601\n at Server.setupListenHandle [as _listen2] (net.js:1263:19)\n at listenInCluster (net.js:1328:12)\n at GetAddrInfoReqWrap.doListen (net.js:1461:7)\n at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:61:10)\n code: 'EADDRNOTAVAIL',\n errno: 'EADDRNOTAVAIL',\n syscall: 'listen',\n address: '7.0.0.1',\n port: 5601 }"}
Apr 03 20:22:49 syed-MS-7B17 kibana[7165]: FATAL Error: listen EADDRNOTAVAIL: address not available 7.0.0.1:5601
Apr 03 20:22:50 syed-MS-7B17 systemd[1]: kibana.service: Main process exited, code=exited, status=1/FAILURE
Apr 03 20:22:50 syed-MS-7B17 systemd[1]: kibana.service: Failed with result 'exit-code'.
Apr 03 20:22:53 syed-MS-7B17 systemd[1]: kibana.service: Service hold-off time over, scheduling restart.
Apr 03 20:22:53 syed-MS-7B17 systemd[1]: kibana.service: Scheduled restart job, restart counter is at 2.
Apr 03 20:22:53 syed-MS-7B17 systemd[1]: Stopped Kibana.
Apr 03 20:22:53 syed-MS-7B17 systemd[1]: kibana.service: Start request repeated too quickly.
Apr 03 20:22:53 syed-MS-7B17 systemd[1]: kibana.service: Failed with result 'exit-code'.
Apr 03 20:22:53 syed-MS-7B17 systemd[1]: Failed to start Kibana.
I have resolved it myself after checking the /etc/hosts file
It was edited by mistake like below
7.0.0.1 localhost

What's the safest way to shut down MongoDB when running as a Windows Service?

I have a single instance of MongoDB 2.4.8 running on Windows Server 2012 R2. MongoDB is installed as a Windows Service. I have journalling enabled.
The MongoDB documentation suggests that the MongoDB service should just be shut down via the Windows Service Control Manager:
net stop MongoDB
When I did this recently, the following was logged and I ended up with a non-zero byte mongod.lock file on disk. (I used the --repair option to fix this but it turns out this probably wasn't necessary as I had journalling enabled.)
Thu Nov 21 11:08:12.011 [serviceShutdown] got SERVICE_CONTROL_STOP request from Windows Service Control Manager, will terminate after current cmd ends
Thu Nov 21 11:08:12.043 [serviceShutdown] now exiting
Thu Nov 21 11:08:12.043 dbexit:
Thu Nov 21 11:08:12.043 [serviceShutdown] shutdown: going to close listening sockets...
Thu Nov 21 11:08:12.043 [serviceShutdown] closing listening socket: 1492
Thu Nov 21 11:08:12.043 [serviceShutdown] closing listening socket: 1500
Thu Nov 21 11:08:12.043 [serviceShutdown] shutdown: going to flush diaglog...
Thu Nov 21 11:08:12.043 [serviceShutdown] shutdown: going to close sockets...
Thu Nov 21 11:08:12.043 [serviceShutdown] shutdown: waiting for fs preallocator...
Thu Nov 21 11:08:12.043 [serviceShutdown] shutdown: lock for final commit...
Thu Nov 21 11:08:12.043 [serviceShutdown] shutdown: final commit...
Thu Nov 21 11:08:12.043 [conn1333] end connection 127.0.0.1:51612 (18 connections now open)
Thu Nov 21 11:08:12.043 [conn1331] end connection 127.0.0.1:51610 (18 connections now open)
...snip...
Thu Nov 21 11:08:12.043 [conn1322] end connection 10.1.2.212:53303 (17 connections now open)
Thu Nov 21 11:08:12.043 [conn1337] end connection 127.0.0.1:51620 (18 connections now open)
Thu Nov 21 11:08:12.839 [serviceShutdown] shutdown: closing all files...
Thu Nov 21 11:08:14.683 [serviceShutdown] Progress: 5/163 3% (File Closing Progress)
Thu Nov 21 11:08:16.012 [serviceShutdown] Progress: 6/163 3% (File Closing Progress)
...snip...
Thu Nov 21 11:08:52.030 [serviceShutdown] Progress: 143/163 87% (File Closing Progress)
Thu Nov 21 11:08:54.092 [serviceShutdown] Progress: 153/163 93% (File Closing Progress)
Thu Nov 21 11:08:55.405 [serviceShutdown] closeAllFiles() finished
Thu Nov 21 11:08:55.405 [serviceShutdown] journalCleanup...
Thu Nov 21 11:08:55.405 [serviceShutdown] removeJournalFiles
Thu Nov 21 11:09:05.578 [DataFileSync] ERROR: Client::shutdown not called: DataFileSync
The last line is my main concern.
I'm also interested in how MongoDB is able to take longer to shut down than Windows normally allows for service shutdown? At what point is it safe to shut down the machine without checking the log file?

Remove MongoDB from auto starting on login

I installed MongoDB through home brew on osx lion but for some reason, it keeps starting up automatically when I login.
>:mongod
Mon Aug 12 20:35:31.270 [initandlisten] MongoDB starting : pid=52473 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=Mah-iMac.local
Mon Aug 12 20:35:31.270 [initandlisten] db version v2.4.5
Mon Aug 12 20:35:31.270 [initandlisten] git version: a2ddc68ba7c9cee17bfe69ed840383ec3506602b
Mon Aug 12 20:35:31.270 [initandlisten] build info: Darwin bs-osx-106-x86-64-2.10gen.cc 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
Mon Aug 12 20:35:31.271 [initandlisten] allocator: system
Mon Aug 12 20:35:31.271 [initandlisten] options: { bind_ip: "127.0.0.1", config: "/usr/local/etc/mongod.conf", dbpath: "/usr/local/var/mongodb" }
Mon Aug 12 20:35:31.272 [initandlisten] journal dir=/usr/local/var/mongodb/journal
Mon Aug 12 20:35:31.272 [initandlisten] recover : no journal files present, no recovery needed
Mon Aug 12 20:35:31.328 [initandlisten] ERROR: listen(): bind() failed errno:48 Address already in use for socket: 127.0.0.1:27017
Mon Aug 12 20:35:31.328 [initandlisten] ERROR: addr already in use
Mon Aug 12 20:35:31.328 [websvr] ERROR: listen(): bind() failed errno:48 Address already in use for socket: 127.0.0.1:28017
Mon Aug 12 20:35:31.328 [initandlisten] now exiting
Mon Aug 12 20:35:31.328 dbexit: Mon Aug 12 20:35:31.328 [websvr] ERROR: addr already in use
Mon Aug 12 20:35:31.328 [initandlisten] shutdown: going to close listening sockets...
Mon Aug 12 20:35:31.328 [initandlisten] shutdown: going to flush diaglog...
Mon Aug 12 20:35:31.328 [initandlisten] shutdown: going to close sockets...
Mon Aug 12 20:35:31.328 [initandlisten] shutdown: waiting for fs preallocator...
Mon Aug 12 20:35:31.328 [initandlisten] shutdown: lock for final commit...
Mon Aug 12 20:35:31.328 [initandlisten] shutdown: final commit...
Mon Aug 12 20:35:31.335 [initandlisten] shutdown: closing all files...
Mon Aug 12 20:35:31.337 [initandlisten] closeAllFiles() finished
Mon Aug 12 20:35:31.338 [initandlisten] journalCleanup...
Mon Aug 12 20:35:31.338 [initandlisten] removeJournalFiles
Mon Aug 12 20:35:31.338 [initandlisten] shutdown: removing fs lock...
Mon Aug 12 20:35:31.338 dbexit: really exiting now
How can I remove this from starting up automatically? I don't really use mongo a lot so its kinda not needed and when I do need to use it, it's kinda annoying to get an error when I try to fire it up :/
It should be either:
launchctl unload -w ~/Library/LaunchAgents/org.mongodb.mongod.plist
or
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

Resources