Score:0

Systemd does not write to StandardOutput with java program

in flag

I have this service file to start my Java application

[Unit]
Description=StorageWebServer

[Service]
WorkingDirectory=/opt/StorageWebServer
ExecStart=/opt/java/openjdk/jdk-16.0.2/bin/java -jar /opt/StorageWebServer/StorageWebServer.jar
User=jvmapps
Type=simple
Restart=on-failure
RestartSec=10
StandardOutput=file:/opt/log.log   
StandardError=file:/opt/log2.log


[Install]
WantedBy=multi-user.target

I have reloaded the file, restarted the service but still it is not writing the output to the folder.

Running on Amazon EC2 with Ubuntu

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.