Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[alpha.19] 'ghost ls' not showing proper status #184

Closed
PaszaVonPomiot opened this issue Apr 13, 2017 · 2 comments · Fixed by #198
Closed

[alpha.19] 'ghost ls' not showing proper status #184

PaszaVonPomiot opened this issue Apr 13, 2017 · 2 comments · Fixed by #198
Assignees
Labels
Milestone

Comments

@PaszaVonPomiot
Copy link

Issue Summary

'ghost ls' command does not show my production instance running. It works okay for development.

Steps to Reproduce

  1. Install alpha.19 and setup for both production and development
  2. ghost start
  3. ghost ls

Technical details:

Ghost Version: alpha.19
ghost-cli Version: 1.0.0-alpha.16
Node Version: v6.10.0
OS: Debian 3.16.39-1+deb8u1
Database: MariaDB 10.0.29 & SQLite3

Log

ghost@ghost:/var/www/ghost$ ghost start
 ✔ Validating config
✔ Starting Ghost
You can access your blog at http://192.168.1.75:2368/
ghost@ghost:/var/www/ghost$ ghost ls
┌──────────────┬────────────────┬─────────┬─────┬──────┬─────────────────┐
│ Name         │ Location       │ Status  │ Url │ Port │ Process Manager │
├──────────────┼────────────────┼─────────┼─────┼──────┼─────────────────┤
│ 192.168.1.75 │ /var/www/ghost │ stopped │ n/a │ n/a  │ n/a             │
├──────────────┼────────────────┼─────────┼─────┼──────┼─────────────────┤
│ ghost-local  │ /var/www/ghost │ stopped │ n/a │ n/a  │ n/a             │
└──────────────┴────────────────┴─────────┴─────┴──────┴─────────────────┘

ghost@ghost:/var/www/ghost$ ghost stop
✔ Stopping Ghost
ghost@ghost:/var/www/ghost$ ghost -D start
 ✔ Validating config
✔ Starting Ghost
You can access your blog at http://192.168.1.75:2367/
ghost@ghost:/var/www/ghost$ ghost ls
┌──────────────┬────────────────┬───────────────────────┬───────────────────────────┬──────┬─────────────────┐
│ Name         │ Location       │ Status                │ Url                       │ Port │ Process Manager │
├──────────────┼────────────────┼───────────────────────┼───────────────────────────┼──────┼─────────────────┤
│ 192.168.1.75 │ /var/www/ghost │ stopped               │ n/a                       │ n/a  │ n/a             │
├──────────────┼────────────────┼───────────────────────┼───────────────────────────┼──────┼─────────────────┤
│ ghost-local  │ /var/www/ghost │ running (development) │ http://192.168.1.75:2367/ │ 2367 │ local           │
└──────────────┴────────────────┴───────────────────────┴───────────────────────────┴──────┴─────────────────┘
ghost@ghost:/var/www/ghost$ cat ~/.ghost/config
{
  "instances": {
    "192.168.1.75": {
      "cwd": "/var/www/ghost"
    },
    "ghost-local": {
      "cwd": "/var/www/ghost"
    }
  }
}
ghost@ghost:/var/www/ghost$ cat config.production.json
{
  "url": "http://192.168.1.75:2368/",
  "pname": "192.168.1.75",
  "server": {
    "host": "192.168.1.75",
    "port": 2368
  },
  "process": "systemd",
  "database": {
    "client": "mysql",
    "connection": {
      "host": "localhost",
      "user": "root",
      "password": "*******",
      "database": "ghost_prd"
    }
  },
  "logging": {
    "transports": [
      "file",
      "stdout"
    ]
  },
  "auth": {
    "type": "password"
  }
}
ghost@ghost:/var/www/ghost$ cat config.development.json
{
  "url": "http://192.168.1.75:2367/",
  "pname": "ghost-local",
  "server": {
    "host": "192.168.1.75",
    "port": 2367
  },
  "process": "local",
  "database": {
    "client": "sqlite3",
    "connection": {
      "filename": "/var/www/ghost/content/data/ghost-local.db"
    }
  },
  "logging": {
    "transports": [
      "file",
      "stdout"
    ]
  }
}
@ErisDS
Copy link
Member

ErisDS commented Apr 18, 2017

I was able to reproduce this today.

@acburdine acburdine added the bug label Apr 18, 2017
@acburdine acburdine self-assigned this Apr 18, 2017
@acburdine acburdine added this to the 1.0 Beta Ready milestone Apr 18, 2017
@acburdine
Copy link
Member

Ok, so I figured out what this is. Because we use the get method from lodash in a lot of places, the dots in the IP address that shows up are being treated as a property access chain.

I'll add a sanitization method for the process name that will convert the dots to dashes to make sure this doesn't happen.

acburdine added a commit to acburdine/Ghost-CLI that referenced this issue May 5, 2017
closes TryGhost#184
- tighten up pname validation regex
- replace dots with dashes in default pname
acburdine added a commit that referenced this issue May 5, 2017
closes #184
- tighten up pname validation regex
- replace dots with dashes in default pname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants