View Issue Details

IDProjectCategoryView StatusLast Update
0001119SkyChart1-Softwarepublic13-05-06 14:32
Reporteraruangra Assigned ToPatrick Chevalley  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformArm Linux MK808OSUbuntu 12.10 ARMHF 
Product Version3.7 SVN 
Target Version3.8Fixed in Version3.7 SVN 
Summary0001119: No output from some server commands in Daemon mode.
DescriptionI tried some server commands (getra s, getfov f, getdec f, in the daemon mode. There is no output. I got output only from "getra f". I also attach the sky map where I tested the commands.

I prefer printing out the output to a log file. Would it be possible to add this log file?


root@rk3066dev:/home/pi/www/skychart# perl test.pl
Name "main::path" used only once: possible typo at test.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETRA F
OK! 6.16235
Command success
root@rk3066dev:/home/pi/www/skychart# sudo nano test.pl
root@rk3066dev:/home/pi/www/skychart# perl test.pl
Name "main::path" used only once: possible typo at test.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETRA S
Command success
root@rk3066dev:/home/pi/www/skychart# sudo nano test.pl
root@rk3066dev:/home/pi/www/skychart# perl test.pl
Name "main::path" used only once: possible typo at test.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETRA F
OK! 6.16235
Command success
root@rk3066dev:/home/pi/www/skychart# sudo nano test.pl
root@rk3066dev:/home/pi/www/skychart# perl test.pl
Name "main::path" used only once: possible typo at test.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETDEC F
Command success
root@rk3066dev:/home/pi/www/skychart# sudo nano test.pl
root@rk3066dev:/home/pi/www/skychart# perl test.pl
Name "main::path" used only once: possible typo at test.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETDEC S
Command success
root@rk3066dev:/home/pi/www/skychart#

TagsNo tags attached.
Attached Files
skychart.png (118,725 bytes)   
skychart.png (118,725 bytes)   

Activities

aruangra

13-01-21 03:11

reporter   ~0002416

Last edited: 13-01-21 04:46

It seems to work now after rebooting.

root@rk3066dev:/home/pi/www/skychart# perl test.pl
Name "main::path" used only once: possible typo at test.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETRA F
OK! 10.80253
Command success
root@rk3066dev:/home/pi/www/skychart# sudo nano test.pl
root@rk3066dev:/home/pi/www/skychart# perl test.pl
Name "main::path" used only once: possible typo at test.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETRA S
OK! 10h48m09s
Command success
root@rk3066dev:/home/pi/www/skychart# sudo nano test.pl
root@rk3066dev:/home/pi/www/skychart# perl test.pl
Name "main::path" used only once: possible typo at test.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETDEC F
OK! 12.16680
Command success
root@rk3066dev:/home/pi/www/skychart# sudo nano test.pl
root@rk3066dev:/home/pi/www/skychart# perl test.pl
Name "main::path" used only once: possible typo at test.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETDEC S
OK! +12d10m00s
Command success
root@rk3066dev:/home/pi/www/skychart#

EDIT: It works ok if I start the program from a web browser (user: www-data). The database is generated at /var/www/.skychart. But my default directory for web pages is /home/pi/www/

aruangra

13-01-21 04:32

reporter   ~0002417

Last edited: 13-01-21 04:44

Sorry. The problem still persists. It happens when I start "sudo DISPLAY=:1 skychart --unique --daemon &" in /etc/rc.local. There is no output shown. I am quite sure it is about permission issues. In this case, the database is generated at /root/.skychart


root@rk3066dev:/home/pi/www/skychart# perl getra.pl
Name "main::path" used only once: possible typo at getra.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETRA S
Command success
root@rk3066dev:/home/pi/www/skychart# sudo perl getra.pl
Name "main::path" used only once: possible typo at getra.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETRA S
Command success
root@rk3066dev:/home/pi/www/skychart# sudo perl getdec.pl
Name "main::path" used only once: possible typo at getdec.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETDEC S
Command success
root@rk3066dev:/home/pi/www/skychart#

Patrick Chevalley

13-01-21 08:54

administrator   ~0002418

This may be a permission problem that prevent the program to fully initialize.

It is a bad idea to start the program with "sudo skychart" because it still run in your home directory and create files you not have access afterward. Please check in all your .skychart subdirectories there is no file owned by root.
Try the following command from the pi user to see how sudo use your environment:
sudo env |grep HOME
sudo -i env |grep HOME

But this is also a bad idea to run the program as root. I suggest you replace your rc.local with:
su - pi -c "DISPLAY=:1 skychart --unique --daemon > /tmp/skychart.log 2>&1 &"

This way it run with the right user and you can also look at the deamon output in the log file. You can add the --verbose option if you want more detail in the log file.

Another way to run the program at startup if you already start a vncserver for the pi user is to add the skychart command in the file /home/pi/.vnc/xstartup
In this case it always run with the right user.

aruangra

13-01-21 14:21

reporter   ~0002419

Thanks for the comments about permission.

It is a problem in tcpclient.pl. I added on more line at the end of "sub sendcmd"

print STDOUT "$line\n";


And I get the output from the server:

root@rk3066dev:/home/pi/www/skychart# perl test.pl
Name "main::path" used only once: possible typo at test.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETFOV S
OK! +01d22m50s
Command success
OK! +01d22m50s

root@rk3066dev:/home/pi/www/skychart# nano test.pl
root@rk3066dev:/home/pi/www/skychart# perl test.pl
Name "main::path" used only once: possible typo at test.pl line 12.
[Connected to 127.0.0.1:3292]
OK! id=1 chart=Chart_1
 We are connected as client 1 , the active chart is Chart_1
 Send CMD : GETRA S
Command success
OK! 05h35m59s

Patrick Chevalley

13-01-22 08:24

administrator   ~0002420

You are right, the problem is because the response message is not prefixed by the client id in this case.
This is the proper fix:
http://sourceforge.net/p/skychart/code/2394/

Issue History

Date Modified Username Field Change
13-01-21 02:53 aruangra New Issue
13-01-21 02:53 aruangra File Added: skychart.png
13-01-21 03:11 aruangra Note Added: 0002416
13-01-21 04:32 aruangra Note Added: 0002417
13-01-21 04:33 aruangra Note Edited: 0002416
13-01-21 04:44 aruangra Note Edited: 0002417
13-01-21 04:46 aruangra Note Edited: 0002416
13-01-21 08:54 Patrick Chevalley Note Added: 0002418
13-01-21 08:54 Patrick Chevalley Assigned To => Patrick Chevalley
13-01-21 08:54 Patrick Chevalley Status new => feedback
13-01-21 14:21 aruangra Note Added: 0002419
13-01-21 14:21 aruangra Status feedback => assigned
13-01-22 08:24 Patrick Chevalley Note Added: 0002420
13-01-22 08:24 Patrick Chevalley Status assigned => resolved
13-01-22 08:24 Patrick Chevalley Resolution open => fixed
13-01-22 08:24 Patrick Chevalley Fixed in Version 0.3.0 => 3.7 SVN
13-01-22 08:24 Patrick Chevalley Target Version 0.3.0 => 3.8
13-05-06 14:32 Patrick Chevalley Status resolved => closed