Failed to launch Spring boot application into Linux server
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm trying to deploy my application spring boot into Linux server, so I followed this link, and the bellow file represent my unit declaration service:
#change this to your workspace
WorkingDirectory=/home/user1/myApp.dev/API/
[Service]
User=user1
ExecStart=/usr/bin/java -jar /home/user1/myApp.dev/API/myApp.jar
SuccessExitStatus=143
ExecStop=/bin/kill -INT $MAINPID
ExecReload=/bin/kill -TERM $MAINPID
# In case if it gets stopped, restart it immediately
Restart = always
Type = simple
[Install]
WantedBy=multi-user.target
when I launch my application I have the bellow error:
java.io.FileNotFoundException: logs/myLogs-api.log (No such file or directory).......Failed to create parent directories for
[/logs/myLogs-api.log]
My application cannot find the logs folder, but it already exist in the same directory of my jar folder /home/user1/myApp.dev/API/ .
My logback config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>$LOG_PATH:-logs/myLogs-api.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>$LOG_PATH:-logs/myLogs-api.%dyyyy-MM-dd.log</fileNamePattern>
</rollingPolicy>
<append>false</append>
<encoder>
<pattern>%ddd-MM-yyyy HH:mm:ss.SSS %magenta([%thread]) %highlight(%-5level) %logger36.%M - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="FILE" />
</root>
</configuration>
My prop file of spring is under WorkingDirectory=/home/user1/myApp.dev/API/
but when I launch the service it cannot get it.
linux ubuntu java
add a comment |Â
up vote
0
down vote
favorite
I'm trying to deploy my application spring boot into Linux server, so I followed this link, and the bellow file represent my unit declaration service:
#change this to your workspace
WorkingDirectory=/home/user1/myApp.dev/API/
[Service]
User=user1
ExecStart=/usr/bin/java -jar /home/user1/myApp.dev/API/myApp.jar
SuccessExitStatus=143
ExecStop=/bin/kill -INT $MAINPID
ExecReload=/bin/kill -TERM $MAINPID
# In case if it gets stopped, restart it immediately
Restart = always
Type = simple
[Install]
WantedBy=multi-user.target
when I launch my application I have the bellow error:
java.io.FileNotFoundException: logs/myLogs-api.log (No such file or directory).......Failed to create parent directories for
[/logs/myLogs-api.log]
My application cannot find the logs folder, but it already exist in the same directory of my jar folder /home/user1/myApp.dev/API/ .
My logback config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>$LOG_PATH:-logs/myLogs-api.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>$LOG_PATH:-logs/myLogs-api.%dyyyy-MM-dd.log</fileNamePattern>
</rollingPolicy>
<append>false</append>
<encoder>
<pattern>%ddd-MM-yyyy HH:mm:ss.SSS %magenta([%thread]) %highlight(%-5level) %logger36.%M - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="FILE" />
</root>
</configuration>
My prop file of spring is under WorkingDirectory=/home/user1/myApp.dev/API/
but when I launch the service it cannot get it.
linux ubuntu java
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to deploy my application spring boot into Linux server, so I followed this link, and the bellow file represent my unit declaration service:
#change this to your workspace
WorkingDirectory=/home/user1/myApp.dev/API/
[Service]
User=user1
ExecStart=/usr/bin/java -jar /home/user1/myApp.dev/API/myApp.jar
SuccessExitStatus=143
ExecStop=/bin/kill -INT $MAINPID
ExecReload=/bin/kill -TERM $MAINPID
# In case if it gets stopped, restart it immediately
Restart = always
Type = simple
[Install]
WantedBy=multi-user.target
when I launch my application I have the bellow error:
java.io.FileNotFoundException: logs/myLogs-api.log (No such file or directory).......Failed to create parent directories for
[/logs/myLogs-api.log]
My application cannot find the logs folder, but it already exist in the same directory of my jar folder /home/user1/myApp.dev/API/ .
My logback config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>$LOG_PATH:-logs/myLogs-api.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>$LOG_PATH:-logs/myLogs-api.%dyyyy-MM-dd.log</fileNamePattern>
</rollingPolicy>
<append>false</append>
<encoder>
<pattern>%ddd-MM-yyyy HH:mm:ss.SSS %magenta([%thread]) %highlight(%-5level) %logger36.%M - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="FILE" />
</root>
</configuration>
My prop file of spring is under WorkingDirectory=/home/user1/myApp.dev/API/
but when I launch the service it cannot get it.
linux ubuntu java
I'm trying to deploy my application spring boot into Linux server, so I followed this link, and the bellow file represent my unit declaration service:
#change this to your workspace
WorkingDirectory=/home/user1/myApp.dev/API/
[Service]
User=user1
ExecStart=/usr/bin/java -jar /home/user1/myApp.dev/API/myApp.jar
SuccessExitStatus=143
ExecStop=/bin/kill -INT $MAINPID
ExecReload=/bin/kill -TERM $MAINPID
# In case if it gets stopped, restart it immediately
Restart = always
Type = simple
[Install]
WantedBy=multi-user.target
when I launch my application I have the bellow error:
java.io.FileNotFoundException: logs/myLogs-api.log (No such file or directory).......Failed to create parent directories for
[/logs/myLogs-api.log]
My application cannot find the logs folder, but it already exist in the same directory of my jar folder /home/user1/myApp.dev/API/ .
My logback config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>$LOG_PATH:-logs/myLogs-api.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>$LOG_PATH:-logs/myLogs-api.%dyyyy-MM-dd.log</fileNamePattern>
</rollingPolicy>
<append>false</append>
<encoder>
<pattern>%ddd-MM-yyyy HH:mm:ss.SSS %magenta([%thread]) %highlight(%-5level) %logger36.%M - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="FILE" />
</root>
</configuration>
My prop file of spring is under WorkingDirectory=/home/user1/myApp.dev/API/
but when I launch the service it cannot get it.
linux ubuntu java
linux ubuntu java
asked Sep 25 at 12:41
BERGUIGA Mohamed Amine
1012
1012
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f471312%2ffailed-to-launch-spring-boot-application-into-linux-server%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password