Permission denied starting Cordapp via systemctl - corda

Starting the example cordapp on Ubuntu as a service per: https://docs.corda.net/releases/release-V3.1/deploying-a-node.html
On running the node I get the following error:
Apr 25 17:48:04 single-node-marketplace-master systemd[1]: Started Cordapp Example - party B.
Apr 25 17:48:22 single-node-marketplace-master java[99477]: Exception in thread "main" java.io.IOException: Permission denied
Apr 25 17:48:22 single-node-marketplace-master java[99477]: at java.io.UnixFileSystem.createFileExclusively(Native Method)
Apr 25 17:48:22 single-node-marketplace-master java[99477]: at java.io.File.createNewFile(File.java:1012)
Apr 25 17:48:22 single-node-marketplace-master java[99477]: at net.corda.node.internal.NodeStartup.enforceSingleNodeIsRunning(NodeStartup.kt:226)
Apr 25 17:48:22 single-node-marketplace-master java[99477]: at net.corda.node.internal.NodeStartup.run(NodeStartup.kt:53)
Apr 25 17:48:22 single-node-marketplace-master java[99477]: at net.corda.node.Corda.main(Corda.kt:13)

The Cordapp is being started as the "corda" user. Ensure that you've both created the user and set the permission in /opt/<cordapp name>
sudo adduser --system --no-create-home --group corda
sudo chown corda:corda /opt/partyB

Related

How to fix daemon reload access dined issue?

"systemctl enable openresty"
What I get
Synchronizing state of openresty.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable openresty
Failed to reload daemon: Access denied
Failed to reload daemon: Access denied
Failed to enable unit: Access denied
This the the screenshot
systemctl status openresty
openresty.service - The NGINX HTTP and reverse proxy server
Loaded: loaded (/lib/systemd/system/openresty.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-08-11 17:01:13 UTC; 2h 37min ago
Process: 8875 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=203/EXEC)
Aug 11 17:01:13 instance-2 systemd{1]: Starting The NGINX HTTP and reverse proxy server...
Aug 11 17:01:13 instance-2 systemd[8875]: openresty.service: Failed to execute command: No such file or directory
Aug 11 17:01:13 instance-2 systemd[8875]: openresty.service: Failed at step EXEC spawning /usr/sbin/nginx: No such file or directory
Aug 11 17:01:13 instance-2 systemd(1]: openresty.service: Control process exited, code=exited, status=203/EXEC
Aug 11 17:01:13 instance-2 systemd(1]: openresty.service: Failed with result 'exit-code'.
Aug 11 17:01:13 instance-2 systemd(1]: Failed to start The NGINX HTTP and reverse proxy server.
This is screenshot
journalctl -u openresty
-- Logs begin at Tue 2021-08-10 17:42:07 UTC, end at Wed 2021-08-11 19:20:05 UTC. --
Aug 10 19:14:22 instance-2 systemd(1]: Starting The OpenResty Application Platform...
Aug 10 19:14:22 instance-2 systemd(1]: Started The OpenResty Application Platform.
Aug 10 22:00:10 instance-2 systemd(1]: Stopping The OpenResty Application Platform...
Aug 10 22:00:10 instance-2 systemd(1]: openresty.service: Succeeded.
Aug 10 22:00:10 instance-2 systemd(1]: Stopped The OpenResty Application Platform.
Aug 10 22:00:10 instance-2 systemd(1]: Starting The OpenResty Application Platform...
Aug 10 22:00:10 instance-2 nginx[4012]: nginx: [emerg] directive "server_name" is not terminated by ";" in /etc/openresty/sites-enabled/m.facebook.com.conf:7
Aug 10 22:00:10 instance-2 nginx[4012]: nginx: configuration file /usr/local/openresty/nginx/conf/nginx.conf test failed
Aug 10 22:00:10 instance-2 systemd(1]: openresty.service: Control process exited, code=exited, status=1/FAILURE
Aug 10 22:00:10 instance-2 systemd(1]: openresty.service: Failed with result 'exit-code'.
Aug 10 22:00:10 instance-2 systemd(1]: Failed to start The OpenResty Application Platform.
Aug 10 22:01:15 instance-2 systemd(1]: Starting The OpenResty Application Platform...
Aug 10 22:01:15 instance-2 nginx[4034]: nginx: [emerg] directive "server_name" is not terminated by ";" in /etc/openresty/sites-enabled/m.facebook.com.conf:7
Aug 10 22:01:15 instance-2 nginx[4034]: nginx: configuration file /usr/local/openresty/nginx/conf/nginx. conf test failed
Aug 10 22:01:15 instance-2 systemd(1]: openresty. service: Control process exited, code=exited, status=1/FAILURE
Aug 10 22:01:15 instance-2 systemd(1]: openresty.service: Failed with result 'exit-code'.
Aug 10 22:01:15 instance-2 systemd(1]: Failed to start The OpenResty Application Platform.
Aug 11 17:01:13 instance-2 systemd(1]: Starting The NGINX HTTP and reverse proxy server...
Aug 11 17:01:13 instance-2 systemd[8875]: openresty.service: Failed to execute command: No such file or directory
Aug 11 17:01:13 instance-2 systemd[8875]: openresty.service: Failed at step EXEC spawning / usr /sbin / nginx : No such file or directory
Aug 11 17:01:13 instance-2 systemd(1]: openresty.service: Control process exited, code=exited, status=203/EXEC
Aug 11 17:01:13 instance-2 systemd(1]: openresty.service: Failed with result 'exit-code'.
Aug 11 17:01:13 instance-2 systemd(1]: Failed to start The NGINX HTTP and reverse proxy server.
This is screenshot
Sounds like you are trying to enable a service, from an account that is not privileged.
You may be able to use sudo, if the system is configured to allow this:
sudo systemctl enable openresty
If not, you would have to login as root:
su
[enter your root password]
systemctl enable openresty

OpenStack Keystone Identity Service Httpd Failed (rocky version)

Hello and thanks for taking some of your time to check my problem
i'm following the detailed steps by openstack to install openstack in no avail (https://docs.openstack.org/keystone/rocky/install/keystone-install-rdo.html)
I've tried to change the 5000 port for the service but the result is the same
any insights are most welcomed
[root#localhost i-openstack]# systemctl enable httpd.service
[root#localhost i-openstack]# systemctl start httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root#localhost i-openstack]# journalctl -xe
Oct 08 05:12:39 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Oct 08 05:12:39 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Oct 08 05:12:39 localhost.localdomain systemd[1]: httpd.service failed.
Oct 08 05:12:39 localhost.localdomain polkitd[1824]: Unregistered Authentication Agent for unix-process:4229:106865 (system bus name :1.42, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Oct 08 05:27:21 localhost.localdomain polkitd[1824]: Registered Authentication Agent for unix-process:4930:195069 (system bus name :1.43 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale
Oct 08 05:27:21 localhost.localdomain systemd[1]: Reloading.
Oct 08 05:27:21 localhost.localdomain polkitd[1824]: Unregistered Authentication Agent for unix-process:4930:195069 (system bus name :1.43, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Oct 08 05:27:26 localhost.localdomain polkitd[1824]: Registered Authentication Agent for unix-process:4950:195568 (system bus name :1.44 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale
Oct 08 05:27:26 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Oct 08 05:27:26 localhost.localdomain httpd[4956]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:5000
Oct 08 05:27:26 localhost.localdomain httpd[4956]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:5000
Oct 08 05:27:26 localhost.localdomain httpd[4956]: no listening sockets available, shutting down
Oct 08 05:27:26 localhost.localdomain httpd[4956]: AH00015: Unable to open logs
Oct 08 05:27:26 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Oct 08 05:27:26 localhost.localdomain kill[4958]: kill: cannot find process ""
Oct 08 05:27:26 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
Oct 08 05:27:26 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Oct 08 05:27:26 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Oct 08 05:27:26 localhost.localdomain systemd[1]: httpd.service failed.
Oct 08 05:27:26 localhost.localdomain polkitd[1824]: Unregistered Authentication Agent for unix-process:4950:195568 (system bus name :1.44, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Oct 08 05:34:01 localhost.localdomain polkitd[1824]: Registered Authentication Agent for unix-process:5222:235020 (system bus name :1.45 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale
Oct 08 05:34:01 localhost.localdomain systemd[1]: Reloading.
Oct 08 05:34:01 localhost.localdomain polkitd[1824]: Unregistered Authentication Agent for unix-process:5222:235020 (system bus name :1.45, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Oct 08 05:34:03 localhost.localdomain polkitd[1824]: Registered Authentication Agent for unix-process:5240:235248 (system bus name :1.46 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale
Oct 08 05:34:03 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
SOLUTION : It seemed i had to disable SELinux
Disable temporaliy
sudo setenforce 0
Restart httpd service
service httpd restart
Disable SELinux persistently (reboot required)
nano /etc/selinux/config
SELINUX=disabled

Error installing Apache Cloudstack management on Ubuntu 16.0.4

I am installing Apache cloudstack on ubuntu 16.0.4, but after installing cloudstack setup when I start services of cloudstack management service it displayed the following errors. (I have installed tomcat7, but tomcat 6 is not installed)
Warning: cloudstack-management.service changed on disk. Run 'systemctl daemon-reload' to reload units. Job for
cloudstack-management.service failed because the control process
exited with error code. See "systemctl status
cloudstack-management.service" and "journalctl -xe" for details.
I have checked systemctl status cloudstack-management.service command and it displays the following:
cloudstack-management.service - LSB: Start Tomcat (CloudStack).
Loaded: loaded (/etc/init.d/cloudstack-management; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2018-08-25 21:53:07 IST; 1min 11s ago
Docs: man:systemd-sysv-generator(8)
Process: 26684 ExecStart=/etc/init.d/cloudstack-management start (code=exited, status=1/FAILURE)
Aug 25 21:53:07 dhaval-pc systemd[1]: Starting LSB: Start Tomcat (CloudStack)....
Aug 25 21:53:07 dhaval-pc cloudstack-management[26684]: * cloudstack-management is not installed
Aug 25 21:53:07 dhaval-pc systemd[1]: cloudstack-management.service: Control process exited, code=exited status=1
Aug 25 21:53:07 dhaval-pc systemd[1]: Failed to start LSB: Start Tomcat (CloudStack)..
Aug 25 21:53:07 dhaval-pc systemd[1]: cloudstack-management.service: Unit entered failed state.
Aug 25 21:53:07 dhaval-pc systemd[1]: cloudstack-management.service: Failed with result 'exit-code'.
Warning: cloudstack-management.service changed on disk. Run 'systemctl daemon-reload' to reload units.
What change can I make in vi /etc/init.d/cloudstack-management file?

Kibana - process not starting- log not clear

Running on Ubuntu 16.4
Elastic version: 6.2.4
Kibana version: 6.2.4
Elastic is up and running on port 9200.
Kibana suddenly stopped working, I am trying to run the start command: sudo systemctl start kibana.service and I get the following error in the service stdout(journalctl -fu kibana.service):
Started Kibana.
Aug 27 12:54:33 ubuntuserver systemd[1]: kibana.service: Main process exited, code=exited, status=1/FAILURE
Aug 27 12:54:33 ubuntuserver systemd[1]: kibana.service: Unit entered failed state.
Aug 27 12:54:33 ubuntuserver systemd[1]: kibana.service: Failed with result 'exit-code'.
Aug 27 12:54:33 ubuntuserver systemd[1]: kibana.service: Service hold-off time over, scheduling restart.
Aug 27 12:54:33 ubuntuserver systemd[1]: Stopped Kibana.
No details on this log.
My yaml configuration has only this props:
server.port: 5601
server.host: "0.0.0.0"
I also have tried writing to a log file(hoping for more info there), I tried adding this configurations:
logging.dest: /var/log/kibana/kibana.log
logging.verbose: true
I gave the folder/file full access control but nothing is being written there(still writing to the stdout)

Reset username and password for JFrog

I installed JFrog standalone version on Ubuntu. I dont know my JFrog username and password. I also checked /usr/lib/apache-tomcat-8.5.16/conf/server.xml file but it is does not have any username and password. I also clicked on set me up, but the commandline interface to push an artifact is also prompting for username and password.
ravi#ravi-Inspiron-5537:~$ systemctl status artifactory.service
● artifactory.service - Setup Systemd script for Artifactory in Tomcat Servlet E
Loaded: loaded (/lib/systemd/system/artifactory.service; enabled; vendor pres
Active: active (running) since Fri 2017-08-11 10:11:41 EDT; 37min ago
Process: 16482 ExecStart=/opt/jfrog/artifactory/bin/artifactoryManage.sh start
Main PID: 16532 (java)
CGroup: /system.slice/artifactory.service
‣ 16532 /usr/bin/java -Djava.util.logging.config.file=/opt/jfrog/arti
Aug 11 10:11:17 ravi-Inspiron-5537 su[16508]: Successful su for artifactory by r
Aug 11 10:11:17 ravi-Inspiron-5537 su[16508]: + ??? root:artifactory
Aug 11 10:11:17 ravi-Inspiron-5537 su[16508]: pam_unix(su:session): session open
Aug 11 10:11:18 ravi-Inspiron-5537 artifactoryManage.sh[16482]: Max number of op
Aug 11 10:11:18 ravi-Inspiron-5537 artifactoryManage.sh[16482]: Using ARTIFACTOR
Aug 11 10:11:18 ravi-Inspiron-5537 artifactoryManage.sh[16482]: Using ARTIFACTOR
Aug 11 10:11:18 ravi-Inspiron-5537 artifactoryManage.sh[16482]: Creating directo
Aug 11 10:11:18 ravi-Inspiron-5537 artifactoryManage.sh[16482]: Tomcat started.
Aug 11 10:11:41 ravi-Inspiron-5537 artifactoryManage.sh[16482]: Artifactory Tomc
Aug 11 10:11:41 ravi-Inspiron-5537 systemd[1]: Started Setup Systemd script for
lines 1-18/18 (END)
The default username and password of Artifactory are:
User: admin
Pass: password

Resources