klt

● xfirepfire.service - Xfire szerver
   Loaded: loaded (/etc/systemd/system/xfirepfire.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2023-05-01 19:28:32 CEST; 22s ago
  Process: 30598 ExecStart=/opt/xfirestart.sh (code=exited, status=203/EXEC)
 Main PID: 30598 (code=exited, status=203/EXEC)

máj 01 19:28:32 panel systemd[1]: Started Xfire szerver.
máj 01 19:28:32 panel systemd[30598]: xfirepfire.service: Failed to execute command: Text file busy
máj 01 19:28:32 panel systemd[30598]: xfirepfire.service: Failed at step EXEC spawning /opt/xfirestart.sh: Text file busy
máj 01 19:28:32 panel systemd[1]: xfirepfire.service: Main process exited, code=exited, status=203/EXEC
máj 01 19:28:32 panel systemd[1]: xfirepfire.service: Failed with result 'exit-code'.

sh file:

#!/usr/env/bin bash
/opt/PFire/src/PFire.Console/dotnet run

service:

[Unit]
Description=Xfire szerver

[Service]
Type=simple
ExecStart=/opt/./xfirestart.sh

[Install]
WantedBy=multi-user.target
  • klt válaszolt erre.

    klt
    xfirepfire.service: Failed at step EXEC spawning /opt/xfirestart.sh: No such file or directory

    Azért sem akarja...

    • klt válaszolt erre.

      klt
      /opt/xfirestart.sh

      #!/bin/sh
      /opt/PFire/src/PFire.Console/dotnet run

      Nagyon nem csináltam még netframeworkos progit...

      • klt válaszolt erre.

        mennydorges

        mennydorges Próbálom működésre bírni.

        Mutattam linket, ami elmegyarázza, mi az a #! kezdetű izé a szkript elején. Azt nem nézted meg?

        It's called a shebang, and tells the parent shell which interpreter should be used to execute the script.

        mennydorges Nagyon nem csináltam még

        Én se. De ha terminálból elindul, akkor így is el kéne neki.

          klt Vágesz volt annó valami hasonló ondom service-ben és valami tök egyszerű kis pici hiba volt csak nem jut eszembe.

          • klt válaszolt erre.

            mennydorges Na, hát ezt kell végignézni. Terminálból elindul a szkripttel? Ha igen, a .service fájlban van a bibi. Ha nem, akkor meg amott.
            Nálam előfordul, hogy elgépelem valaminek a nevét, kihagyok betűt, vagy felcserélek véletlenül két betűt egy névben. Ez utóbbit veszem észre legnehezebben.
            Service fájlban a /./ fölösleges, elég a /
            A shellben viszont tényleg kell a ./, ha az aktuális könyvtárban indítasz valamit, viszont nem kell, ha teljes útvonalát adod meg, például /usr/bin/ping.

            ./xfirestart.sh
            -bash: ./xfirestart.sh: /bin/shM: rossz parancsértelmező: A szövegfájl foglalt

            • klt válaszolt erre.

              sh xfirestart.sh
              xfirestart.sh: 2: xfirestart.sh: /opt/PFire/src/PFire.Console/dotnet: not found
              Valszeg ebben van neki a nem tetszik rész:

              /opt/PFire/src/PFire.Console/dotnet run

              Nem értelmezi....

              • klt válaszolt erre.

                klt

                Ennyi a terminálban az indítás:

                cd /opt/PFire/src/PFire.Console/

                dotnet run

                Módosítottam az sh file-t:
                #!/bin/sh
                /usr/bin/dotnet /opt/PFire/src/PFire.Console/dotnet run

                Most erre lázad:

                sh xfirestart.sh
                Could not execute because the specified command or file was not found.
                Possible reasons for this include:

                • You misspelled a built-in dotnet command.
                  does not exist. to execute a .NET program, but dotnet-/opt/PFire/src/PFire.Console/PFire.Console.csproj
                • You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
                • klt válaszolt erre.

                  mennydorges
                  Azt írd a szkriptbe, ahogy terminálból indulna:

                  #!/bin/sh
                  cd /opt/PFire/src/PFire.Console
                  dotnet run

                    klt
                    Ezt nem értem:
                    sh xfirestart.sh
                    xfirestart.sh: 2: cd: can't cd to /opt/PFire/src/PFire.Console/
                    Could not execute because the specified command or file was not found.
                    Possible reasons for this include:

                    • You misspelled a built-in dotnet command.
                      does not exist. to execute a .NET program, but dotnet-run
                    • You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

                    De még hagyján ugyanazt a hibát dobja service-ben mint azelőtt.:

                    ● xfirepfire.service - Xfire szerver
                       Loaded: loaded (/etc/systemd/system/xfirepfire.service; enabled; vendor preset: enabled)
                       Active: failed (Result: exit-code) since Mon 2023-05-01 21:33:40 CEST; 5s ago
                      Process: 9619 ExecStart=/opt/xfirestart.sh (code=exited, status=203/EXEC)
                     Main PID: 9619 (code=exited, status=203/EXEC)
                    
                    máj 01 21:33:40 panel systemd[1]: Started Xfire szerver.
                    máj 01 21:33:40 panel systemd[9619]: xfirepfire.service: Failed to execute command: No such file or directory
                    máj 01 21:33:40 panel systemd[9619]: xfirepfire.service: Failed at step EXEC spawning /opt/xfirestart.sh: No suc
                    máj 01 21:33:40 panel systemd[1]: xfirepfire.service: Main process exited, code=exited, status=203/EXEC
                    máj 01 21:33:40 panel systemd[1]: xfirepfire.service: Failed with result 'exit-code'.

                    Ilyen ha terminálban kézzel indítom:

                    root@panel:/opt/PFire/src/PFire.Console# dotnet run
                    [21:36:44 DBG] An 'IServiceProvider' was created for internal use by Entity Framework.
                    [21:36:45 DBG] No relationship from 'Friend' to 'User' has been configured by convention because there are multiple properties on one entity type {'Me', 'Them'} that could be matched with the properties on the other entity type {'FriendsOf', 'MyFriends'}. This message can be disregarded if explicit configuration has been specified in 'OnModelCreating'.
                    • klt válaszolt erre.

                      klt

                      ● xfirepfire.service - Xfire szerver
                         Loaded: loaded (/etc/systemd/system/xfirepfire.service; enabled; vendor preset: enabled)
                         Active: failed (Result: exit-code) since Mon 2023-05-01 21:40:11 CEST; 1s ago
                        Process: 10834 ExecStart=/opt/xfirestart.sh (code=exited, status=203/EXEC)
                       Main PID: 10834 (code=exited, status=203/EXEC)
                      
                      máj 01 21:40:11 panel systemd[1]: Started Xfire szerver.
                      máj 01 21:40:11 panel systemd[1]: xfirepfire.service: Main process exited, code=exited, status=203/EXEC
                      máj 01 21:40:11 panel systemd[1]: xfirepfire.service: Failed with result 'exit-code'.

                      sh file kézzel futtatva:

                      Couldn't find a project to run. Ensure a project exists in /opt, or pass the path to the project using --project.

                      mennydorges can't cd to /opt/PFire/src/PFire.Console/

                      Nem tud odamenni? Azt látom, hogy root-ként próbáltad eddig. Ezt is root-ként próbálod?