Ubuntu – Oracle Database Express 11.2 job for oracle-xe.service failed

14.04databaselubuntuoracle

Environment:

  • Ubuntu 14.04
  • Oracle Database Express 11g Release 2

I'm receiving an error by starting service oracle-xe

systemctl status oracle-xe.service

● oracle-xe.service - LSB: Oracle 11g Express Edition
   Loaded: loaded (/etc/init.d/oracle-xe)
   Active: failed (Result: exit-code) since lun 2015-08-24 22:24:32 CEST; 18min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 12274 ExecStart=/etc/init.d/oracle-xe start (code=exited, status=1/FAILURE)

... systemd[1]: Starting LSB: Oracle 11g Express Edition...
... oracle-xe[12274]: Starting Oracle Net Listener.
... su[12282]: No passwd entry for user 'oracle'
... oracle-xe[12274]: Starting Oracle Database 11g Express Edition instance.
... su[12288]: No passwd entry for user 'oracle'
... oracle-xe[12274]: Failed to start Oracle Net Listener using /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr and Oracle Express Database using /u01/app/oracle/product/11.2.0/xe/bin/sqlplus.
... systemd[1]: oracle-xe.service: control process exited, code=exited status=1
... systemd[1]: Failed to start LSB: Oracle 11g Express Edition.
... systemd[1]: Unit oracle-xe.service entered failed state.
... systemd[1]: oracle-xe.service failed.

I think that the problem could be with:
… su[12282]: No passwd entry for user 'oracle'

journalctl -xe

...
.. polkitd(authority=local)[641]: Registered Authentication Agent for unix-process:12249:680724 (system bus name :1.73 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale es_ES.UTF-8)
... systemd[1]: Starting LSB: Oracle 11g Express Edition...
-- Subject: Unit oracle-xe.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit oracle-xe.service has begun starting up.
... oracle-xe[12274]: Starting Oracle Net Listener.
... su[12282]: No passwd entry for user 'oracle'
... su[12282]: FAILED su for oracle by root
... su[12282]: - ??? root:oracle
... oracle-xe[12274]: Starting Oracle Database 11g Express Edition instance.
... su[12288]: No passwd entry for user 'oracle'
... su[12288]: FAILED su for oracle by root
... su[12288]: - ??? root:oracle
... oracle-xe[12274]: Failed to start Oracle Net Listener using /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr and Oracle Express Database using /u01/app/oracle/product/11.2.0/xe/bin/sqlplus.
... systemd[1]: oracle-xe.service: control process exited, code=exited status=1
... systemd[1]: Failed to start LSB: Oracle 11g Express Edition.
-- Subject: Unit oracle-xe.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit oracle-xe.service has failed.
-- 
-- The result is failed.
... systemd[1]: Unit oracle-xe.service entered failed state.
... systemd[1]: oracle-xe.service failed.
... polkitd(authority=local)[641]: Unregistered Authentication Agent for unix-process:12249:680724 (system bus name :1.73, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale es_ES.UTF-8) (disconnected from bus)
... sudo[12248]: pam_unix(sudo:session): session closed for user root
... pkexec[12404]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
... pkexec[12404]: jose: Executing command [USER=root] [TTY=unknown] [CWD=/home/jose] [COMMAND=/usr/lib/update-notifier/package-system-locked]
... kernel: toshiba_acpi: Unknown key 120

Best Answer

Joe has provided an extraordinarily roundabout way of running two commands. They're much the same in this version of Oracle Database as other versions. Here they are, straight from an Oracle RUEI Installation Guide and the Oracle 12c Database Quick Installation Guide that it references:

# useradd -g oinstall -G dba oracle
# passwd oracle
Related Question