Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Unable to start php7.0-fpm service, wabash crashes. #10

Open
valeryan opened this issue Mar 6, 2017 · 9 comments
Open

Unable to start php7.0-fpm service, wabash crashes. #10

valeryan opened this issue Mar 6, 2017 · 9 comments

Comments

@valeryan
Copy link

valeryan commented Mar 6, 2017

I am trying to use wabash to setup my WSL instance for web development. I was able to startup nginx and mysql without problem but I get an error when I try to add php to the config.

I get an error dialog that states Error, unknown message, or garbled channel: serror php7.0-fpm.

This is my config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="ArkaneSystems.Wabash.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
  </startup>
  <applicationSettings>
    <ArkaneSystems.Wabash.Properties.Settings>
      <setting name="Services" serializeAs="Xml">
        <value>
          <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <string>rsyslog</string>
            <string>binfmt-support</string>
            <string>dbus</string>
            <string>cron</string>
            <string>atd</string>
            <string>mysql</string>
            <string>nginx</string>
            <string>php7.0-fpm</string>
          </ArrayOfString>
        </value>
      </setting>
    </ArkaneSystems.Wabash.Properties.Settings>
  </applicationSettings>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <!-- BEGIN: Added by PostSharp -->
      <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="PostSharp" publicKeyToken="b13fd38b8f9c99d7" culture="neutral" />
        <bindingRedirect oldVersion="3.0.0.0-4.3.21.0" newVersion="4.3.21.0" />
      </dependentAssembly>
      <!-- END: Added by PostSharp -->
    </assemblyBinding>
  </runtime>
</configuration>
@unleashit
Copy link

Same here. I noticed that the same error comes up for a service that doesn't exist (php7.0-fpm does exist, and works when started in the terminal).

@cerebrate
Copy link
Owner

Just a note: I am going to look into this, but I may not be able to get to it particularly soon as I've been up against some pretty tight deadlines this last month and it doesn't look like they're going away soon. Sorry, folks.

In the meantime... pull requests gratefully accepted? :)

@valeryan
Copy link
Author

valeryan commented Apr 12, 2017

I would take a stab at it but I was not able to get all the postsharp stuff to work. Its not something I use. However, I would guess the issue is in the DaemonManager.cs. When the php service starts it only has output if start up fails. Most services will exit and output something like [OK] but php just starts silently. In your switch statement if you can't find a valid message after startup you default to unknown and Die. I would consider creating a configurable list of services that do not exit have and use alternate behavior where you accept a non exit, no output as success and any thing else as a failure.

I would try to test this idea out but I can't build the project because of the postsharp stuff.

@valeryan
Copy link
Author

I think this is relevant to this issue. http://askubuntu.com/questions/792940/no-output-from-service-start-stop-restart-command

It states that the no output is/should be the normal operation of most services.

@unleashit
Copy link

Unfortunately, I'm also pretty useless on the pull request front as I'm mainly a Javascript guy. But I think valeryan is on to something, and that the behavior of the status messages is different with the php service (non existent) for some reason. As a user, that would seem like a bug in Ubuntu, but that's for another place.

Thanks for your work. Aside from this minor issue, Wabash for me the difference of using WLS or not. I tend to be very close happy on my windows (which meant bye bye webserver, database, etc. every time :/)

Side note: one nice feature for a rainy day would be to add an option to the task icon to suppress notifications (only thing stopping me from checking "start with windows").

@Log1x
Copy link

Log1x commented May 28, 2017

By the looks of things, the issue comes from here.

Would it be destructive to change

default:
    // error, unknown, or garbled message
    try
    {
        this.wabashd.Kill () ;
    }
    catch
    {
        // ignored; if we can't kill it, or its already dead, we can't do anything.
    }

to:

default:
    this.owner.Message ("No response from daemon.") ;
    break;

?

I'd mess around with it but I don't know how to compile.

@heldchen
Copy link

this might be related to php-fpm in Ubuntu trying to create its pid file in /run/php, but this directory does not exist when WSL is reinitialized. as a workaround, change the pid config value in /etc/php/7.*/fpm/php-fpm.conf to use /run instead.

@valeryan
Copy link
Author

@heldchen I will give that a try, however php7 starts fine. The problem is that wabash can't start it.

@heldchen
Copy link

heldchen commented Aug 5, 2017

@valeryan I've created a replacement /usr/bin/start-wabashd script that acts a drop-in replacement of the wabashd daemon: cerebrate/wabashd#2 (for reasons unrelated to your issue - I needed to get rid of the mono dependencies in my WSL install).

in this version, the response to the Wabash strt command (used to start a service) does not error out when a service start does not generate output. that might help with your php problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants