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

[初心者] EPGStationにアクセスできない on Raspberry Pi(Raspbian Buster Lite July 2019) #285

Closed
Higomon opened this issue Sep 7, 2019 · 4 comments

Comments

@Higomon
Copy link

Higomon commented Sep 7, 2019

環境

  • Version of EPGStation: 1.5.8
  • Version of Mirakurun: 2.11.0
  • Version of Node: 10.15.2
  • Version of NPM: 5.8.0 --> 6.11.3
  • OS: Raspbian Buster Lite July 2019
  • Kernel: 4.19.66-v71+
  • Raspberry Pi 4B or Raspberry Pi 3B+ (以下、RPi4 or RPi3+と略)
  • チューナー: PX-W3U4 (driver: px4_drv)

Issue

Linux素人なため、先人のお知恵を拝借して、最下部の2つのサイト
を参考に、EPGStationのインストールまで行いました。

初めて実施したときのたった1度だけ、
EPGStationに無事にアクセス可能でしたが、
その後、samba等を入れていたら急に繋がらなくなりました。

OSクリーンインストールからやり直すこと数十回、
考えられることを試してもEPGStationにアクセスできません。

VLCにて以下のURLをみると視聴できるため、
Mirakurunまでは無事に構築できたのかと判断しております。
http://192.168.xxx.xxx:40772/api/channels/GR/24/stream

要因を切り分けるべく、RPi4またはRPi3+を使い、
OSはRaspbianの古いものやnodejs, npmのバージョンを変え
1週間ほど格闘しましたが、力不足で結局わかりませんでした。

どうか、お力添えを頂けないでしょうか。


Raspbian Buster Lite へのインストール手順

@l3tnun
Copy link
Owner

l3tnun commented Sep 8, 2019

ここは issue 管理の場であってインストール方法をお教えする場ではないのですが...


  • EPGstation の再インストール
    手順2を拝見しましたが、doc/linux-setup.md に従ってインストールし直しましょう
    少なくとも npm install 時に root 権限は不要です

  • 手動実行での動作確認
    インストールが完了したら pm2 コマンドでの登録の前に手動で実行しましょう
    その後 logs/Service/system.log を見て以下のようなログが出ているか確認しましょう

[2019-09-08T10:28:54.328] [INFO] system - SocketIo Server has started.
[2019-09-08T10:28:54.330] [INFO] system - server listening on 8888
[2019-09-08T10:28:54.330] [INFO] system - SocketIo listening on 8889

このようなログが確認できた場合 EPGStation の web サーバ画は起動出来ているはずです。

  • localhost からのアクセス確認
    wgetcurl コマンド等で EPGStation を実行しているサーバの http://localhost:8888 に対してアクセスできるか確認してください
    これができれば EPGStation 側の web サーバはしっかり機能しています

  • 外部からのアクセス確認
    EPGStation を実行しているサーバ以外の端末からウェブブラウザ等を利用してアクセスしてください
    もしlocalhost からのアクセス確認が取れているのに、外部からアクセス出来ない場合はポートが正しく開放できていないと考えられるのでポート開放を行いましょう


アクセスが確認できれば pm2 に登録する等して自動起動するようにして OK です。

あと、pm2 実行時に root 権限で動かす場合は ここ にある通りに gid, uid をインストール時に使用したユーザと合わせると無用なトラブルが避けられるかと思います

@Higomon
Copy link
Author

Higomon commented Sep 9, 2019

ご返答が遅れて申し訳ございません。
調べ物や動作再現性の確認をとるのに手間取っていました。

RPi4(Raspbian Buster Lite July 2019)を使って、
Nodejsおよびnpmのバージョンが下記環境の場合、
ご指導頂いたインストール方法で正常動作いたしました。

この度は、誠にありがとうございました。
作者様のマニュアル精読が足りませんでした。

念の為、動作NG(?)な環境も最下部にご報告いたします。


動作OKな環境

  • EPGStation: 1.5.8
  • Mirakurun: 2.11.0
  • Nodejs: 10.15.2
  • npm: 5.8.0
  • OS: Raspbian Buster Lite July 2019
  • Kernel: 4.19.66-v71+
  • Raspberry Pi 4B
  • チューナー: PX-W3U4 (driver: px4_drv)

(手順2) Mirukurun構築時の抜粋

$ curl -sL http://deb.nodesource.com/setup_8.x | sudo bash -  #←10.xは動作NG
$ sudo apt install -y nodejs npm


動作NG(?)な環境

  • 前提条件: Nodejsおよびnpm バージョン以外は同上
  • Nodejs: 10.16.3
  • npm: 6.11.3

インストール時に警告(+)がでるので、
  + npm WARN npm npm does not support Node.js v10.15.2
Nodejsおよびnpmのバージョンを上げて、EPGStationをインストールし、
EPGStationを実行すると、最下部のエラーを吐いて動作不可でした。
この現象は、Linux初心者の私には理解できませんが、念の為ご報告いたします。

logs

/home/pi/.npm/_logs/2019-09-09T14_11_20496Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@6.11.3
3 info using node@v10.16.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle EPGStation@1.5.8'~prestart: EPGStation@1.5.8
6 info lifecycle EPGStation@1.5.8'~start: EPGStation@1.5.8
7 verbose lifecycle EPGStation@1.5.8'~start: unsafe-perm in lifecycle true
8 verbose lifecycle EPGStation@1.5.8'~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/EPGStation/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle EPGStation@1.5.8'~start: CWD: /home/pi/EPGStation
10 silly lifecycle EPGStation@1.5.8'~start: Args: [ '-c', 'node dist/server/index.js' ]
11 silly lifecycle EPGStation@1.5.8'~start: Returned: code: 1 signal: null
12 info lifecycle EPGStation@1.5.8'~start: Failed to exec start script
13 verbose stack Error: EPGStation@1.5.8 start: node dist/server/index.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid EPGStation@1.5.8
15 verbose cwd /home/pi/EPGStation
16 verbose Linux 4.19.66-v7l+
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v10.16.3
19 verbose npm v6.11.3
20 error code ELIFECYCLE
21 error errno 1
22 error EPGStation@1.5.8 start: node dist/server/index.js
22 error Exit status 1
23 error Failed at the EPGStation@1.5.8 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@l3tnun
Copy link
Owner

l3tnun commented Sep 9, 2019

詳細なエラー報告ありがとうございます
こちらの環境で再現できるかは不明ですが(arm環境が手元に無いので)検証してみます

@l3tnun
Copy link
Owner

l3tnun commented Sep 14, 2019

qemu-arm-static を使用してユーザモードエミュレーションで 2019/07/10 版 raspbian buster lite で起動可能かテストしてみましたが、この環境では問題が発生しませんでした

こちらの環境で原因を究明することは難しいので一旦閉じます

@l3tnun l3tnun closed this as completed Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants