2015-05-03 24 views
8

EDITUpstart: Job thất bại trong việc bắt đầu

status marybaked mang

marybaked dừng/chờ đợi

Dưới đây là sản phẩm của /var/log/syslog:

03 Tháng năm 16 : 24: 39 hạt nhân marybakedpdx: [3464.189563] init: F ailed để đẻ trứng quá trình chính marybakedpdx: không thể tìm thấy người dùng setuid

03 Tháng Năm 16:24:44 marybakedpdx kernel: [3469,342062] init: Không thể đẻ trứng quá trình chính marybaked: không thể tìm thấy người dùng setuid


Khi tôi chạy start marybaked tôi nhận được:

bắt đầu: Job thất bại trong việc bắt đầu

Khi tôi chạy start <anything else> tôi nhận được:

bắt đầu: Unknown công việc:

Không có log marybaked.log trong thư mục /var/logs/upstart tôi ... Chuyện gì đang xảy ra ở đây? Làm thế nào có thể mới nổi nhận ra rằng marybaked là một công việc và không khởi động được, nhưng không tạo ra một bản ghi lỗi cho nó?

Đây là /etc/init/marybaked.conf tập tin của tôi:

# upstart service file at /etc/init/marybakedpdx.conf 
    description "Meteor.js (NodeJS) application" 
    author "Daniel Speichert <[email protected]>" 

    # When to start the service 
    start on started mongodb and runlevel [2345] 

    # When to stop the service 
    stop on shutdown 

    # Automatically restart process if crashed 
    respawn 
    respawn limit 10 5 

    # we don't use buil-in log because we use a script below 
    # console log 

    # drop root proviliges and switch to mymetorapp user 
    setuid marybakedpdx 
    setgid marybakedpdx 

    script 
     export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 
     export NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript 
     # set to home directory of the user Meteor will be running as 
     export PWD=/home/marybakedpdx 
     export HOME=/home/marybakedpdx 
     # leave as 127.0.0.1 for security 
     export BIND_IP=127.0.0.1 
     # the port nginx is proxying requests to 
     export PORT=8080 
     # this allows Meteor to figure out correct IP address of visitors 
     export HTTP_FORWARDED_COUNT=1 
     # MongoDB connection string using marybakedpdx as database name 
     export MONGO_URL=mongodb://localhost:27017/marybakedpdx 
     # The domain name as configured previously as server_name in nginx 
     export ROOT_URL=http://marybakedpdx.com 
     # optional JSON config - the contents of file specified by passing "--settings" parameter to meteor command in development mode 
     export METEOR_SETTINGS='{ "somesetting": "someval", "public": { "othersetting": "anothervalue" } }' 
     # this is optional: http://docs.meteor.com/#email 
     # commented out will default to no email being sent 
     # you must register with MailGun to have a username and password there 
     # export MAIL_URL=smtp://[email protected]:[email protected] 
     # alternatively install "apt-get install default-mta" and uncomment: 
     # export MAIL_URL=smtp://localhost 
     exec node /home/marybakedpdx/bundle/main.js >> /home/marybakedpdx/marybakedpdx.log 
    end script 

Trả lời

11

tập tin mới nổi của bạn trông ok, những gì đang xảy ra hầu như là một cái gì đó trong script khối của bạn được không. Nó phải được chi tiết trong syslog.

Hãy thử nhìn vào /var/log/syslog

Đối gỡ rối hơn nữa, bạn cũng nên cố gắng touch file tại các điểm khác nhau, để thu hẹp hơn nữa vấn đề này. Ví dụ:

touch /tmp/marybake0 
exec node /home/marybakedpdx/bundle/main.js >> /home/marybakedpdx/marybakedpdx.log 

liên lạc sẽ tạo tệp nếu nó không tồn tại.

EDIT:

Đánh giá từ bài cập nhật của bạn, người dùng marybakedpdx không tồn tại. Thử chạy như sau:

adduser marybakedpdx 
addgroup marybakedpdx 
+0

kiểm tra bài viết của tôi cho đầu ra – redress

+0

'chạy ls -l/home/marybakedpdx/marybakedpdx.log'. Tệp có tồn tại không? Nếu vậy chủ sở hữu là ai? Điều gì sẽ xảy ra khi bạn thực hiện 'sudo -u marybakedpdx touch/home/marybakedpdx/marybakedpdx.log' –

+0

Tôi phải chạy' chown marybakedpdx: marybakedpdx/home/marybakedpdx -R' – redress

Các vấn đề liên quan