Project

General

Profile

Bug #1312

Web App Server Field

Added by cpg about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
03/01/2014
Due date:
% Done:

0%


Description

The web app server field does not allow for the at sign @. Dashes (-) seem to be ok, but the app VNC need to use the sign as part of the service name.

Using vncserver@4 in the field becomes 4.conf and 4.service for the Monit configuration file. As a result, the server cannot be started, stopped, or restarted using the dashboard or by monit should it stop on it's own.

History

#1 Updated by cpg about 7 years ago

this is the parsing code:

https://github.com/amahi/platform/blob/master/app/models/app.rb#l232-235

the pid file is what comes after the colon, unless it's empty.

here is the match for "vncserver@4:vncserver-4.pid":
http://rubular.com/r/J1V8OH7wGP

the matches are:

$1.vncserver@4
$2.vncserver-4.pid

by default, if the pid file is vncserver-4.pid it will become /var/run/vncserver-4.pid by default.

so the "vncserver@4:vncserver-4.pid" string should be working as
expected. i see that in the VNC app but I do not see anything in the VNC (clone) app.

#2 Updated by bigfoot65 about 7 years ago

I agree. I see how the regex is working, but for some reason when I test the install of the app, it ends up /etc/monit.d/4.conf.

I have added it back on the clone app.

You can see the same behavior in the test variables app. I added the service there as an easy way to test without having to install VNC. It does not work as designed.

#3 Updated by bigfoot65 about 7 years ago

vncserver@4:vncserver-4.pid generates the The /etc/monit.d/4.conf file.

The file contains:
check process 4 with pidfile /var/run/vncserver-4.pid
start program = "/usr/bin/systemctl start 4.service"
stop program = "/usr/bin/systemctl stop 4.service"

Not sure why the number after the sign causes issues. OpenVPN uses the , but it is followed by amahi and not a number. It generates the monit file correctly.

Hope that helps clarify the issue.

#4 Updated by cpg about 7 years ago

  • Target version set to amahi-7-2

i see. this was fixed in https://github.com/amahi/platform/commit/76c5dab4818bab8684c813dece0961d8bcefe462
and it's slated to be released in amahi 7.2.

i believe it's fixed in a recent test release:

alpha.amahi.org/tmp/hda-platform-7.1.5-4.x86_64.rpm

if it is please close this bug.

#5 Updated by bigfoot65 about 7 years ago

  • Status changed from New to Closed

The update requires mlocate dependency which is not installed. After adding it, all works perfectly.

Awesome job!

Also available in: Atom