123solar.service

Talks about solar stuff
Post Reply
elettron
Posts: 11
Joined: Sat Apr 12, 2014 9:30 am

123solar.service

Post by elettron » Sat Apr 12, 2014 9:47 am

Hi , my 123solar don't start automatically but i've to lounch manually everytime the service is enable but fail.
This is the output:
Jan 01 00:00:11 alarmpi curl[179]: % Total % Received % Xferd Average Speed Time Time Time Current
Jan 01 00:00:11 alarmpi curl[179]: Dload Upload Total Spent Left Speed
Jan 01 00:00:11 alarmpi curl[179]: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0c...efused
Jan 01 00:00:11 alarmpi systemd[1]: 123solar.service: main process exited, code=exited, status=7/NOTRUNNING
Jan 01 00:00:11 alarmpi systemd[1]: Failed to start 123Solar.
Jan 01 00:00:11 alarmpi systemd[1]: Unit 123solar.service entered failed state.

jeanmarc
Posts: 2023
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar.service

Post by jeanmarc » Sat Apr 12, 2014 10:26 am

Which version do you use ? What "systemctl status 123solar -l" return ?

elettron
Posts: 11
Joined: Sat Apr 12, 2014 9:30 am

Re: 123solar.service

Post by elettron » Sat Apr 12, 2014 11:00 am

This is manual start after boot: (sysctl start 123solar.service)

Last login: Sat Apr 12 08:45:27 2014 from 192.168.1.38
[root@alarmpi ~]# systemctl status 123solar -l
* 123solar.service - 123Solar
Loaded: loaded (/etc/systemd/system/123solar.service; enabled)
Active: inactive (dead) since Sat 2014-04-12 08:51:00 UTC; 1h 8min ago
Process: 216 ExecStart=/usr/bin/curl http://127.0.0.1/123solar/scripts/boot123 s.php (code=exited, status=0/SUCCESS)
Main PID: 216 (code=exited, status=0/SUCCESS)

Apr 12 08:51:00 alarmpi curl[216]: % Total % Received % Xferd Average Speed Time Time Time Current
Apr 12 08:51:00 alarmpi curl[216]: Dload Upload Total Spent Left Speed
Apr 12 08:51:00 alarmpi curl[216]: [234B blob data]
Apr 12 08:51:00 alarmpi systemd[1]: Started 123Solar.
Last edited by elettron on Sat Apr 12, 2014 11:06 am, edited 1 time in total.

elettron
Posts: 11
Joined: Sat Apr 12, 2014 9:30 am

Re: 123solar.service

Post by elettron » Sat Apr 12, 2014 11:05 am

This is automatically start:


[root@alarmpi ~]# systemctl status 123solar -l
* 123solar.service - 123Solar
Loaded: loaded (/etc/systemd/system/123solar.service; enabled)
Active: failed (Result: exit-code) since Thu 1970-01-01 00:00:11 UTC; 44 years 3 months ago
Process: 179 ExecStart=/usr/bin/curl http://127.0.0.1/123solar/scripts/boot123s.php (code=exited, status=7)
Main PID: 179 (code=exited, status=7)

Jan 01 00:00:11 alarmpi curl[179]: % Total % Received % Xferd Average Speed Time Time Time Current
Jan 01 00:00:11 alarmpi curl[179]: Dload Upload Total Spent Left Speed
Jan 01 00:00:11 alarmpi curl[179]: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to 127.0.0.1 port 80: Connection refused
Jan 01 00:00:11 alarmpi systemd[1]: 123solar.service: main process exited, code=exited, status=7/NOTRUNNING
Jan 01 00:00:11 alarmpi systemd[1]: Failed to start 123Solar.
Jan 01 00:00:11 alarmpi systemd[1]: Unit 123solar.service entered failed state.

jeanmarc
Posts: 2023
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar.service

Post by jeanmarc » Sat Apr 12, 2014 11:15 am

Ok but which version of 123s do you use ?
Is the path correct http://logger/123solar/ ?

elettron
Posts: 11
Joined: Sat Apr 12, 2014 9:30 am

Re: 123solar.service

Post by elettron » Sat Apr 12, 2014 12:31 pm

i'm using 123solar 1.6.5.2
the path is correct 123solar work fine only the service fail to start ,it seems that it starts before the network services

jeanmarc
Posts: 2023
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar.service

Post by jeanmarc » Sat Apr 12, 2014 1:11 pm

And typing on a terminal "/usr/bin/curl http://127.0.0.1/123solar/scripts/boot123s.php" work ?

elettron
Posts: 11
Joined: Sat Apr 12, 2014 9:30 am

Re: 123solar.service

Post by elettron » Sat Apr 12, 2014 1:22 pm

Yes i don't get any error

jeanmarc
Posts: 2023
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar.service

Post by jeanmarc » Sat Apr 12, 2014 4:15 pm

Odd, it work from your terminal but not at startup :?
The problem is Failed to connect to 127.0.0.1 port 80: Connection refused, maybe the interface is not yet up and running even though i put "After=network.target".
Maybe change to /usr/bin/curl http://localhost/123solar/scripts/boot123s.php. Don't forget to systemctl disable 123solar / enable in order to update the .service file.

elettron
Posts: 11
Joined: Sat Apr 12, 2014 9:30 am

Re: 123solar.service

Post by elettron » Sat Apr 12, 2014 5:18 pm

mmm..... maybe i've understund but i've not the solution :

the multi.user.target delays the start of a couple of minutes then 123solar.service fails to start automatically.
[root@alarmpi ~]# systemctl list-units --type=target
UNIT LOAD ACTIVE SUB JOB DESCRIPTION
basic.target loaded active active Basic System
cryptsetup.target loaded active active Encrypted Volumes
getty.target loaded active active Login Prompts
local-fs-pre.target loaded active active Local File Systems (Pre)
local-fs.target loaded active active Local File Systems
multi-user.target loaded inactive dead start Multi-User System
network.target loaded active active Network
paths.target loaded active active Paths
remote-fs.target loaded active active Remote File Systems
slices.target loaded active active Slices
sockets.target loaded active active Sockets
sound.target loaded active active Sound Card
swap.target loaded active active Swap
sysinit.target loaded active active System Initialization
timers.target loaded active active Timers

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests