Netshot icon indicating copy to clipboard operation
Netshot copied to clipboard

Can't complete installation

Open orgitnized opened this issue 1 year ago • 4 comments

Hello - I've tried to install this on Ubuntu 24 and CentOS 9 and it fails in the same spot.

I make it almost to the end of the install, and adding the service will yield the following results.

sudo systemctl enable netshot.service
Failed to enable unit: Cannot alias netshot.service as netshot.
[support@netshot netshot_0.20.01$ sudo systemctl status netshot.service
o netshot. service - Netshot
Loaded: loaded (/etc/systemd/system/netshot service; enabled; preset: disabled)
Active: inactive (dead)
[support@netshot netshot_0.20.01$ sudo systemctl start netshot
[support@netshot netshot_0.20.0]$ sudo systemctl status netshot.service
x netshot.service - Netshot
Loaded: loaded (/etc/systemd/system/netshot service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Wed 2024-11-13 20:52:29 CST; 2s ago
Duration: 8ms
Process: 2548 ExecStart=/usr/bin/java -jar /usr/local/netshot/netshot. jar (code=exited, status=203/EXEC)
Main PID: 2548 (code=exited, status=203/EXEC)
CPU: 3ms

Nov 13 20:52:29 netshot systemd[1]: Started Netshot.
Nov 13 20:52:29 netshot systemd[2548]: netshot.service: Failed to locate executable /usr/bin/java: Permission denied
Nov 13 20:52:29 netshot systemd[2548]: netshot.service: Failed at step EXEC spawning /usr/bin/java: Permission denied
Nov 13 20:52:29 netshot systemd[1]: netshot.service: Main process exited, code-exited, status=203/EXEC
Nov 13 20:52:29 netshot systemd[1]: netshot service: Failed with result 'exit-code'.
[support@netshot netshot_0.20.0]$

orgitnized avatar Nov 14 '24 02:11 orgitnized

The java binary cannot be executed. You should check permissions on /usr/bin/java for netshot system user.

SCadilhac avatar Nov 17 '24 22:11 SCadilhac

I don't see any issues with permissions. This install was done solely for netshot and was installed under the netshot user account, so it would be hard to believe it was an access issue, but I've added the output in the below code section.

namei -m /usr/bin/java
f: /usr/bin/java
 drwxr-xr-x /
 drwxr-xr-x usr
 drwxr-xr-x bin
 lrwxrwxrwx java -> /etc/alternatives/java
   drwxr-xr-x /
   drwxr-xr-x etc
   drwxr-xr-x alternatives
   lrwxrwxrwx java -> /usr/lib/jvm/graalvm-jdk-21.0.4+8.1/bin/java
     drwxr-xr-x /
     drwxr-xr-x usr
     drwxr-xr-x lib
     drwxr-xr-x jvm
     drwxrwxr-x graalvm-jdk-21.0.4+8.1
     drwxrwxr-x bin
     -rwxrwxr-x java

orgitnized avatar Nov 18 '24 01:11 orgitnized

I've just tried a fresh install on Ubuntu 24.04 and didn't have this issue. Is /usr/bin/java -version fine? Are you well running on x64?

SCadilhac avatar Nov 18 '24 23:11 SCadilhac

I run on arm, not x64. Output looks fine and netshot runs fine, but the service will never install.

/usr/bin/java -version
java version "21.0.4" 2024-07-16 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.4+8.1 (build 21.0.4+8-LTS-jvmci-23.1-b41)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.4+8.1 (build 21.0.4+8-LTS-jvmci-23.1-b41, mixed mode, sharing)

orgitnized avatar Nov 18 '24 23:11 orgitnized