Re: [ubuntu-uk] Strange problem with Firefox in 15.04 and later ...

2016-02-27 Thread Barry Drake




On 27/02/16 16:15, Robert McWilliam wrote:

I'd look at what other functions are in the systemd.sh script, search
the other scripts for places they're called and make sure the logic
around that will pick the systemd option. Robert


Hi Robert    I thought the easiest thing would be to attach all the
relevant scripts.  The command that starts the setup process is:
"/opt/symform/SymformNode.sh configure"  Thanks for your offer of help.
I'm feeling out of my comfort zone by a long, long way.  As I mentioned,
the current systemd option does not work.

Regards,Barry.

--
http://barrydrake.co.nr/






scripts.tar.gz
Description: application/gzip
-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Strange problem with Firefox in 15.04 and later ...

2016-02-27 Thread Simon Greenwood
As Robert says, the installation process has failed as it assumed that
initctl was there and probably created an upstart service but as initctl
isn't available it won't work, so it's probably a case of converting the
upstart service to systemctl, which I'm sure is possible but I don't know
how off the top of my head.


On 27 February 2016 at 16:15, Robert McWilliam  wrote:

> On Sat, Feb 27, 2016, at 15:53, Barry Drake wrote:
> > Hi Simon   The 'start' command in the systemd.sh script is:
> > start_service()
> > {
> >  systemctl start symform${1}.service
> > }
> >
> > systemctl is very different in its operation.  The 'start' command won't
> > listen to a port.  There doesn't seem to be a way to set up listening to
> > port 59234 using that command.  Using it the way the systemd script
> > tries to, produces the error "Failed to start symformconfigure.service:
> > Unit symformconfigure.service failed to load: No such file or directory".
> >
> > I imagine the guy who wrote the script assumed the command was a direct
> > replacement for initctl.  It obviously is not.  I've saved the man page
> > as a text file, and read through it carefully.  There doesn't seem to be
> > a command that performs the action I need.  So far, I haven't found
> > anything that will do what initctl used to do. The initctl command was
> > used to make the port open the register page of the symform web site,
> > and return the information in the form of a log.  I've been trying to
> > find something that acts in the same way, but so far, no luck.
> >
>
> systemctl and initctl are ways of managing daemons/services/whatever you
> want to call them under the different init systems (I think systemd and
> upstart respectively). Those commands would only start a service if it
> was already set up and it looks like the set up isn't happening for the
> systemd version that you were then trying to start. I suspect there is a
> similar if-elif-else block earlier in the process that will set up the
> services that are going to be used later and it's similarly matching
> upstart rather than systemd so putting in configuration that would work
> with upstart (if that had been what your system were using).
>
> I'd look at what other functions are in the systemd.sh script, search
> the other scripts for places they're called and make sure the logic
> around that will pick the systemd option.
>
> Robert
> --
> Robert McWilliam  r...@allmail.netwww.ormiret.com
>
> Cleverly disguised as a responsible adult.
>
>
> --
> ubuntu-uk@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
> https://wiki.ubuntu.com/UKTeam/
>



-- 
Twitter: @sfgreenwood
"TBA are particularly glib"
-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Strange problem with Firefox in 15.04 and later ...

2016-02-27 Thread Robert McWilliam
On Sat, Feb 27, 2016, at 15:53, Barry Drake wrote:
> Hi Simon   The 'start' command in the systemd.sh script is:
> start_service()
> {
>  systemctl start symform${1}.service
> }
> 
> systemctl is very different in its operation.  The 'start' command won't 
> listen to a port.  There doesn't seem to be a way to set up listening to 
> port 59234 using that command.  Using it the way the systemd script 
> tries to, produces the error "Failed to start symformconfigure.service: 
> Unit symformconfigure.service failed to load: No such file or directory".
> 
> I imagine the guy who wrote the script assumed the command was a direct 
> replacement for initctl.  It obviously is not.  I've saved the man page 
> as a text file, and read through it carefully.  There doesn't seem to be 
> a command that performs the action I need.  So far, I haven't found 
> anything that will do what initctl used to do. The initctl command was 
> used to make the port open the register page of the symform web site, 
> and return the information in the form of a log.  I've been trying to 
> find something that acts in the same way, but so far, no luck.
> 

systemctl and initctl are ways of managing daemons/services/whatever you
want to call them under the different init systems (I think systemd and
upstart respectively). Those commands would only start a service if it
was already set up and it looks like the set up isn't happening for the
systemd version that you were then trying to start. I suspect there is a
similar if-elif-else block earlier in the process that will set up the
services that are going to be used later and it's similarly matching
upstart rather than systemd so putting in configuration that would work
with upstart (if that had been what your system were using). 

I'd look at what other functions are in the systemd.sh script, search
the other scripts for places they're called and make sure the logic
around that will pick the systemd option.  

Robert
-- 
Robert McWilliam  r...@allmail.netwww.ormiret.com

Cleverly disguised as a responsible adult.


-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Strange problem with Firefox in 15.04 and later ...

2016-02-27 Thread Barry Drake

On 26/02/16 20:27, Simon Greenwood wrote:
That's the answer - there should be. There will be something in the 
scripts that activates it. If you don't know, 127.0.0.1 is localhost, 
your own computer, so it will always ping but it's unlikely that you 
have anything running on it in normal use so it won't respond to a 
HTTP request in a web browser.

Hi Simon   The 'start' command in the systemd.sh script is:
start_service()
{
systemctl start symform${1}.service
}

systemctl is very different in its operation.  The 'start' command won't 
listen to a port.  There doesn't seem to be a way to set up listening to 
port 59234 using that command.  Using it the way the systemd script 
tries to, produces the error "Failed to start symformconfigure.service: 
Unit symformconfigure.service failed to load: No such file or directory".


I imagine the guy who wrote the script assumed the command was a direct 
replacement for initctl.  It obviously is not.  I've saved the man page 
as a text file, and read through it carefully.  There doesn't seem to be 
a command that performs the action I need.  So far, I haven't found 
anything that will do what initctl used to do. The initctl command was 
used to make the port open the register page of the symform web site, 
and return the information in the form of a log.  I've been trying to 
find something that acts in the same way, but so far, no luck.


Regards,Barry.

--
http://barrydrake.co.nr/


--
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Strange problem with Firefox in 15.04 and later ...

2016-02-27 Thread Simon Greenwood
As it says, initctl is part of upstart, which has been deprecated for
systemd. However, the components are still there so the script's criteria
are met apart from initctl not being installed. You could comment out the
first if statement in the platform script and replace the 'elif' at the
start of the second statement with 'if', which should fire the
application's systemd script, and maybe pass that back to the devs.

On 27 February 2016 at 11:57, Barry Drake 
wrote:

> On 26/02/16 20:27, Simon Greenwood wrote:
>
>> That's the answer - there should be. There will be something in the
>> scripts that activates it. If you don't know, 127.0.0.1 is localhost, your
>> own computer, so it will always ping but it's unlikely that you have
>> anything running on it in normal use so it won't respond to a HTTP request
>> in a web browser.
>>
> Hi Simon   Having found the page describing the use of the initctl
> command, I can't find a package or anything else, such as the code.  I
> gather it used to be included with upstart, and that has changed.  There
> must be a workaround using another command, but so far, I'm no finding
> anything.
>
> Regards,Barry.
>
>
> --
> http://barrydrake.co.nr/
>
>
> --
> ubuntu-uk@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
> https://wiki.ubuntu.com/UKTeam/
>



-- 
Twitter: @sfgreenwood
"TBA are particularly glib"
-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Strange problem with Firefox in 15.04 and later ...

2016-02-27 Thread Barry Drake

On 26/02/16 20:27, Simon Greenwood wrote:
That's the answer - there should be. There will be something in the 
scripts that activates it. If you don't know, 127.0.0.1 is localhost, 
your own computer, so it will always ping but it's unlikely that you 
have anything running on it in normal use so it won't respond to a 
HTTP request in a web browser.
Hi Simon   Having found the page describing the use of the initctl 
command, I can't find a package or anything else, such as the code.  I 
gather it used to be included with upstart, and that has changed.  There 
must be a workaround using another command, but so far, I'm no finding 
anything.


Regards,Barry.

--
http://barrydrake.co.nr/


--
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Strange problem with Firefox in 15.04 and later ...

2016-02-27 Thread Barry Drake

On 26/02/16 20:37, Barry Drake wrote:
Hi Simon   I didn't know that.  Looks like I have a few more 
scripts to look through.
Hi Simon    I've just found 
http://linux-commands-examples.com/initctl  It seems it isn't deprecated 
- just missing from recent Ubuntu releases.  I'll see if I can get it 
and report back to the Symform team what happens. Thanks again for 
pointing me in the right direction.


Regards,Barry.

--
http://barrydrake.co.nr/


--
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Strange problem with Firefox in 15.04 and later ...

2016-02-27 Thread Barry Drake

On 26/02/16 20:37, Barry Drake wrote:
Hi Simon   I didn't know that.  Looks like I have a few more 
scripts to look through.  There are a fair few of them.  I might fire 
up 14.04 again tomorrow and see what's happening on port 59234.
I've found out exactly where the problem exists.  I've put the relevant 
fragments of the three scripts involved below.  The main thing is that 
the platform.sh script has a call to initctl, which no longer exists.  
This seems to be where the listen for port 59234 is supposed be set.  Is 
there a replacement for what is presumably a deprecated call?  It seems 
to work OK in 14.04.


In main setup script:

for service in $SERVICES; do
if [ $service = "web" ]; then
sleep 2
outfn=$(util_mktemp /tmp/testweb.XX)
if ! util_test_url 
"http://127.0.0.1:$(get_webui_port)/" 1 10 "$outfn"; then

echo "Web service is not healthy" 1>&2
cat "$outfn" 1>&2
fi

In 'base' script:
get_webui_port()
{
if [ -z "$SYMFORM_WEB_UI_PORT" ]; then
echo "59234"
else
echo "$SYMFORM_WEB_UI_PORT"
fi
}

In 'platform'script:
if [ -d /etc/init -a -f /sbin/initctl ]; then
. "/opt/symform/scripts/platform/upstart.sh"
elif [ -d /etc/systemd -a -f /bin/systemctl ]; then
. "/opt/symform/scripts/platform/systemd.sh"
else
. "/opt/symform/scripts/platform/systemv.sh"
fi

This is where the script fails: the command 'initctl' no longer exists, 
and the script fails with an error message 'No command 'initctl:' found, 
did you mean:

Command 'initctl' from package 'upstart' (main)
initctl:: command not found'

Regards,Barry.





--
http://barrydrake.co.nr/


--
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/