Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boot param --authCode not work #1949

Closed
88250 opened this issue Apr 2, 2021 · 7 comments
Closed

Boot param --authCode not work #1949

88250 opened this issue Apr 2, 2021 · 7 comments
Assignees
Labels
Milestone

Comments

@88250
Copy link
Member

88250 commented Apr 2, 2021

No description provided.

@88250 88250 added the Bug label Apr 2, 2021
@88250 88250 added this to the 1.1.8 milestone Apr 2, 2021
@88250 88250 self-assigned this Apr 2, 2021
@88250 88250 closed this as completed Apr 2, 2021
@sqybi
Copy link
Member

sqybi commented Jul 26, 2021

@88250 It seems --authCode is not working in the latest version of b3log/siyuan Docker image.
Version info: DIGEST:sha256:7661d568f35233a0e6683e3322446a0dea6dd99dda463b74cdf602ce1f462fa9

@88250
Copy link
Member Author

88250 commented Jul 26, 2021

@sqybi We are rewriting it, please check it after v1.2.2, thanks.

@sqybi
Copy link
Member

sqybi commented Jul 26, 2021

Btw, after I find the authCode in ~/Documents/SiYuan/conf/conf.json inside the docker, I got an unauthenticated error message when I tried to log in to the webpage with this password and siyuan username.

@sqybi
Copy link
Member

sqybi commented Jul 26, 2021

@88250 I see. Good job!

@sqybi
Copy link
Member

sqybi commented Jul 30, 2021

@88250 I found that the docker of 1.2.2 and 1.2.3 are still broken.

My docker-compose.yml :

version: '2.0'
services:
  siyuan:
    image: b3log/siyuan:latest
    container_name: siyuan
    restart: always
    volumes:
      - /root/siyuan/workspace:/siyuan/workspace
    ports:
      - 6806:6806
    command: ["--resident", "true", "--workspace", "/siyuan/workspace", "--accessAuthCode", "(my auth code)"]

siyuan.log inside the Docker container:

I 2021/07/28 22:36:45 working.go:96: 
  ____    _  __   __
 / ___|  (_) \ \ / /  _   _    __ _   _ __
 \___ \  | |  \ V /  | | | |  / _` | | '_ \
  ___) | | |   | |   | |_| | | (_| | | | | |
 |____/  |_|   |_|    \__,_|  \__,_| |_| |_|
I 2021/07/28 22:36:45 working.go:97: kernel is booting:
    * ver [1.2.3]
    * runtime mode [prod]
    * workspace directory [/root/Documents/SiYuan]
    * working directory [/opt/siyuan]
    * rsync directory [/root/Documents/SiYuan/temp/rsync]
    * read only [false]
    * container [docker]
    * resident [true]
    * arch [amd64]
D 2021/07/28 22:36:45 conf.go:101: check device locale failed [detect: not detected], using default language [en_US]
I 2021/07/28 22:36:45 conf.go:221: local serve path [http://127.0.0.1:6806]
I 2021/07/28 22:36:45 database.go:121: initialized database tables
I 2021/07/28 22:36:45 database.go:81: reinitialized database [/root/Documents/SiYuan/temp/siyuan.db]
I 2021/07/28 22:36:45 working.go:120: kernel booted
I 2021/07/28 22:36:45 serve.go:66: kernel HTTP server is booting [http://127.0.0.1:6806]
I 2021/07/30 12:53:11 process.go:36: received os signal [terminated], exit kernel process now
I 2021/07/30 12:53:12 conf.go:274: exited kernel
I 2021/07/30 12:53:13 working.go:96: 
  ____    _  __   __
 / ___|  (_) \ \ / /  _   _    __ _   _ __
 \___ \  | |  \ V /  | | | |  / _` | | '_ \
  ___) | | |   | |   | |_| | | (_| | | | | |
 |____/  |_|   |_|    \__,_|  \__,_| |_| |_|
I 2021/07/30 12:53:13 working.go:97: kernel is booting:
    * ver [1.2.3]
    * runtime mode [prod]
    * workspace directory [/root/Documents/SiYuan]
    * working directory [/opt/siyuan]
    * rsync directory [/root/Documents/SiYuan/temp/rsync]
    * read only [false]
    * container [docker]
    * resident [true]
    * arch [amd64]
I 2021/07/30 12:53:13 conf.go:221: local serve path [http://127.0.0.1:6806]
I 2021/07/30 12:53:13 database.go:121: initialized database tables
I 2021/07/30 12:53:13 database.go:81: reinitialized database [/root/Documents/SiYuan/temp/siyuan.db]
I 2021/07/30 12:53:13 working.go:120: kernel booted
I 2021/07/30 12:53:13 serve.go:66: kernel HTTP server is booting [http://127.0.0.1:6806]

My nginx config:

  server {
    server_name note.xxxxx.com;  // Hide my domain here

    listen  80 default_server;
    listen  [::]:80 default_server;

    charset  utf-8;

    location / {
      proxy_pass  http://localhost:6806/;
    }
  }

When visiting note.xxxxx.com, the page kept loading.

image

I'm not sure if this is a bug, or the docker deployment is not fixed yet in 1.2.3. If necessary, I'd glad to create another issue for this problem to track.

@sqybi
Copy link
Member

sqybi commented Jul 30, 2021

BTW, I got an "ERR_EMPTY_RESPONSE" error when visiting note.xxxxx.com:6806. I think it's because siyuan is listening 127.0.0.1 instead of 0.0.0.0?

@88250
Copy link
Member Author

88250 commented Jul 30, 2021

@sqybi In docker container, it should listen 0.0.0.0, we will fix this in the next release.

#2549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants