Closed GoogleCodeExporter closed 9 years ago
Ok, some questions:
- I guess in rc.local remuco-mpd gets started as root. Do you also use root when
log in and then start remuco-mpd?
- What does the log say (~/.cache/remuco/mpd/log) when you start remuco-mpd in
rc.local? Are there any warnings or errors?
- When you start remuco-mpd in rc.local and then log in and run `sdptool browse
local`, do you see the Remuco MPD service in the output (Service Name: MPD) ?
Original comment by obensonne@googlemail.com
on 12 Nov 2009 at 7:41
1. I tried both root and regular user
2 & 3. See log made exactly after boot:
remuco is running
log is empty (I've cleared file before reboot)
no BT service
[root@linuxhost mpd]# cd ~/.cache/remuco/mpd/
[root@linuxhost mpd]# ps -A | grep "remuco"
1080 ? 00:00:02 remuco-mpd
[root@linuxhost mpd]# cat log
[root@linuxhost mpd]# sdptool browse > sdp
[root@linuxhost mpd]# cat sdp | grep "Service Name"
Service Name: AVRCP Target
Service Name: OBEX Object Push
Service Name: Imaging
Service Name: SyncMLClient
Service Name: OBEX File Transfer
Service Name: Nokia OBEX PC Suite Services
Service Name: Nokia SyncML Server
Service Name: Hands-Free Audio Gateway
Service Name: Headset Audio Gateway
Service Name: Dial-Up Networking
Service Name: COM7
Service Name: Audio Source
Service Name: Audio Sink
Service Name: Voice gateway
Service Name: Voice gateway
Service Name: File Transfer Service
Service Name: Object Push Service
Service Name: Imaging
[root@linuxhost mpd]#
Original comment by yaroslav.khomyak@gmail.com
on 12 Nov 2009 at 8:26
Empty log, that's strange (it's not empty if you run remuco-mpd as root when
logged
in, right?). To work around this for now and to get some log output, please
update
your rc.local to start remuco-mpd as follows:
remuco-mpd --remuco-log-stdout > /tmp/remuco.log 2>&1 &
Do you see some log output now (in /tmp/remuco.log) ?
Original comment by obensonne@googlemail.com
on 12 Nov 2009 at 9:25
Now it works! Bluetooth connected successfully!
What means "2>&1" in start command?
Log:
[root@linuxhost ~]# cat /tmp/remuco.log
2009-11-14 02:58:34,080 [ INFO] [ config.py 137] remuco version: 0.9.2
2009-11-14 02:58:34,087 [ INFO] [ config.py 576] system shutdown command (/.
config/remuco/shutdown-system) does not exist
2009-11-14 02:58:34,090 [WARNING] [ files.py 108] file system encoding is not
UTF-8, this may cause problems with file browser features
2009-11-14 02:58:34,092 [ INFO] [ files.py 135] file browser root dirs: {''
: '/'}
2009-11-14 02:58:34,136 [ INFO] [ manager.py 56] start player adapter
2009-11-14 02:58:34,145 [ INFO] [ net.py 406] created bluetooth server
2009-11-14 02:58:34,151 [ INFO] [ net.py 406] created wifi server
2009-11-14 02:58:34,273 [ INFO] [ remuco-mpd 125] MPD version: 0.15.0
2009-11-14 02:58:34,275 [ INFO] [ manager.py 66] player adapter started
2009-11-14 02:58:34,277 [ INFO] [ manager.py 227] start main loop
Original comment by yaroslav.khomyak@gmail.com
on 13 Nov 2009 at 11:14
I think this should be added to MPD Wiki
Original comment by yaroslav.khomyak@gmail.com
on 13 Nov 2009 at 11:15
2>&1 redirects error out (2) to standard out (1), which is /tmp/remuco.log in
this case.
Anyway, I'm surprised it works now. Actually I just recommended this start-up
line to
be sure to get some log output.
When starting with "remuco-mpd &" in rc.local, I guess remuco-mpd hangs/blocks
while
trying to write to the default log file (/root/.cache/remuco/mpd/log).
> I think this should be added to MPD Wiki
Just do it :)
But before declaring it as a "must do" you should ask other ArchLinux/MPD/Remuco
users there if they experienced the same issue. I think I'll add a note to the
FAQ
section on the Remuco site.
Original comment by obensonne@googlemail.com
on 13 Nov 2009 at 11:56
I guess that remuco requires console to output. When started from rc.local,
console
is not available, and it stucks.
Original comment by yaroslav.khomyak@gmail.com
on 14 Nov 2009 at 12:48
Hm, don't think so, but if you're right, remuco-mpd should also work in
rc.local when
started it without the log option:
remuco-mpd > /tmp/remuco.log 2>&1 &
Now regular logging output goes into /root/.cache/remuco/mpd/log while the few
lines
of standard out go into /tmp/remuco.log.
Original comment by obensonne@googlemail.com
on 16 Nov 2009 at 9:16
Hmm... now logs are not written, but remuco is available via bluetooth.
Seems that both of us are right :)))
Original comment by yaroslav.khomyak@gmail.com
on 17 Nov 2009 at 7:55
That's interesting.
Does it mean scripts started as services have no attached stdout? It kind of
makes
sense if those processes are executed by /bin/init directly.
Original comment by igor.con...@gmail.com
on 18 Nov 2009 at 5:40
I don't know very much about start script systems like init V or the more recent
upstart. Below is a small Python script to test what works in rc.local and what
not.
You could experiment with it by commenting out some parts and by starting it in
rc.local directly and/or with '... > /some/where 2&1'.
#!/usr/bin/python
# write to a file in root's home:
fp = open("/root/log.tmp", 'w')
fp.write("hello log\n")
fp.close()
# write to standard out by dev:
fp = open("/dev/stdout", 'w')
fp.write("hello dev-stdout\n")
fp.close()
# write to standard out with print:
print("hello stdout")
Original comment by obensonne@googlemail.com
on 18 Nov 2009 at 8:40
Original comment by obensonne@googlemail.com
on 22 Nov 2009 at 11:18
Looks done ..
Original comment by obensonne@googlemail.com
on 2 Dec 2009 at 8:51
I had the same issue with remuco-amarok. Redirecting stderr output to stdout
makes it
work. I used /etc/init.d/skeleton from Kubuntu for this and got exit status 0,
but
the daemon wasn't running. Setting DAEMON_ARGS="2>&" resolved the problem. I
also
added -u mylogin in the do_start() function trying to resolve it and it's
probably a
good idea anyway. No log is available, ~/.cache/remuco/amarok/log contains
information only from previous manual runs.
Original comment by adrian.d...@gmail.com
on 6 Dec 2009 at 6:04
Original comment by obensonne@googlemail.com
on 4 Jun 2010 at 6:31
Original issue reported on code.google.com by
yaroslav.khomyak@gmail.com
on 12 Nov 2009 at 9:17