Nextcloud Installation on OpenBSD

Hello everyone,

this is my first installation. I have an OpenBSD web server running at 192.168.0.3:80.

Once Nextcloud is installed via packages, it can be reached via 192.168.0.3 in the browser.

In the Maria database, running on 127.0.0.1.3306, Ihave created a database and a user.

CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER nextcloud@localhost identified by ‘nextcloud’;
GRANT ALL PRIVILEGES on nextcloud.* to nextcloud@localhost;
FLUSH privileges;

In the browser view I was asked to create a “CAN_INSTALL”. After I created the file under config/ I saw the webinstaller.

I fill the data correctly and type in “localhost:3306” as host.

This error message is shown to me:

Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory

The error message is self-explanatory. Maybe someone has an idea?..

localhost != 127.0.0.1 to mysql/mariadb. you know this?

localhost means a connection via linux socket.

my you try without port number?

In the meantime I noticed that too :slight_smile: Thanks

I could not fix the problem so far. I get the following error message:

The server could not complete the request.

If this happens again, please send the following technical details to your server administrator.

More details can be found in the server log.
Technical Details

Remote address: 192.168.*.*
Request identifier: ses6qGVA2qNWYqzzUCMC

I can’t see anything in the logs (data/nextcloud.log).

Have someone an idea?

Check your webserver logs. Perhaps even something more basic that it couldn’t even land in the nextcloud log (permissions etc.).

I like to post the logs here.

 "reqId": "BUMdZc8ErcDuPDZuph2I",
  "level": 3,
  "time": "2020-11-28T13:39:33+00:00",
  "remoteAddr": "192.168.178.39",
  "user": "nextcloud",
  "app": "index",
  "method": "POST",
  "url": "/index.php/login",
  "message": {
    "Exception": "RuntimeException",
    "Message": "OpenSSL reported a problem",
    "Code": 0,
    "Trace": [
      {
        "file": "/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php",
        "line": 87,
        "function": "newToken",
        "class": "OC\\Authentication\\Token\\PublicKeyTokenProvider",
        "type": "->",
        "args": [
          "*** sensitive parameter replaced ***",
          "*** sensitive parameter replaced ***",
          "*** sensitive parameter replaced ***",
          "*** sensitive parameter replaced ***",
          "*** sensitive parameter replaced ***",
          "*** sensitive parameter replaced ***",
          "*** sensitive parameter replaced ***"
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Token/Manager.php",
        "line": 71,
        "function": "generateToken",
        "class": "OC\\Authentication\\Token\\PublicKeyTokenProvider",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/nextcloud/lib/private/User/Session.php",
        "line": 682,
        "function": "generateToken",
        "class": "OC\\Authentication\\Token\\Manager",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/CreateSessionTokenCommand.php",
        "line": 68,
        "function": "createSessionToken",
        "class": "OC\\User\\Session",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/ALoginCommand.php",
        "line": 40,
        "function": "process",
        "class": "OC\\Authentication\\Login\\CreateSessionTokenCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/CompleteLoginCommand.php",
        "line": 48,
        "function": "processNextOrFinishSuccessfully",
        "class": "OC\\Authentication\\Login\\ALoginCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/ALoginCommand.php",
        "line": 40,
        "function": "process",
        "class": "OC\\Authentication\\Login\\CompleteLoginCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/LoggedInCheckCommand.php",
        "line": 61,
        "function": "processNextOrFinishSuccessfully",
        "class": "OC\\Authentication\\Login\\ALoginCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/ALoginCommand.php",
        "line": 40,
        "function": "process",
        "class": "OC\\Authentication\\Login\\LoggedInCheckCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/EmailLoginCommand.php",
        "line": 58,
        "function": "processNextOrFinishSuccessfully",
        "class": "OC\\Authentication\\Login\\ALoginCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/ALoginCommand.php",
        "line": 40,
        "function": "process",
        "class": "OC\\Authentication\\Login\\EmailLoginCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/UidLoginCommand.php",
        "line": 54,
        "function": "processNextOrFinishSuccessfully",
        "class": "OC\\Authentication\\Login\\ALoginCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/ALoginCommand.php",
        "line": 40,
        "function": "process",
        "class": "OC\\Authentication\\Login\\UidLoginCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/UserDisabledCheckCommand.php",
        "line": 57,
        "function": "processNextOrFinishSuccessfully",
        "class": "OC\\Authentication\\Login\\ALoginCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/ALoginCommand.php",
        "line": 40,
        "function": "process",
        "class": "OC\\Authentication\\Login\\UserDisabledCheckCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/PreLoginHookCommand.php",
        "line": 53,
        "function": "processNextOrFinishSuccessfully",
        "class": "OC\\Authentication\\Login\\ALoginCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Authentication/Login/Chain.php",
        "line": 108,
        "function": "process",
        "class": "OC\\Authentication\\Login\\PreLoginHookCommand",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/core/Controller/LoginController.php",
        "line": 307,
        "function": "process",
        "class": "OC\\Authentication\\Login\\Chain",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Authentication\\Login\\LoginData"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 170,
        "function": "tryLogin",
        "class": "OC\\Core\\Controller\\LoginController",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 100,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Core\\Controller\\LoginController"
          },
          "tryLogin"
        ]
      },
      {
        "file": "/nextcloud/lib/private/AppFramework/App.php",
        "line": 137,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Core\\Controller\\LoginController"
          },
          "tryLogin"
        ]
      },
      {
        "file": "/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php",
        "line": 47,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OC\\Core\\Controller\\LoginController",
          "tryLogin",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "_route": "core.login.tryLogin"
          }
        ]
      },
      {
        "function": "__invoke",
        "class": "OC\\AppFramework\\Routing\\RouteActionHandler",
        "type": "->",
        "args": [
          {
            "_route": "core.login.tryLogin"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/private/Route/Router.php",
        "line": 297,
        "function": "call_user_func",
        "args": [
          {
            "__class__": "OC\\AppFramework\\Routing\\RouteActionHandler"
          },
          {
            "_route": "core.login.tryLogin"
          }
        ]
      },
      {
        "file": "/nextcloud/lib/base.php",
        "line": 1011,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/login"
        ]
      },
      {
        "file": "/nextcloud/index.php",
        "line": 37,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php",
    "Line": 368,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36",
  "version": "19.0.4.2"
}

no one with an idea?

Sorry no real idea. But perhaps you can use postgresSQL and/or file.sock instead of localhost:port .

Has ne1 been able to implement caching on openbsd 6.8 for nextcloud n ocm/ocs service using httpd

@nooblike
I also run into this newToken issue with nc22.1.1.2 after my LetsEncrypt certificate got renewed.
Were you able to solve this? If so, can you report how?