On which port does forging occur, or should be set?

Which port should I use the following command to start forging with curl?

wget -qO- 'http://localhost:7876/nxt?requestType=startForging&secretPhrase=sssecrrretPhPhPhphrrrassssse'

This command did not work, I receive this error message:
wget -qO- 'http://localhost:6807/nxt?requestType=startForging&secretPhrase=passphrase BLA BLAH'
{"errorDescription":"This request is only accepted using POST!","errorCode":1}

only accepted using POST!?!

I also tried

curl -d requestType=startForging -d secretPhrase="PASSPHRASE" http://localhost:7876/nxt

and received this message:

curl: (1) Received HTTP/0.9 when not allowed


I am assuming it is the apiServerSSLPort 7876 that must be used for forging? However neither commands work although I am logged into that specific wallet via the API gui, it does not show it is forging after I attempted either command. However it does start to forge when I manually start forging within the API, which is of course not my goal.


What are the implications if the apiServerPort and apiServerSSLPort are the same port number? (Mine are not).
Curious what it would do for SSL implementation (make it easier somehow)...

nxt.apiServerPort=xxxx
nxt.apiServerSSLPort=xxxy

However I am not sure why neither forging commands in terminal did not work.

However I again logged into the wallet which is being used for forging and now the API says "unknown height cannot determine forging status"...
Please define administator password (asks for passphrase in the API)... yet was correct passphrase for the curl forging request in terminal?

Also getting:
curl -d requestType=getState http://localhost:7876/nxt
curl: (1) Received HTTP/0.9 when not allowed


Forging only starts successfully when I add the passphrase via the API via the APIserverport.

Also peerServerPort and ApiServerSSLPort not loading API
however the apiServerPort is doing fine and loading the API...
What have I done to my poor nxt-default.properties...

root@167.99.146.146

forging "deadlines" hit... when I forge to the Server api (not the standard SSL api 7876..

They key problem for me is that in the API it requests admin password and then it starts to forge (green light) however in terminal the CURL or wget functions do not work.
Of course the password is the seed word phrase same as I use in the curl command? Why would it allow me to forge via the API gui but not terminal?

curl "http://127.0.0.1:7876/nxt?requestType=getState"
curl: (1) Received HTTP/0.9 when not allowed

Please try to keep your questions/posts focused. I will try to answer or comment to some of the issues you have.

There are some API requests that only accept POST.

It's highly recommended to not edit the nxt-default.properties. Put any change on the nxt.properties file.

There is no functional difference between the HTTPS port and the HTTP one.

curl -d requestType=startForging -d secretPhrase="secret passphrase" http://localhost:7876/nxt

I am still being asked a password in the API I am not sure if something is wrong with the curl syntax.

{"requestProcessingTime":5,"deadline":0,"hitTime":0}

I am not sur eif its a PUSH api if it would automatically say "forging" if I run the curl command but even upon login in again and refreshing the page it requests

is what I get returned in terminal as a result... I am not sure what I am doing wrong. I am not sure if you have heard of RTFM (read the F manual) - I remember a friend told me that 20 years ago. Because in the wallet I am still asked.

I am also being told in the API with an otherwise beautiful popup in pink with a reddish border that "Warning: You are most likely on a fork (you have forged the last 10 blocks)."

I can start forging in the wallet API however the CURL from command line does not work.

I think I should quit this and choke on another cigarette, it is in a way far more relaxing for me. :slight_smile:

Silly question but have you actually tried using POST requests from curl ?
-> curl -X POST ...

My apologies psalmazar I am not familiar with curl syntax at all. Actually I'm not even a programmer at all (just some front end stuff and beginner english language software), I was just trying to succeed in doing this to prove to myself I am not an idiot, 'haha...'. < - o m g. It was actually very upsetting to realise that it is second nature, it is obviously not familiar territory for me which of course means it should be left to the experts.

There is a lot of concepts I do not even understand so it may be no use really, I was trying to learn but there is so much related concepts that I do not feel I can familiarize myself with it hopefully if I can afford it I can study chemistry instead oneday, teaching oneself how to 'hack' well. I don't have the temperament for it. I already want to grab a glass of wine just thinking about how much it upsets me, actually.

Of course it goes to show that actual training and years of perfecting and actual ability to memorize syntax, something I can't do much...

thank you for the reference to POST in curl link. I think I will just focus on publishing my beginner english app and try to make some advertising revenue, its far simpler than trying to clone this 'monstrosity' (very large unmanageable thing)! :smiley:
And, I may also retain my sense of not being insane because I feel I've lost my sanity because I cannot get it to work properly, like deepdiving into the shallow end of the pool and in fact I will get that wine now and its 10 in the morning, I must relax I think. I'm just not smart enough or patient enough and lost my nerve, I really did. At least the laptop didn't shortcircuit!

Also I've been changing nxt-default.properties and made no nxt.properties. I understand some more of it now (some specifications in the properties file but I can't get a grip on it in totality, and some things for example even in Nano like having to cut and paste to a buffer with nano -F, for example, why would you have to cut and paste to a buffer why are these files separates for security reasons how? I mean. So its very frustrating for me working in the dark... and tbh I don't want to drink the wine but my tea is almost finished and its a sweet rose its really not very nice - tip if you want to age redwine, place it in a container with x10 airspace (enclosed). in 1 year it will be the same quality of a 30 year old wine - I found this out by accident during lockdown when alcohol sales were banned - of course like the typical rat-response in cybernetic models the fervour to attain the unattainable meant that frenzied bootlegging took place during this time. I think there is something to be said though for the "Sanitizing" effects of computer programming for mental health, if one has sufficient repertoire of knowledge, I'm already calmer just reading about curl POST even though I may not really worry if I don't succeed at it any more, I really shouldn't get emotional its just software after all and it is based on logic and being emotional about it leads to shortcircuits...! - Revelations of the uneducated! I was also trying to avoid my father who worked at the computer science department but regret not studying it very much... I remember sitting in a language lecture actually finally getting to grips with Drupal and the lecturer noticing me in the back, back then I was quite sober and making good progress, too. But I can't stand drupal and have forgotten about it since 2014... :slight_smile:

post requests are quite interesting I do not really understand WHy one needs post requests for example. It is just sending data in a certain way to a specific program and in the request there must be some type of permission or handshake. Again, I feel like a civilian in a military operation trying to do this! I really do waste your time, my apologies. Because you know my father is very insulting old programmer (79). Kind of remind me of John Lily's 9the Ketamine Guru)'s Solid State Entity prophecy. I just wanted to make some money (lol) to get TF away from this old rich scrooge. I honestly hate him but regret not studying computer science, its very interesting. esp that that Minsky mentions about finite machines and the black box. So processing power is based on physical properties but in ['my'] theory if processing power is not based on physical properties it would have no limitations? Then it has no parameters and can do anything countless times in countless ways and it would not even need a split second and everything would already be finished before it even had to start - like something so fast it is already everywhere at the same time - an infinite number of times - but this also implies a here-there perspective.... But does anything non-physical actually exist?

Because Parmenides mentioned that non-existence cannot exist. Because well in my words, if non existence exists, then it is not non-existence. And if non-existence doesn't exist, then still there is only existence. See this paragraph about Parmenides you could actually prove with a logic circuit flowchart that nothingness does not and cannot exist and that there is only existence - however oneday I will no longer exist however fro, a 4D perspective I will be stuck in my little slice of time for all eternity, even after I die...

And Minsky's book finite and infinite machines. That "infinite" is still based on finite calculations - just countless numbers of them. What if an infinite machine meant that everything was just potential and that no real values are used. In that sense its not really a 'machine' I mean it would be very insulting to call it a machine. but I don't think the universe is a computer digital metaphysics is very interesting although ~ rant! No I don't think its a machine but in a way is prescient.

What is the best definition of a machine?

"Google'd" Best definition of A machine:
A machine is any physical system with ordered structural and functional properties. It may represent human-made or naturally occurring device molecular machine that uses power to apply forces and control movement to perform an action.

I must apologise for my past drunken posts. I have stopped drinking alcohol. And tonight after cycling, I came back, and I succeeded in getting forging to work from terminal (thank you sobriety and a preference for debugging (paying attention) rather than 'succeeding' (fruits of labour, you know). My mentality is terrible. I added:

curl -d requestType=startForging -d secretPhrase="PASSPHRASE" --http0.9 http://0.0.0.0:7876/nxt

adding --http0.9 does not give me a terminal statement,:
{"requestProcessingTime":57,"deadline":115,"hitTime":12446050}
but instead, also forges without giving this feedback. What is this feedback line called though, the server response thingy, because its not there when I add --http0.9 to the forging command.

Why my forging did not work is, I was using the nxt.apiServerSSLPort, which I did not set the same as the nxt.apiServerPort. Should they preferably be the same?

What are the implications if they are different? Could they be made the same, even after I have compiled (I am assuming not at all?!)...