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

No files in /opt or /etc #386

Closed
1 task done
rafny opened this issue May 17, 2023 · 10 comments
Closed
1 task done

No files in /opt or /etc #386

rafny opened this issue May 17, 2023 · 10 comments

Comments

@rafny
Copy link

rafny commented May 17, 2023

Description

I just did a manual install and was able to access the web gui utilize the site. But when I took a look at the /opt and /etc directories, there weren't any jellyseerr folders. I've ran the yarn processes a few times and I'm still not getting that experience.
Is there anything I can move manually or set-up the Systemd-service differently?

Version

1.5

Steps to Reproduce

git clone https://github.com/Fallenbagel/jellyseerr.git && cd jellyseerr
git checkout main #if you want to run stable instead of develop
yarn install
yarn run build
yarn start
Confirm browser web gui works
No jellyseer found in /opt or /etc

Screenshots

No response

Logs

No response

Platform

desktop

Device

Server

Operating System

Debian 11

Browser

CLI

Additional Context

No response

Code of Conduct

  • I agree to follow Overseerr's Code of Conduct
@fallenbagel
Copy link
Owner

fallenbagel commented May 17, 2023

The jellyseerr folder is wherever you git cloned it from. The example in the readme is not set in stone as in its just a placeholder. Say you git cloned while at home folder or /mnt, then the jellyseerr folder is at the home folder or /mnt. Git clone is not installing a software like apt does. It's basically cloning the repo

Jellyseerr folder can be placed anywhere. The working directory in the systemd service can be adjusted accordingly.

Hope that clears it up c:

@rafny
Copy link
Author

rafny commented May 17, 2023

I thought about that too. So right now I have /home/jellyseerr as the download folder. Where in here would I find the entries for EntiromentFile and WorkingDirectory. I got confused since they were listed in /etc and /opt in the doc.

I also don't see a jellyseerr.conf file in my download directory:

@fallenbagel
Copy link
Owner

I thought about that too. So right now I have /home/jellyseerr as the download folder. Where in here would I find the entries for EntiromentFile and WorkingDirectory. I got confused since they were listed in /etc and /opt in the doc.

I also don't see a jellyseerr.conf file in my download directory:

The jellyseerr.conf is a file you create. The contents of which are in the readme

@rafny
Copy link
Author

rafny commented May 23, 2023

Thank you, makes much more sense now! Although I'm still having issues setting up the service.
If I go to the /opt/jellyseerr directory and run yarn start, I can load the app fine and access the site:

But if I run the service manually or at start up, I can't get the app to start

# cd /opt/jellyseerr
# ls
total 1240
drwxr-xr-x   16 media_user media_group   4096 May 18 00:03 .
drwxr-xr-x    6 root       root          4096 May 18 00:00 ..
-rw-r--r--    1 media_user media_group  22161 May 17 16:12 .all-contributorsrc
-rw-r--r--    1 media_user media_group    350 May 17 16:12 .dockerignore
-rw-r--r--    1 media_user media_group    207 May 17 16:12 .editorconfig
-rw-r--r--    1 media_user media_group   1782 May 17 16:12 .eslintrc.js
drwxr-xr-x    8 media_user media_group   4096 May 18 00:13 .git
-rw-r--r--    1 media_user media_group    360 May 17 16:12 .gitattributes
-rw-r--r--    1 media_user media_group     73 May 17 16:12 .gitbook.yaml
drwxr-xr-x    4 media_user media_group   4096 May 17 16:12 .github
-rw-r--r--    1 media_user media_group    789 May 17 16:12 .gitignore
drwxr-xr-x    3 media_user media_group   4096 May 17 16:13 .husky
drwxr-xr-x    5 media_user media_group   4096 May 18 00:15 .next
-rw-r--r--    1 media_user media_group    116 May 17 16:12 .prettierignore
-rw-r--r--    1 media_user media_group    120 May 17 16:12 .prettierrc.js
-rw-r--r--    1 media_user media_group    115 May 17 16:12 .stoplight.json
drwxr-xr-x    2 media_user media_group   4096 May 17 16:12 .vscode
-rw-r--r--    1 media_user media_group 189245 May 17 16:12 CHANGELOG.md
-rw-r--r--    1 media_user media_group   5465 May 17 16:12 CODE_OF_CONDUCT.md
-rw-r--r--    1 media_user media_group   5529 May 17 16:12 CONTRIBUTING.md
-rw-r--r--    1 media_user media_group    945 May 17 16:12 Dockerfile
-rw-r--r--    1 media_user media_group     73 May 17 16:12 Dockerfile.local
-rw-r--r--    1 media_user media_group   1060 May 17 16:12 LICENSE
-rw-r--r--    1 media_user media_group   5104 May 17 16:12 README.md
-rw-r--r--    1 media_user media_group    372 May 17 16:12 babel.config.js
drwxr-xr-x    4 media_user media_group   4096 May 17 16:18 config
drwxr-xr-x    6 media_user media_group   4096 May 17 16:12 cypress
-rw-r--r--    1 media_user media_group    390 May 17 16:12 cypress.config.ts
drwxr-xr-x   16 media_user media_group   4096 May 17 16:15 dist
-rw-r--r--    1 media_user media_group    211 May 17 16:12 docker-compose.yml
drwxr-xr-x    6 media_user media_group   4096 May 17 16:12 docs
-rw-r--r--    1 media_user media_group    553 May 17 16:12 merged-prettier-plugin.js
-rw-r--r--    1 media_user media_group    201 May 17 16:12 next-env.d.ts
-rw-r--r--    1 media_user media_group    558 May 17 16:12 next.config.js
drwxr-xr-x 1130 media_user media_group  36864 May 17 16:13 node_modules
-rw-r--r--    1 media_user media_group 179792 May 17 16:12 overseerr-api.yml
-rw-r--r--    1 media_user media_group   8043 May 17 16:12 package.json
-rw-r--r--    1 media_user media_group     83 May 17 16:12 postcss.config.js
drwxr-xr-x    3 media_user media_group   4096 May 17 16:12 public
-rw-r--r--    1 media_user media_group    457 May 17 16:12 renovate.json
drwxr-xr-x   17 media_user media_group   4096 May 17 16:12 server
drwxr-xr-x    2 media_user media_group   4096 May 17 16:12 snap
drwxr-xr-x   11 media_user media_group   4096 May 17 16:12 src
-rw-r--r--    1 media_user media_group    381 May 17 16:12 stylelint.config.js
-rw-r--r--    1 media_user media_group   1801 May 17 16:12 tailwind.config.js
-rw-r--r--    1 media_user media_group    774 May 17 16:12 tsconfig.json
-rw-r--r--    1 media_user media_group 639728 May 17 16:12 yarn.lock
# yarn start
yarn run v1.22.19
$ NODE_ENV=production node dist/index.js
2023-05-23T17:05:32.143Z [info]: Starting Overseerr version 1.5.0 
warn  - You have enabled experimental features (scrollRestoration, largePageDataBytes) in next.config.js.
warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

2023-05-23T17:05:33.573Z [info][Notifications]: Registered notification agents 
2023-05-23T17:05:33.586Z [info][Jobs]: Scheduled jobs loaded 
2023-05-23T17:05:33.652Z [info][Server]: Server ready on port 5055
# cat /etc/jellyseerr/jellyseerr.conf
 Jellyseerr's default port is 5055, if you want to use both, change this.
# specify on which port to listen
PORT=5055

# specify on which interface to listen, by default jellyseerr listens on all interfaces
#HOST=127.0.0.1

# Uncomment if your media server is emby instead of jellyfin.
# JELLYFIN_TYPE=emby
# cat /etc/systemd/system/jellyseerr.service
[Unit]
Description=Jellyseerr Service
Wants=network-online.target
After=network-online.target

[Service]
EnvironmentFile=/etc/jellyseerr/jellyseerr.conf
Environment=NODE_ENV=production
Type=exec
Restart=on-failure
WorkingDirectory=/opt/jellyseerr
ExecStart=/root/.nvm/versions/node/v18.7.0/bin/node dist/index.js

[Install]
WantedBy=multi-user.target
# systemctl start jellyseerr.service
Job for jellyseerr.service failed because the control process exited with error code.
See "systemctl status jellyseerr.service" and "journalctl -xe" for details.
# systemctl status jellyseerr.service
* jellyseerr.service - Jellyseerr Service
     Loaded: loaded (/etc/systemd/system/jellyseerr.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2023-05-23 17:10:42 UTC; 35s ago
    Process: 724 ExecStart=/root/.nvm/versions/node/v18.7.0/bin/node dist/index.js (code=exited, status=203/EXEC)
   Main PID: 724 (code=exited, status=203/EXEC)
        CPU: 403us

May 23 17:10:42 media systemd[1]: jellyseerr.service: Scheduled restart job, restart counter is at 5.
May 23 17:10:42 media systemd[1]: Stopped Jellyseerr Service.
May 23 17:10:42 media systemd[1]: jellyseerr.service: Start request repeated too quickly.
May 23 17:10:42 media systemd[1]: jellyseerr.service: Failed with result 'exit-code'.
May 23 17:10:42 media systemd[1]: Failed to start Jellyseerr Service.

@fallenbagel
Copy link
Owner

You need to do journalctl -xeu jellyseerr and scroll up until you see the reason why it failed. Ignore the exit code and stuff just check where jellyseerr choked (where logs stopped) and share because the systemctl status jellyseerr only shows the most recent exit/error codes which are of no use

@rafny
Copy link
Author

rafny commented May 23, 2023

# systemctl start jellyseerr.service
Job for jellyseerr.service failed because the control process exited with error code.
See "systemctl status jellyseerr.service" and "journalctl -xe" for details.
# journalctl -xeu jellyseerr
-- the configured Restart= setting for the unit.
May 23 17:41:35 media systemd[1]: Stopped Jellyseerr Service.
-- Subject: A stop job for unit jellyseerr.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A stop job for unit jellyseerr.service has finished.
-- 
-- The job identifier is 1678 and the job result is done.
May 23 17:41:35 media systemd[1]: jellyseerr.service: Start request repeated too quickly.
May 23 17:41:35 media systemd[1]: jellyseerr.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit jellyseerr.service has entered the 'failed' state with result 'exit-code'.
May 23 17:41:35 media systemd[1]: Failed to start Jellyseerr Service.
-- Subject: A start job for unit jellyseerr.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit jellyseerr.service has finished with a failure.
-- 
-- The job identifier is 1678 and the job result is failed.

@fallenbagel
Copy link
Owner

You can scroll up on that journalctl command. Then that'd reveal what's wrong. And I think I know what's wrong anyways.

Your execstart is wrong. Remember you installed using some curl thingy the nodejs instead of NVM. You need to replace the node path with your node path you can do which nodejs or maybe it is which node not sure

@rafny
Copy link
Author

rafny commented May 23, 2023

Thanks for calling that out. Yes, I noticed that I didn't have the ExecStart path. But I did find this:

# which node
/usr/bin/node

So then I updated the service:

# cat /etc/systemd/system/jellyseerr.service
[Unit]
Description=Jellyseerr Service
Wants=network-online.target
After=network-online.target

[Service]
EnvironmentFile=/etc/jellyseerr/jellyseerr.conf
Environment=NODE_ENV=production
Type=exec
Restart=on-failure
WorkingDirectory=/opt/jellyseerr
#ExecStart=/root/.nvm/versions/node/v18.7.0/bin/node dist/index.js
ExecStart=/usr/bin/node

[Install]
WantedBy=multi-user.target

Did the service touch, enable, and daemon-reload.
Then:

# systemctl status  jellyseerr.service
* jellyseerr.service - Jellyseerr Service
     Loaded: loaded (/etc/systemd/system/jellyseerr.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Tue 2023-05-23 20:24:39 UTC; 24s ago
    Process: 783 ExecStart=/usr/bin/node (code=exited, status=0/SUCCESS)
   Main PID: 783 (code=exited, status=0/SUCCESS)
        CPU: 22ms

May 23 20:24:39 media systemd[1]: Starting Jellyseerr Service...
May 23 20:24:39 media systemd[1]: Started Jellyseerr Service.
May 23 20:24:39 media systemd[1]: jellyseerr.service: Succeeded.

After that, the web app does not start. But if I do a yarn start in the /opt directory still does.

@fallenbagel
Copy link
Owner

You removed the dist/index.js from exec start.

@rafny
Copy link
Author

rafny commented May 24, 2023

Worked like a charm, thank you for walking me through it!
Hopefully others can find it and find some help too

@rafny rafny closed this as completed May 24, 2023
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