linuxserver / docker-ubooquity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to set admin password

captn3m0 opened this issue · comments

commented

linuxserver.io

Arch Linux

INFO  com.ubooquity.Ubooquity - Running with the following parameters - headless: true, libraryport: -1, adminport: -1, remoteadmin: true, host: 0.0.0.0, debug: false, execdir: /config
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - #############################
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - #     Starting Ubooquity    #
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - #############################
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - Java version: 1.8.0_131
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - Java vendor: Oracle Corporation
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - Max heap size available: 455 MB
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - OS name: Linux
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - OS version: 4.13.12-1-ARCH
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - OS architecture: amd64
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - Loading local version info
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - Ubooquity 2.1.1 built on 2017-09-22 at 21:10
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - Creating application folders
20171203 17:39:20 [main] INFO  com.ubooquity.Ubooquity - Loading preferences
20171203 17:39:20 [main] INFO  org.eclipse.jetty.util.log - Logging initialized @1415ms to org.eclipse.jetty.util.log.Slf4jLog
20171203 17:39:20 [main] INFO  com.ubooquity.b - Starting internal server...
20171203 17:39:20 [main] WARN  com.ubooquity.data.database.c - Could not find id of root path /comics (ignore this warning if you just added a new root directory)
20171203 17:39:20 [main] INFO  com.ubooquity.b - Autoscan is disabled, manually launch or schedule a scan to scan your files
20171203 17:39:20 [main] INFO  com.ubooquity.b - Reverse proxy prefix is not activated
20171203 17:39:20 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.4.0.v20161208
20171203 17:39:20 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@6d60fe40{/,null,AVAILABLE,@admin}
20171203 17:39:20 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@792b749c{/,null,AVAILABLE,@library}
20171203 17:39:20 [main] INFO  o.e.jetty.server.AbstractConnector - Started library@5965d37{HTTP/1.1,[http/1.1]}{0.0.0.0:2202}
20171203 17:39:20 [main] INFO  o.e.jetty.server.AbstractConnector - Started admin@7a5ceedd{HTTP/1.1,[http/1.1]}{0.0.0.0:2203}
20171203 17:39:20 [main] INFO  org.eclipse.jetty.server.Server - Started @1587ms
20171203 17:39:20 [main] INFO  com.ubooquity.b - Internal server started. Listening on port 2202 (library) and 2203 (admin)

Terraform Configuration

resource "docker_container" "ubooquity" {
  name  = "ubooquity"
  image = "${docker_image.ubooquity.latest}"

  restart = "unless-stopped"
  destroy_grace_seconds = 30
  must_run = true
  memory = 800

  volumes {
    host_path      = "/mnt/config/ubooquity"
    container_path = "/config"
  }

  volumes {
    host_path      = "/mnt/media/EBooks"
    container_path = "/books"
  }

  volumes {
    host_path      = "/mnt/media/EBooks"
    container_path = "/files"
  }

  volumes {
    host_path      = "/mnt/media/EBooks/Comics"
    container_path = "/comics"
  }

  ports {
    internal = 2203
    external = 2204
    ip       = "192.168.1.111"
  }

  labels {
    "traefik.enable" = "true"
    "traefik.admin.port" =  2203
    "traefik.read.port" = 2202
  }

  upload {
    content = "${file("${path.module}/conf/ubooquity.json")}"
    file    = "/config/preferences.json"
  }

  # lounge:tatooine
  env = [
    "PUID=1004",
    "PGID=1003",
    "MAXMEM=512"
  ]
}

Ubooquity Configuration

{
  "filesPaths": [
    {
      "pathString": "/files",
      "userName": []
    }
  ],
  "comicsPaths": [
    {
      "pathString": "/comics",
      "userName": []
    }
  ],
  "booksPaths": [
    {
      "pathString": "/books",
      "userName": []
    }
  ],
  "users": [],
  "isFilesProviderEnabled": true,
  "isComicsProviderEnabled": true,
  "isBooksProviderEnabled": true,
  "isUserManagementEnabled": true,
  "libraryPortNumber": 2202,
  "adminPortNumber": 2203,
  "comicWidth": 160,
  "comicHeight": 230,
  "comicsPaginationNumber": 30,
  "bookWidth": 160,
  "bookHeight": 230,
  "booksPaginationNumber": 30,
  "minimizeToTray": false,
  "minimizeOnStartup": false,
  "autoscanPeriod": 0,
  "isRemoteAdminEnabled": true,
  "theme": "default",
  "isShrinkingCacheEnabled": false,
  "shrunkPageWidth": 1536,
  "shrunkPageHeight": 2500,
  "shrinkingCachePath": "",
  "autoScanAtLaunch": false,
  "reverseProxyPrefix": "",
  "keystorePath": "",
  "keystorePassword": "",
  "isOpdsProviderEnabled": true,
  "folderExclusionPattern": "",
  "bypassSingleRootFolder": false,
  "enableFolderMetadataDisplay": false,
  "bookmarkUsingCookies": false,
  "displayTitleInsteadOfFileName": true,
  "keepUnreachableSharedFolders": false
}

Opening http://192.168.1.111:2204/admin/admin-res/cryptoparams serves me a signup page, which hangs upon submission on the following error:

angular.min.js:117 TypeError: Cannot read property 'length' of undefined
    at str2rstr_utf8 (sha256-min.js:10)
    at hex_hmac_sha256 (sha256-min.js:10)
    at password.js:18
    at angular.min.js:130
    at n.$eval (angular.min.js:144)
    at n.$digest (angular.min.js:142)
    at n.$apply (angular.min.js:145)
    at l (angular.min.js:97)
    at H (angular.min.js:101)
    at XMLHttpRequest.u.onload (angular.min.js:102)

The reason being that the call to fetch the salt for cryptoparams returns the login page itself:

image

I've been running ubooquity using the archlinux package and have not faced this issue there. I've tried using the reverseProxyPrefix setting, but it doesn't help.

commented

I have no problems here, so it's something in your setup. Did you go to the path specified in the Readme?
http://<your-ip>:2203/ubooquity/admin/

Have you tried another browser?

commented

I changed the reverseProxy prefix to "", so it is accessible over http://<your-ip>:2204/admin/.

However, the request to http://192.168.1.111:2204/admin/admin-res/cryptoparams gives me a HTML page.

@tobbenb Can you try opening http://ip:port/ubooquity/admin/admin-res/cryptoparams and see if it returns a JSON/HTML response?

I copied the webadmin creds file from my earlier setup as a workaround for now. Will try using another browser as well.

commented

I tried the address you used, but only got a page not found.
Have you tried to not modify anything and use the address we specify in the Readme?

commented

Have you tried to not modify anything and use the address we specify in the Readme?

That address gives me a page not found, because of the different reverseProxyPrefix. I'll try setting it up with default settings again on a different system.

commented

Unable to reproduce on a fresh install. Closing.

Fun fact i ran into the same issue and found the solution on a forum.
I was connecting to
http://[server]:2203/ubooquity/admin/
And this had the same behavior as described above.
However connecting at the following adress does NOT cause the issue.
http://[server]:2203/ubooquity/admin

I fail to uderstand how a slash can be such a big deal but it seems to be the case ^^

Have a nice day!