Coder Social home page Coder Social logo

Comments (26)

yariplus avatar yariplus commented on August 17, 2024 1

Are you using SSL? I have not tested this without SSL.

from minecraft-nodebb-integration.

Couby avatar Couby commented on August 17, 2024 1

That's it, yeeeaaahh. 😊

I simply added an entry in /etc/hosts to force routing the https://[my forum url] request from MC Server to my local proxy machine.

Now that works :).

from minecraft-nodebb-integration.

Couby avatar Couby commented on August 17, 2024

Yes I'm using it on NodeBB side.
But not on Bukkit server side.

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

Could you post the your config.yml, without the apikey and messages section?

from minecraft-nodebb-integration.

Couby avatar Couby commented on August 17, 2024

Yep :

forum:
  url: *https://myforumurl.com/*
  name: *MyForumName*
  apikey: *my_API_key_from_NBBForum*
socketio:
  address: *https://myforumurl.com/*
  transports:
  - polling
  - websocket
  namespace: plugins.MinecraftIntegration

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

Thanks.

Does opening https://myforumurl.com/ in the browser get properly redirected?

What CA are you using? (Let's Encrypt, StartSSL, etc..) Are you using cloudflare at all?

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

I'm trying to reproduce the error. The only way I can make it happen so far is when the forum url is misspelled.

from minecraft-nodebb-integration.

Couby avatar Couby commented on August 17, 2024

I'll check again the config.yml and will also try with volontary misspelled url to see if there is a difference on my side.
Could you share also your config.yml, without the apikey and messages section ?

from minecraft-nodebb-integration.

Couby avatar Couby commented on August 17, 2024

Misspelling the url I have a different error message :

[19:14:13 ERROR]: [NodeBB-Integration] Can't connect to forum at https://minet4c.osezlejeu.co/
[19:14:13 ERROR]: [NodeBB-Integration] Use `/nodebb url URL` to set the forum address.

Trying to set the url this way give me the following error :

[19:14:49 INFO]: Unknown command. Type "help" for help.

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

Sure thing

forum:
  url: https://yaricraft.com/
  name: '&aYaricraft Forums'
  apikey: seekrit
socketio:
  address: https://ika.yaricraft.com/
  transports:
  - polling
  - websocket
  namespace: plugins.MinecraftIntegration

I use a different socketio address because I use cloudflare, but yours should be the same as the forum url.

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

nvm, I see you misspelled it on purpose, dang, that's very weird.

from minecraft-nodebb-integration.

Couby avatar Couby commented on August 17, 2024

Result wit debug toggle :

[19:20:08 INFO]: [NodeBB-Integration] Reconnecting socket...
[19:20:08 INFO]: Reloaded PluginConfig.
[19:20:08 INFO]: [NodeBB-Integration] Reloaded PluginConfig.
[19:20:08 INFO]: [NodeBB-Integration] Getting Cookie.
[19:20:08 INFO]: [NodeBB-Integration] The forum URL was invalid.
[19:20:08 WARN]: java.net.ConnectException: Connexion refusée
[19:20:08 WARN]:    at java.net.PlainSocketImpl.socketConnect(Native Method)
[19:20:08 WARN]:    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
[19:20:08 WARN]:    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
[19:20:08 WARN]:    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
[19:20:08 WARN]:    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
[19:20:08 WARN]:    at java.net.Socket.connect(Socket.java:589)
[19:20:08 WARN]:    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
[19:20:08 WARN]:    at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
[19:20:08 WARN]:    at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
[19:20:08 WARN]:    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
[19:20:08 WARN]:    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
[19:20:08 WARN]:    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
[19:20:08 WARN]:    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
[19:20:08 WARN]:    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
[19:20:08 WARN]:    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
[19:20:08 WARN]:    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
[19:20:08 WARN]:    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
[19:20:08 WARN]:    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
[19:20:08 WARN]:    at com.radiofreederp.nodebbintegration.socketio.SocketIOClient.getCookie(SocketIOClient.java:182)
[19:20:08 WARN]:    at com.radiofreederp.nodebbintegration.socketio.SocketIOClient.lambda$connectSocket$13(SocketIOClient.java:137)
[19:20:08 WARN]:    at com.radiofreederp.nodebbintegration.NodeBBIntegrationBukkit$1.run(NodeBBIntegrationBukkit.java:68)
[19:20:08 WARN]:    at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftTask.run(CraftTask.java:53)
[19:20:08 WARN]:    at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[19:20:08 WARN]:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[19:20:08 WARN]:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[19:20:08 WARN]:    at java.lang.Thread.run(Thread.java:745)

Something is going wrong with the url format, looks crazy, sorry with this strange issue.

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

You mean the 4 is causing the /nodebb url command to fail?

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

Is the mc server running on the same machine as the forum? Maybe the issue is with port access as you originally suggested.

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

Yep, same machine as the forum, also on a non-standard port.

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

I can connect successfully to your forum from my machine, so I can only think it's some setting in your box. I can't imagine what it could be though.

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

Nope, that all looks normal.

For the server IP field in the forum, this should be the server domain name, as it is only used for user display. The forum never connects to the mc server, only the mc server to the forum. The error just means the mc server has never connected.

I think you need root to read the access.log and error.log files. See if you can see them that way.

from minecraft-nodebb-integration.

Couby avatar Couby commented on August 17, 2024

You mean mc server logs ?

I moved the forum and mc server on the same machine. I'm using http://127.0.0.1:4567 as url and socket live adress.

Things look a bit better. I don't have the error message anymore. But using nodebb toggle command I see the forum is not connected :

[22:16:18 INFO]: The server is currently DISCONNECTED from the forum.

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

Well, that's something I guess.

Try
/nodebb debug toggle
/nodebb reload

from minecraft-nodebb-integration.

Couby avatar Couby commented on August 17, 2024

Here is what I get, with a /nodebb debug just after :

nodebb reload
[05:49:02 INFO]: [NodeBB-Integration] Reconnecting socket...
[05:49:02 INFO]: Reloaded PluginConfig.
[05:49:02 INFO]: [NodeBB-Integration] Reloaded PluginConfig.
[05:49:02 INFO]: [NodeBB-Integration] Getting Cookie.
[05:49:02 INFO]: [NodeBB-Integration] Got Cookie: null
nodebb debug
[05:49:07 INFO]: The server is currently DISCONNECTED from the forum.
[05:49:07 INFO]: Forum Name is The Next Craft
[05:49:07 INFO]: Forum URL is http://127.0.0.1:4567
[05:49:07 INFO]: Forum API Key is my_api_key
[05:49:07 INFO]: Socket Live Address is http://127.0.0.1:4567
[05:49:07 INFO]: Post bugs to https://goo.gl/qSy6BP
[05:49:07 INFO]: Use /nodebb debug toggle to toggle verbose logging.

My setup :

  • NodeBB v1.1.2
  • CraftBukkit version git-Bukkit-6053c5c (MC: 1.10.2) (Implementing API version 1.10.2-R0.1-SNAPSHOT)
  • Vault v1.5.6-b49
  • OnTime v4.1.4
  • NodeBBIntegration v0.7.3

System :

  • Debian 8
  • java version "1.8.0_101"
  • node.js v4.5.0
  • redis 3.2.3

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

I'm guessing that is from using the localhost address. I am getting a valid cookie using the full domain from my PC. I'm not sure why you can't use the domain from the same machine.

What is the result now after /nodebb url tnc.osezlejeu.com

from minecraft-nodebb-integration.

Couby avatar Couby commented on August 17, 2024

What is the result now after /nodebb url tnc.osezlejeu.com

The same error :( :

[06:52:04 INFO]: Set forum url to tnc.osezlejeu.com
[06:52:04 WARN]: java.net.ConnectException: Connexion refusée
[06:52:04 WARN]: at java.net.PlainSocketImpl.socketConnect(Native Method)
[06:52:04 WARN]: at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)

Maybe I should try to reinstall "MC server"...

from minecraft-nodebb-integration.

Couby avatar Couby commented on August 17, 2024

Tried with a vanilla server on my local computer. It works.

So I tried on the CT with a vanilla server. Doesn't work...
That makes me think could be because it is a CT... will try with a VM.

from minecraft-nodebb-integration.

Couby avatar Couby commented on August 17, 2024

... will try with a VM.

Not better 😊 .
Clearly a local network setup issue...

from minecraft-nodebb-integration.

yariplus avatar yariplus commented on August 17, 2024

That's what I'm leaning towards. I just don't have enough network knowledge to tell you where to look for the problem.

from minecraft-nodebb-integration.

Couby avatar Couby commented on August 17, 2024

Thanks anyway.
If I find a solution, I'll report about it.
Maybe my next attempt will be a local DNS to route correctly the https forum request from mc server locally...

from minecraft-nodebb-integration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.