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

getaddrinfow: The specified class was not found (and workaround) #5290

Closed
2 of 7 tasks
bbalet opened this issue Jun 12, 2018 · 2 comments
Closed
2 of 7 tasks

getaddrinfow: The specified class was not found (and workaround) #5290

bbalet opened this issue Jun 12, 2018 · 2 comments

Comments

@bbalet
Copy link

bbalet commented Jun 12, 2018

  • Gogs version (or commit ref): 0.11.53 (precompiled binary with service support)
  • Git version: 2.17.1.windows.2
  • Operating system: Windows 2012 Server
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gogs.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist (usually found in log/gogs.log):

2018/06/12 14:36:36 [ERROR] [.../runtime/asm_amd64.s:2361 goexit()] Fail to send emails [benjamin.balet@gmail.com]: UID: 4, registration notify - gomail: could not send email 1: dial tcp: lookup tcp///smtp.gmail.com: getaddrinfow: The specified class was not found.

Description

On Windows, the following settings in app.ini doesn't work:

HOST    = smtp.gmail.com:587

However, when I add a double quote it works fine:

HOST    = "smtp.gmail.com:587"

What is odd is that I don't need to use a double quote for the DB host:

[database]
DB_TYPE  = mysql
HOST     = 127.0.0.1:3306

By digging a bit, it looks like the delimiter is included by ReadString, cf. golang/go#25553
So your underlying mail lib understands smtp.gmail.com:587\n

Please note that this issue is not related to #4310 as it is a configuration parsing issue.

Sorry, my Go is too rusty to submit a PR, but great project for our NGO (we are an IT school for underprivileged children in Cambodia. We have a poor Internet connection and old servers, so gogs is a perfect match).
...

@unknwon
Copy link
Member

unknwon commented Jun 12, 2018

Hi, Gogs uses https://github.com/go-ini/ini, it could be a bug in it, I'm looking into it.

@unknwon
Copy link
Member

unknwon commented Jun 12, 2018

I've checked code that INI definitely trims all white spaces (including \r\n). So this must be something else.

Since this is not a Gogs problem, I'm going to close this issue. You are welcome to report to https://github.com/go-ini/ini, or live with adding "" around value.

@unknwon unknwon closed this as completed Jun 12, 2018
richmahn referenced this issue in unfoldingWord/dcs Feb 5, 2019
* migrate database if app.ini found

* replacing hard-coded user id by env variable

* Update per @zeripath's feedback
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants